diff --git a/app/assets/stylesheets/all.css.sass b/app/assets/stylesheets/all.css.sass index f2ff416d..9fd08b2a 100644 --- a/app/assets/stylesheets/all.css.sass +++ b/app/assets/stylesheets/all.css.sass @@ -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 diff --git a/app/assets/stylesheets/list.css.sass b/app/assets/stylesheets/list.css.sass index 601bc756..cdb417ac 100644 --- a/app/assets/stylesheets/list.css.sass +++ b/app/assets/stylesheets/list.css.sass @@ -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 diff --git a/app/assets/stylesheets/lugs.sass b/app/assets/stylesheets/lugs.sass index 15d272bc..46e6c3ce 100644 --- a/app/assets/stylesheets/lugs.sass +++ b/app/assets/stylesheets/lugs.sass @@ -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 diff --git a/app/controllers/lugs_controller.rb b/app/controllers/lugs_controller.rb index 2599e76a..2e0240c8 100644 --- a/app/controllers/lugs_controller.rb +++ b/app/controllers/lugs_controller.rb @@ -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 diff --git a/app/views/lugs/show.html.haml b/app/views/lugs/show.html.haml index aac22bd2..7260c6e4 100644 --- a/app/views/lugs/show.html.haml +++ b/app/views/lugs/show.html.haml @@ -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