Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Improve the contact display.

I would've like to have used the class 'contact', but that is defined in static for something else. It would be great if there weren't any very-generic unscoped class definitions in static :(
  • Loading branch information...
commit 6ae63cc77f6c6f5435c626451659a4376aafbeb3 1 parent 9b97a23
@lazyatom lazyatom authored
View
11 app/assets/stylesheets/website/organisations.scss
@@ -43,7 +43,6 @@
}
.page_detail .adr {
- margin-bottom: 1.5em;
p {
margin-bottom: 0;
}
@@ -51,10 +50,18 @@
p.postal-code {
margin-bottom: 0.857em;
}
+ }
+
+ .organisation_contact {
+ margin-bottom: 1em;
+
+ h3 {
+ margin-bottom: 0.25em;
+ }
p.email, p.tel {
@include type-12;
- margin-bottom: 0;
+ margin-bottom: 0.25em;
span.type {
display: none;
View
38 app/views/organisations/show.html.erb
@@ -25,26 +25,30 @@
<div class="g1 hcard">
<% @organisation.contacts.each do |contact| %>
- <div class="adr">
- <h3><%= contact.description %></h3>
+ <div class="organisation_contact">
<% if contact.address.present? %>
- <p class="fn org name"><%= @organisation.name %></p>
- <% if @organisation.acronym.present? %>
- <p class="nickname"><%= @organisation.acronym %></p>
- <% end %>
- <p class="street-address"><%= format_with_html_line_breaks(contact.address) %></p>
- <p class="postal-code"><%= contact.postcode %></p>
+ <div class="adr">
+ <h3><%= contact.description %></h3>
+ <p class="fn org name"><%= @organisation.name %></p>
+ <% if @organisation.acronym.present? %>
+ <p class="nickname"><%= @organisation.acronym %></p>
+ <% end %>
+ <p class="street-address"><%= format_with_html_line_breaks(contact.address) %></p>
+ <p class="postal-code"><%= contact.postcode %></p>
+ </div>
+ <% else %>
+ <h3><%= contact.description %></h3>
+ <% end %>
+ <% if contact.email.present? %>
+ <p class="email"><span class="type">Email</span> <%= mail_to contact.email, contact.email, :class => "email" %></p>
+ <% end %>
+ <% if contact.number.present? %>
+ <p class="tel"><span class="type"><%= contact.description %></span><%= contact.number %></p>
+ <% end %>
+ <% if contact.mappable? %>
+ <p><%= link_to_google_map(contact) %></p>
<% end %>
</div>
- <% if contact.email.present? %>
- <p class="email"><span class="type">Email</span> <%= mail_to contact.email, contact.email, :class => "email" %></p>
- <% end %>
- <% if contact.number.present? %>
- <p class="tel"><span class="type"><%= contact.description %></span><%= contact.number %></p>
- <% end %>
- <% if contact.mappable? %>
- <p><%= link_to_google_map(contact) %></p>
- <% end %>
<% end %>
</div>
</div>
Please sign in to comment.
Something went wrong with that request. Please try again.