2018-03-22 16:35:36 +08:00
|
|
|
<% provide(:head_title, t('libraries.repository_columns.head_title', repository: @repository.name)) %>
|
2018-05-08 22:33:42 +08:00
|
|
|
|
|
|
|
<div class="content-pane">
|
2018-03-22 16:35:36 +08:00
|
|
|
<div class="repository-columns-header container">
|
|
|
|
<div class="row">
|
|
|
|
<%= link_to t('libraries.repository_columns.index.back_to_repository_html', repository: @repository.name),
|
2018-04-05 15:56:09 +08:00
|
|
|
repository_path(@repository),
|
2018-04-12 23:09:53 +08:00
|
|
|
data: { no_turbolink: false } %>
|
2018-03-22 16:35:36 +08:00
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-6 text-left page-title">
|
|
|
|
<h2><strong><%=t 'libraries.repository_columns.index.manage_column' %></strong></h2>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-6 text-right">
|
2018-04-04 22:40:07 +08:00
|
|
|
<button class="btn btn-primary"
|
2018-03-23 23:00:33 +08:00
|
|
|
data-modal-url="<%= repository_columns_create_html_path(@repository) %>"
|
|
|
|
data-action="new-column-modal">
|
2018-03-22 16:35:36 +08:00
|
|
|
<span class="glyphicon glyphicon-plus"></span> <%=t 'libraries.repository_columns.index.new_column' %>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="repository-columns-body container">
|
|
|
|
<ul class="list-group"
|
|
|
|
data-repository-id="<%= @repository.id %>">
|
|
|
|
<% if @repository_columns.length.zero? %>
|
2018-03-23 23:00:33 +08:00
|
|
|
<li class="list-group-item text-center" data-attr="no-columns">
|
2018-03-22 16:35:36 +08:00
|
|
|
<strong><%=t 'libraries.repository_columns.index.no_column' %></strong>
|
|
|
|
</li>
|
|
|
|
<% else %>
|
|
|
|
<% @repository_columns.each do |column| %>
|
|
|
|
<% cache column do %>
|
|
|
|
<li class="list-group-item"
|
|
|
|
data-id="<%= column.id %>"
|
2018-03-23 23:00:33 +08:00
|
|
|
data-destroy-url="<%= repository_columns_destroy_html_path(@repository, column) %>"
|
|
|
|
data-edit-url="<%= edit_repository_repository_column_path(@repository, column) %>">
|
2018-03-22 16:35:36 +08:00
|
|
|
<span class="pull-left"><%= column.name %></span>
|
|
|
|
<span class="controlls pull-right">
|
2018-04-25 19:57:12 +08:00
|
|
|
<button class="btn btn-default" data-action="edit">
|
2018-05-22 22:55:58 +08:00
|
|
|
<span class="fas fa-pencil-alt"></span>
|
2018-04-25 19:57:12 +08:00
|
|
|
<%=t 'libraries.repository_columns.index.edit_column'%>
|
|
|
|
</button>
|
|
|
|
<button class="btn btn-default" data-action="destroy">
|
|
|
|
<span class="glyphicon glyphicon-trash"></span>
|
|
|
|
<%=t 'libraries.repository_columns.index.delete_column'%>
|
|
|
|
</button>
|
2018-03-22 16:35:36 +08:00
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<%= render partial: 'delete_column_modal' %>
|
|
|
|
<%= javascript_include_tag "repository_columns/index", "data-turbolinks-track" => true %>
|