Skip to content
Snippets Groups Projects
index.html.erb 1.09 KiB
Newer Older
Arnaud Levy's avatar
Arnaud Levy committed
<% content_for :title, Language.model_name.human(count: 2) %>

pabois's avatar
pabois committed
<table class="<%= table_classes %>">
Arnaud Levy's avatar
Arnaud Levy committed
  <thead>
    <tr>
pabois's avatar
pabois committed
      <th><%= Language.human_attribute_name('name') %></th>
      <th><%= Language.human_attribute_name('iso_code') %></th>
Arnaud Levy's avatar
Arnaud Levy committed
      <th></th>
    </tr>
  </thead>

  <tbody>
    <% @languages.each do |language| %>
      <tr>
        <td><%= link_to language, [:server, language] %></td>
        <td><%= language.iso_code %></td>
        <td class="text-end">
pabois's avatar
pabois committed
          <div class="btn-group" role="group">
            <%= link_to t('edit'),
                      edit_server_language_path(language),
                      class: button_classes %>
pabois's avatar
pabois committed
            <%= link_to t('delete'),
                      server_language_path(language),
                      method: :delete,
pabois's avatar
pabois committed
                      data: { confirm: t('please_confirm') },
                      class: button_classes_danger %>
pabois's avatar
pabois committed
          </div>
Arnaud Levy's avatar
Arnaud Levy committed
        </td>
      </tr>
    <% end %>
  </tbody>
</table>

pabois's avatar
pabois committed
<% content_for :action_bar_right do %>
Arnaud Levy's avatar
Arnaud Levy committed
  <%= link_to t('create'), new_server_language_path, class: button_classes %>
<% end %>