Organisation listing slightly modified

Refs #165
This commit is contained in:
echarp 2020-02-04 21:22:42 +01:00
parent 811b4bc0aa
commit 8101f07566
3 changed files with 11 additions and 5 deletions

View File

@ -22,6 +22,8 @@ $(document).on 'ajax:success', '.pagination .next a', (event, data) ->
# Clicking on a table.list row
visit = (elt) =>
elt.closest('tr').addClass('view').click ->
Turbolinks.visit elt.attr 'href'
elt.closest('tr').addClass('view').click (event) ->
target = $(event.target)
unless target.attr('target')? or target.parents('a').attr('target')?
Turbolinks.visit elt.attr 'href'

View File

@ -1,4 +1,4 @@
%tr{ class: orga.active ? 'active' : 'inactive' }
%tr{ class: orga.active ? 'active' : 'inactive', title: orga.tag_list }
%td.kind
- if orga.kind
%em.fa{ class: "fa-#{orga.kind.icon}",
@ -12,11 +12,15 @@
%td.updated_at
- if orga.updated_at.present?
= l orga.updated_at.to_date
%td.tags{ title: orga.tag_list }
%td.tags
- if orga.tags.count > 1
%em.fa.fa-tags
- elsif orga.tags.count.positive?
%em.fa.fa-tag
%td.url
- if orga.url
= link_to orga.url, target: '_blank' do
%em.fa.fa-external-link-alt
%td.view
= link_to orga_path orga, q: params[:q].permit, page: params[:page] do
%em.fa.fa-arrow-circle-right

View File

@ -18,4 +18,4 @@
%tfoot
%tr
%th(colspan='12')= paginate @orgas
%th(colspan='9')= paginate @orgas