From b10d5a73282829ebb4d8aacc135023fa7d5cb1e4 Mon Sep 17 00:00:00 2001 From: echarp Date: Wed, 1 May 2019 20:45:33 +0200 Subject: [PATCH] Refs #146 Buttons to view or edit an organisation have an appropriate title, plus the tag column is not so large anymore --- app/assets/stylesheets/all.sass | 8 ++++---- app/assets/stylesheets/list.sass | 2 +- app/assets/stylesheets/pages.sass | 3 --- app/views/orgas/index.html.haml | 31 ++++++++++++++----------------- config/locales/views/en.yml | 2 ++ config/locales/views/fr.yml | 2 ++ config/locales/views/pt-BR.yml | 2 ++ 7 files changed, 25 insertions(+), 25 deletions(-) diff --git a/app/assets/stylesheets/all.sass b/app/assets/stylesheets/all.sass index c331dd86..81dbfbbf 100644 --- a/app/assets/stylesheets/all.sass +++ b/app/assets/stylesheets/all.sass @@ -90,12 +90,12 @@ header.top nav float: right font-size: smaller - margin-top: -3.1em - form - margin-top: 1.9em + margin-top: -3em + .digest, form + margin-top: 2em &:hover nav margin-top: 0 - form + .digest, form margin-top: 0 main, body.mce-content-body diff --git a/app/assets/stylesheets/list.sass b/app/assets/stylesheets/list.sass index 269b656c..a065d6ea 100644 --- a/app/assets/stylesheets/list.sass +++ b/app/assets/stylesheets/list.sass @@ -21,7 +21,7 @@ table td padding: 0.2em text-align: left - &.updated_at + &.kind, &.updated_at text-align: center dl diff --git a/app/assets/stylesheets/pages.sass b/app/assets/stylesheets/pages.sass index 44abdef7..4910e4e4 100644 --- a/app/assets/stylesheets/pages.sass +++ b/app/assets/stylesheets/pages.sass @@ -5,6 +5,3 @@ body.pages main .digest float: right font-size: larger - margin-top: 1em - span - margin-left: 1em diff --git a/app/views/orgas/index.html.haml b/app/views/orgas/index.html.haml index bdf037ac..4a4e5b2a 100644 --- a/app/views/orgas/index.html.haml +++ b/app/views/orgas/index.html.haml @@ -12,15 +12,8 @@ %th.department= sort_link @search, :department %th.region= sort_link @search, :region_name, Orga.human_attribute_name(:region) - %th.tags= sort_link @search, :tags, Orga.human_attribute_name(:tags) %th.updated_at= sort_link @search, - :updated_at, Orga.human_attribute_name(:updated_at) - %th - %th - %th - %th.view/ - %th.edit/ - + :updated_at %tbody - @orgas.each do |orga| %tr{ class: orga.active ? 'active' : 'inactive' } @@ -34,26 +27,30 @@ %td.city= orga.city %td.department= orga.department %td.region= orga.region - %td.tags= orga.tag_list %td.updated_at - if orga.updated_at.present? = l orga.updated_at.to_date - %td.url + %td.tags{ title: orga.tag_list } + - if orga.tags.count > 1 + %em.fa.fa-tags + - elsif orga.tags.count.positive? + %em.fa.fa-tag + %td.url{ title: Orga.human_attribute_name(:url) } - if orga.url.present? = link_to orga.url do - %em.fa.fa-external-link-alt{ title: Orga.human_attribute_name(:url) } - %td.diaspora + %em.fa.fa-external-link-alt + %td.diaspora{ title: Orga.human_attribute_name(:diaspora) + '*' } - if orga.diaspora.present? = link_to orga.diaspora do - %em.fa{ title: Orga.human_attribute_name(:diaspora) + '*' } - %td.feed + %em.fa + %td.feed{ title: Orga.human_attribute_name(:feed) } - if orga.feed.present? = link_to orga.feed do - %em.fa.fa-rss{ title: Orga.human_attribute_name(:feed) } - %td.view + %em.fa.fa-rss + %td.view{ title: t('.view') } = link_to orga_path orga, q: params[:q].permit, page: params[:page] do %em.fa.fa-eye - %td.edit + %td.edit{ title: t('.edit') } - if orga.secret.nil? || user_signed_in? = link_to edit_orga_path orga do %em.fa.fa-edit diff --git a/config/locales/views/en.yml b/config/locales/views/en.yml index d45da1fc..bd3cc7b4 100644 --- a/config/locales/views/en.yml +++ b/config/locales/views/en.yml @@ -256,6 +256,8 @@ description." index: title: Organisations new: Add an organisation + view: View organisation + edit: Edit organisation aside: links: See also actions: Actions diff --git a/config/locales/views/fr.yml b/config/locales/views/fr.yml index 9c4fed97..5a90b7d1 100644 --- a/config/locales/views/fr.yml +++ b/config/locales/views/fr.yml @@ -272,6 +272,8 @@ description plus complète." index: title: Organisations new: Ajouter une organisation + view: Afficher l'organisation + edit: Éditer l'organisation aside: links: Voir aussi actions: Actions diff --git a/config/locales/views/pt-BR.yml b/config/locales/views/pt-BR.yml index 34bf98d6..0ff265cc 100644 --- a/config/locales/views/pt-BR.yml +++ b/config/locales/views/pt-BR.yml @@ -255,6 +255,8 @@ descrição mais completa." index: title: Organizações new: Adicione uma organização + view: Veja organização + edit: Editar organização aside: links: Veja também actions: Ações