From 7b0c1ac6f54912d67f0a0c7bc69ad7030373c07d Mon Sep 17 00:00:00 2001 From: differentreality Date: Sun, 14 Jul 2013 20:59:24 +0300 Subject: [PATCH 1/4] Show first name last name on the schedule --- app/views/schedule/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/schedule/index.html.erb b/app/views/schedule/index.html.erb index fb05a202..7a9851c2 100644 --- a/app/views/schedule/index.html.erb +++ b/app/views/schedule/index.html.erb @@ -52,7 +52,7 @@ <%= event[0].subtitle %>
<% end %> - <%= speaker.public_name %> + <%= "#{speaker.first_name} #{speaker.last_name}" %> <% if event[0].track%>
<%= event[0].track.name %> From 11f75a16d2ba9cd481946798486bde6a4d4c14c3 Mon Sep 17 00:00:00 2001 From: Michal Hrusecky Date: Mon, 15 Jul 2013 12:22:07 +0200 Subject: [PATCH 2/4] Do not use
Using styles instead of hardcoded
tags. --- app/assets/stylesheets/osem.css | 11 ++++++++++- app/views/schedule/index.html.erb | 14 +++++++++++--- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/osem.css b/app/assets/stylesheets/osem.css index 275ad382..a767ed11 100644 --- a/app/assets/stylesheets/osem.css +++ b/app/assets/stylesheets/osem.css @@ -178,4 +178,13 @@ background-image: -webkit-gradient( left: 0; width: 100%; height: 100%; -} \ No newline at end of file +} + +.schedule-title, .schedule-subtitle, .schedule-speaker, .schedule-track { + clear: none; + display: block; +} + +.schedule-subtitle { + color: rgb(185, 74, 72); +} diff --git a/app/views/schedule/index.html.erb b/app/views/schedule/index.html.erb index 7a9851c2..4b4e2aee 100644 --- a/app/views/schedule/index.html.erb +++ b/app/views/schedule/index.html.erb @@ -46,16 +46,24 @@
<%- speaker = event[0].speakers.first || event[0].submitter %> <%= image_tag speaker.gravatar_url, :class => "img-circle pull-right", :alt => speaker.public_name, :title => speaker.public_name, :style => "padding:8px;" %> + - <%= event[0].title %>
+ <%= event[0].title %> +
<% unless event[0].subtitle.empty? %> - <%= event[0].subtitle %>
+ + <%= event[0].subtitle %> + <% end %> + <%= "#{speaker.first_name} #{speaker.last_name}" %> + <% if event[0].track%> -
+ + <%= event[0].track.name %> + <% end -%>
From d27b43f82daf6a03b0de28a27c413bcaf9a7bea3 Mon Sep 17 00:00:00 2001 From: Michal Hrusecky Date: Mon, 15 Jul 2013 12:22:57 +0200 Subject: [PATCH 3/4] Apply styles to all media There are some media dependent parts of styles already and anyway, it's better to have at least some style to begin with. --- app/views/layouts/application.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 9b38d0df..69def2b4 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -6,7 +6,7 @@ %title= content_for?(:title) ? yield(:title) : "OSEM" %meta{:content => "", :name => "description"} %meta{:content => "", :name => "author"} - = stylesheet_link_tag "application" + = stylesheet_link_tag "application", :media => "all" = javascript_include_tag "application" = csrf_meta_tags :javascript From bf1390166a62b55dda2fbc1590fbc2252dfc1975 Mon Sep 17 00:00:00 2001 From: Michal Hrusecky Date: Mon, 15 Jul 2013 12:24:50 +0200 Subject: [PATCH 4/4] First version of schedule printing style --- app/assets/stylesheets/application.css | 1 + .../stylesheets/osem-schedule-print.css | 64 +++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 app/assets/stylesheets/osem-schedule-print.css diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 59f9436e..d81f74af 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -6,4 +6,5 @@ *= require jquery.fileupload-ui *= require jquery-ui-timepicker-addon *= require jquery.dataTables_themeroller + *= require osem-schedule-print */ diff --git a/app/assets/stylesheets/osem-schedule-print.css b/app/assets/stylesheets/osem-schedule-print.css new file mode 100644 index 00000000..54fc3593 --- /dev/null +++ b/app/assets/stylesheets/osem-schedule-print.css @@ -0,0 +1,64 @@ +@media print { + +.navbar { + display: none; +} +.nav li, .tab-pane, #messages, #footer, h2, .text-error, br, .label, .schedule-subtitle, .schedule-track { + display: none; +} +.nav li.active, .tab-pane .active { + display: block; + width: 100%; + text-align: center; + text-size: 12px; + border-style: none; + font-weight: bold; +} +.nav-tabs { + border-bottom-style: none; +} +.nav-tabs > .active > a { + border-style: none; +} +#wrap { + min-height:0px; + height:auto; + margin:0px; + line-height: 12px; + font-size: 10px; +} +#content { + position: absolute; + top: 0px; + left: 0px; + max-width: 210mm !important; + max-height: 297mm !important; + padding: 10px; +} +#schedule td.event { + background-image: none; + border-style:solid; + border-width: 2px; + border-color: black; + line-height: auto; + font-size: 10px; +} +.event img, .img-circle { + display: none; +} +h5 { + font-size: 10px; + line-height: 12px; + margin: 0px; +} +.table th, .table td { + line-height: 12px; + padding: 3px; +} + +.schedule-speaker { + font-weight: normal; + font-style: italic; +} + +}