Évolution de la page pour association

This commit is contained in:
echarp 2014-10-13 22:50:59 +02:00
parent 0cc1c4d0f6
commit 0d06f2ee69
5 changed files with 61 additions and 14 deletions

View File

@ -2,7 +2,6 @@
@import font-awesome
*
height: auto
padding: 0
max-width: 100%
margin-left: auto
@ -138,6 +137,9 @@ main, body.mce-content-body
min-height: 100%
font-family: georgia, serif
iframe
border: none
fieldset
border: none
margin: 1em auto

View File

@ -30,13 +30,14 @@ dl
text-align: right
dd
padding: 0.2em 1em
border-top: 1px solid #999
text-align: left
&.quantity
text-align: right
padding-right: 16em
h3
display: inline
dt + dd + dt +dd
border-top: 1px solid #999
.view_link:link, .edit_link:link, .delete_link:link
font-size: 0

View File

@ -36,3 +36,18 @@ form#lug_search
color: #2E97FF
span.label
display: none
body.lugs.show
iframe
display: block
max-width: 100%
margin-bottom: 2em
+border-radius(1em)
dl
margin-left: 4%
margin-right: 4%
dl, fieldset
display: inline-block
min-width: 30em
vertical-align: top

View File

@ -10,6 +10,9 @@ class LugsController < ApplicationController
def show
@search = Lug.search params[:q]
@events_future = Event.moderated.future.tag @lug.name
@events_past = Event.moderated.past.tag @lug.name
end
private

View File

@ -1,17 +1,15 @@
- set_lug_meta
%h2
%em.fa.fa-users
= t 'lugs.search.title', entity: Lug.model_name.human
= render 'search'
%h2
= image_tag @lug.url+'/favicon.ico', alt: '', class: :favicon
= title @lug.name
%iframe(src="#{@lug.url}" width='1000' height='300' frameborder='none'
allowTransparency='true')
%dl
%dt= Lug.human_attribute_name :name
%dd
%h3
= image_tag @lug.url+'/favicon.ico', alt: '', class: :favicon
= title @lug.name
- if @lug.city.present?
%dt= Lug.human_attribute_name :city
%dd= @lug.city
@ -19,14 +17,42 @@
%dt= Lug.human_attribute_name :department
%dd= @lug.department
- if @lug.related_region.present?
%dt= Lug.human_attribute_name :related_region
%dt= Lug.human_attribute_name :region
%dd= @lug.related_region
- if @lug.url.present?
%dt= Lug.human_attribute_name :url
%dd= link_to @lug.url, @lug.url
%iframe(src="#{@lug.url}" width='1000' height='400' frameborder='none'
allowTransparency='true')
- if @events_future.any? || @events_past.any?
%fieldset
%legend
%em.fa.fa-calendar
= Event.model_name.human.pluralize
%ul
- @events_future.order('start_time asc').each do |event|
%li
= link_to event do
- if event.locality?
%em.locality.fa.fa-globe(title="#{Event.human_attribute_name :locality} #{t 'attributes.locality_1'}")
- else
%em.locality.fa.fa-shield(title="#{Event.human_attribute_name :locality} #{t 'attributes.locality_0'}")
%em.city= event.city
= event.title
= display_date event
%hr
%ul
- @events_past.order('start_time desc').each do |event|
%li
= link_to event do
- if event.locality?
%em.locality.fa.fa-globe(title="#{Event.human_attribute_name :locality} #{t 'attributes.locality_1'}")
- else
%em.locality.fa.fa-shield(title="#{Event.human_attribute_name :locality} #{t 'attributes.locality_0'}")
%em.city= event.city
= event.title
= display_date event
%nav
= link_to lugs_path(q: params[:q], page: params[:page]), class: :back do