opf/openproject

View on GitHub
app/views/custom_actions/index.html.erb

Summary

Maintainability
Test Coverage
<% html_title t(:label_administration), t('custom_actions.plural') -%>
<%= toolbar title: t('custom_actions.plural') do %>
  <li class="toolbar-item">
    <%= link_to new_custom_action_path,
                { class: 'button -primary',
                  aria: { label: t('custom_actions.new') },
                  title: t('custom_actions.new') } do %>
      <%= op_icon('button--icon icon-add') %>
      <span class="button--text"><%= CustomAction.model_name.human %></span>
    <% end %>
  </li>
<% end %>

<section class="admin--edit-section">
  <%= render(::CustomActions::TableComponent.new(rows: @custom_actions)) %>
</section>