<%= job_title.grade %> <%= button_to({ action: 'move_lower', id: job_title }, method: :patch) do %> <% end %> <%= button_to({ action: 'move_higher', id: job_title }, method: :patch) do %> <% end %> <%= job_title.name %> <%= job_title.description %> <% if job_title.department_id == @department.id %> <%= job_title.department.full_name %> <% elsif job_title.department %> <%= link_to job_title.department.full_name, admin_department_job_titles_path(job_title.department_id) %> <% else %> <%= link_to t('org.admin.job_titles.index.title'), admin_super_job_titles_path %> <% end %>
<% job_title.roles.pluck(:name).each do |role| %> <%= role %> <% end %> <%= link_to({ controller: 'roled/admin/who_roles', action: 'edit', who_type: 'JobTitle', who_id: job_title.id }, aria: { label: t('roled.admin.who_roles.edit.title') }) do %> <% end %>
<% if job_title.department_id == @department.id %> <%= link_to({ action: 'edit', id: job_title.id }, data: { turbo_frame: 'modal' }, aria: { label: t('.edit') }, class: 'button is-small is-rounded is-light') do %> <% end %> <% end %> <% if job_title.super_job_title %> <%= form_with theme: nil, scope: nil, url: { action: 'destroy', id: job_title.id }, method: :delete, data: { controller: 'input' } do |f| %> <%= f.check_box :department_id, checked: true, data: { input_target: 'checkbox' }, id: nil, class: 'switch is-rounded' %> <% end %> <% else %> <%= button_to({ action: 'destroy', id: job_title.id }, method: :delete, aria: { label: t('.destroy') }, data: { confirm: t('.confirm') }, class: 'button is-small is-rounded is-light') do %> <% end %> <% end %>