Sha256: e251475500feddf6789074aabcd5fa5b0a516460d19e6690962b06113cc1f7f8

Contents?: true

Size: 1.13 KB

Versions: 5

Compression:

Stored size: 1.13 KB

Contents

<div id="flash-here"></div>

<h3>导航</h3>

<% if visible?(:create, Blacksand::Navigation) %>
  <%= link_to '新增导航', new_navigation_path, class: 'btn btn-default' %>
<% end %>

<p class="help-block">拖动排序</p>
<table id="nav-table" class="table table-bordered">
  <thead>
    <tr>
      <th>名称</th>
      <th>链接</th>
      <th>页面</th>
      <th></th>
    </tr>
  </thead>

  <tbody data-update-url="<%= reorder_navigations_path(format: :js) %>">
    <% @navigations.each do |navigation| %>
      <tr data-navigation-id="<%= navigation.id %>">
        <td><%= navigation.name %></td>
        <td><%= navigation.url %></td>
        <td><%= link_to navigation.page.title, navigation.page if navigation.page.present? %></td>
        <td>
          <% if visible?(:update, navigation) %>
            <%= link_to '编辑', edit_navigation_path(navigation) %>
          <% end %>

          <% if visible?(:destroy, navigation) %>
            <%= link_to '删除', navigation_path(navigation), method: :delete, data: { confirm: '确定删除导航?' } %>
          <% end %>
        </td>
      </tr>
    <% end %>
  </tbody>
</table>


Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
blacksand-2.5.0 app/views/blacksand/dashboard/navigations/index.html.erb
blacksand-2.4.1 app/views/blacksand/dashboard/navigations/index.html.erb
blacksand-2.4.0 app/views/blacksand/dashboard/navigations/index.html.erb
blacksand-2.3.0 app/views/blacksand/dashboard/navigations/index.html.erb
blacksand-2.2.2.1 app/views/blacksand/dashboard/navigations/index.html.erb