Permalink
Browse files

Use organisation logos, not tags on the ministerial role page

The CSS for this is pretty horrible.  Sorry.
  • Loading branch information...
1 parent 7874cec commit 6c1e3fc7cce74d5652c476166ebea72e1c73d630 @tomafro tomafro committed Feb 28, 2012
@@ -67,7 +67,7 @@ $organisation_brands:
}
}
- .document_page {
+ .document_page, .ministerial_role_page {
#document_organisations {
.ministerial-department {
&.#{$org_class} {
@@ -95,7 +95,7 @@ $organisation_brands:
}
}
- .document_page {
+ .document_page, .ministerial_role_page {
#document_organisations {
.ministerial-department {
span.organisation_logo_small {
@@ -119,7 +119,7 @@ $organisation_brands:
@include add_styles_for_org($name, $color, false, false);
}
-
+
.organisation.ministerial-department.ministry-of-defence {
.page_header {
h1.name {
@@ -3,9 +3,9 @@
@import "../shared/utils/clearfix";
@import "organisation_brands";
-#content {
+#content {
@include clearfix;
-
+
.document_page {
section.page_header {
@@ -138,20 +138,20 @@
}
}
}
-
+
section#document_organisations,
section#document_ministers {
background-color: #EEE;
padding: 0.75em 3% 0 3%;
}
-
+
section#document_organisations {
ul {
margin-bottom: 0;
padding-bottom: 0.75em;
}
}
-
+
section#document_ministers {
ul {
padding-bottom: 0.75em;
@@ -168,11 +168,11 @@
/* padding:0.12em 0 0 0.575em;*/
line-height:1.125em;
}
-
+
&.ministerial-department {
span.organisation_logo_small {
margin-bottom: 0;
-
+
a {
position: relative;
bottom: -0.2em;
@@ -88,8 +88,12 @@
margin-bottom: 1em;
}
- .responsibilities {
- padding-top: 1em;
+ #document_organisations {
+ padding-top: 6px;
+ float: right;
+ }
+
+ .responsibilities .content {
@include type-24;
@include georgia;
}
@@ -110,5 +114,26 @@
display: none;
}
}
+
+ section#document_organisations .organisations .organisation {
+ span.organisation_logo_small {
+ @include type-16;
+ display:block;
+ /* padding:0.12em 0 0 0.575em;*/
+ line-height:1.125em;
+ }
+
+ &.ministerial-department {
+ span.organisation_logo_small {
+ margin-bottom: 0;
+
+ a {
+ position: relative;
+ bottom: -0.2em;
+ text-decoration:none;
+ }
+ }
+ }
+ }
}
}
@@ -3,32 +3,42 @@
<section class="g4 page_header ministerial_role minister">
<h1 class="role_name"><%= @ministerial_role.name %></h1>
<h2 class="current_person_name"><%= @ministerial_role.current_person_name %></h2>
- <div class="meta">
+ </section>
+
+ <div class="g4f">
+ <section class="g1" id="document_organisations">
+ <h1 class="visuallyhidden">Organisations</h1>
+ <ul class="organisations">
<% @ministerial_role.organisations.each do |organisation| %>
- <%= link_to organisation_display_name(organisation), organisation_path(organisation), class: "organisation tag", id: dom_id(organisation) %>
+ <%= content_tag_for(:li, organisation, :class => organisation_logo_classes(organisation)) do %>
+ <span class="organisation_logo_small">
+ <%= link_to format_with_html_line_breaks(h(organisation.logo_formatted_name)), organisation_path(organisation) %>
+ </span>
+ <% end %>
<% end %>
- </div>
- </section>
+ </ul>
+ </section>
- <% unless @ministerial_role.responsibilities.blank? %>
- <section class="g4f responsibilities">
- <h3 class="visuallyhidden">Responsibilities</h3>
- <div class="g3 content"><%= govspeak_to_html @ministerial_role.responsibilities %></div>
- </section>
- <% end %>
+ <% unless @ministerial_role.responsibilities.blank? %>
+ <section class="g3 responsibilities">
+ <h3 class="visuallyhidden">Responsibilities</h3>
+ <div class="content"><%= govspeak_to_html @ministerial_role.responsibilities %></div>
+ </section>
+ <% end %>
- <section class="g4 current_person">
- <div class="g2f biography">
- <h3 class="visuallyhidden">Biography</h3>
- <%= govspeak_to_html(@ministerial_role.current_person_biography) %>
- </div>
- <div class="g1 image">
- <figure class="img">
- <%= image_for_ministerial_role @ministerial_role %>
- <figcaption class="name"><%= @ministerial_role.current_person_name %></figcaption>
- </figure>
- </div>
- </section>
+ <section class="g3 current_person">
+ <div class="g2f biography">
+ <h3 class="visuallyhidden">Biography</h3>
+ <%= govspeak_to_html(@ministerial_role.current_person_biography) %>
+ </div>
+ <div class="g1 image">
+ <figure class="img">
+ <%= image_for_ministerial_role @ministerial_role %>
+ <figcaption class="name"><%= @ministerial_role.current_person_name %></figcaption>
+ </figure>
+ </div>
+ </section>
+ </div>
<section class="g4f documents">
<% if @announcements.any? %>
@@ -35,7 +35,7 @@
Then /^I should see that the minister is associated with the "([^"]*)"$/ do |organisation_name|
organisation = Organisation.find_by_name!(organisation_name)
- assert page.has_css?(record_css_selector(organisation), text: organisation.name), "organisation was missing"
+ assert page.has_css?(record_css_selector(organisation)), "organisation was missing"
end
Then /^I should see that the minister has a biography "([^"]*)"$/ do |biography|

0 comments on commit 6c1e3fc

Please sign in to comment.