Cleaner tables, particularly for the tighest screens. Refs #14, #24

This commit is contained in:
echarp 2016-02-27 18:54:57 +01:00
parent 10fa69eb89
commit fbeba30cd1
5 changed files with 38 additions and 23 deletions

View File

@ -117,8 +117,6 @@ main, body.mce-content-body
text-align: left text-align: left
ul, ol ul, ol
text-align: left text-align: left
li
margin-left: 2em
p p
text-align: justify text-align: justify
&.label &.label

View File

@ -1,7 +1,7 @@
@import compass @import compass
.quantity .quantity
text-align: right text-align: right !important
white-space: nowrap white-space: nowrap
table table
@ -20,6 +20,9 @@ table
font-size: larger font-size: larger
td td
padding: 0.2em padding: 0.2em
text-align: left
&.updated_at
text-align: center
dl dl
margin: 1em auto margin: 1em auto

View File

@ -62,10 +62,10 @@
form#orga_search form#orga_search
display: none display: none
body.events.index table body.index
thead table thead
display: none display: none
tr td &.events table tr td
clear: both clear: both
width: auto width: auto
height: auto height: auto
@ -79,6 +79,20 @@
.day_number .day_number
float: right float: right
&.versions, &.orgas
table tbody
tr td
width: auto
padding: 0 0.2em
display: block
&:first-child
float: left
td + td + td
display: inline-block
td:first-child + td
width: 100%
display: block
dl dl
dt dt
min-width: auto min-width: auto

View File

@ -9,7 +9,7 @@
%table.list.autopagerize_page_element %table.list.autopagerize_page_element
%thead %thead
%th.kind= sort_link @search, :kind_name, Orga.human_attribute_name(:kind) %th
%th.name= sort_link @search, :name %th.name= sort_link @search, :name
%th.city= sort_link @search, :city %th.city= sort_link @search, :city
%th.department= sort_link @search, :department %th.department= sort_link @search, :department
@ -18,46 +18,46 @@
%th.tags= sort_link @search, :tags, Orga.human_attribute_name(:tags) %th.tags= sort_link @search, :tags, Orga.human_attribute_name(:tags)
%th.updated_at= sort_link @search, %th.updated_at= sort_link @search,
:updated_at, Orga.human_attribute_name(:updated_at) :updated_at, Orga.human_attribute_name(:updated_at)
%th.url/ %th
%th.diaspora/ %th
%th.feed/ %th
%th.view/ %th.view/
%th.edit/ %th.edit/
%tbody %tbody
- @orgas.each do |orga| - @orgas.each do |orga|
%tr{ class: orga.active ? 'active' : 'inactive' } %tr{ class: orga.active ? 'active' : 'inactive' }
%td %td.kind
- if orga.kind - if orga.kind
%em.fa{ class: "fa-#{orga.kind.icon}", %em.fa{ class: "fa-#{orga.kind.icon}",
title: Kind.human_attribute_name("name_#{orga.kind.name}") } title: Kind.human_attribute_name("name_#{orga.kind.name}") }
%td %td.name
= orga.name = orga.name
- if orga.url =~ /^http/ - if orga.url =~ /^http/
= image_tag orga.url + '/favicon.ico', alt: '', class: :favicon = image_tag orga.url + '/favicon.ico', alt: '', class: :favicon
%td= orga.city %td.city= orga.city
%td= orga.department %td.department= orga.department
%td= orga.region %td.region= orga.region
%td= orga.tags %td.tags= orga.tags
%td %td.updated_at
- if orga.updated_at.present? - if orga.updated_at.present?
= l orga.updated_at.to_date = l orga.updated_at.to_date
%td %td.url
- if orga.url.present? - if orga.url.present?
= link_to orga.url do = link_to orga.url do
%em.fa.fa-external-link{ title: Orga.human_attribute_name(:url) } %em.fa.fa-external-link{ title: Orga.human_attribute_name(:url) }
%td %td.diaspora
- if orga.diaspora.present? - if orga.diaspora.present?
= link_to orga.diaspora do = link_to orga.diaspora do
%em.fa.fa-bullhorn{ title: Orga.human_attribute_name(:diaspora) } %em.fa.fa-bullhorn{ title: Orga.human_attribute_name(:diaspora) }
%td %td.feed
- if orga.feed.present? - if orga.feed.present?
= link_to orga.feed do = link_to orga.feed do
%em.fa.fa-rss{ title: Orga.human_attribute_name(:feed) } %em.fa.fa-rss{ title: Orga.human_attribute_name(:feed) }
%td %td.view
= link_to orga_path(orga, q: params[:q], page: params[:page]) do = link_to orga_path(orga, q: params[:q], page: params[:page]) do
%em.fa.fa-eye %em.fa.fa-eye
%td %td.edit
- if orga.secret.nil? || user_signed_in? - if orga.secret.nil? || user_signed_in?
= link_to edit_orga_path orga do = link_to edit_orga_path orga do
%em.fa.fa-pencil %em.fa.fa-pencil

View File

@ -4,7 +4,7 @@
%table.list.autopagerize_page_element %table.list.autopagerize_page_element
%thead %thead
%th.event= sort_link @search, :event %th.event
%th.whodunnit= sort_link @search, :whodunnit %th.whodunnit= sort_link @search, :whodunnit
%th.object= sort_link @search, :object_id %th.object= sort_link @search, :object_id
%th.created_at= sort_link @search, :created_at %th.created_at= sort_link @search, :created_at