Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent empty parentheses from showing in site header #155

Merged
merged 2 commits into from Jan 22, 2014

Conversation

@fofr
Copy link
Contributor

@fofr fofr commented Jan 21, 2014

  • In header only show an organisation's abbreviation when present
  • Prevent empty parentheses showing in the header bar if the org abbreviation is blank
* Prevent empty parentheses showing in the header bar if the org
abbreviation is is blank
@@ -37,7 +37,7 @@
</li>
<% if current_user.organisation %>
<li <% if current_page?(organisation_path(current_user.organisation)) %> class="active" <% end %>>
<%= link_to "#{current_user.organisation.title} (#{current_user.organisation.abbreviation})", organisation_path(current_user.organisation), title: 'Your organisation' %>
<%= link_to "#{current_user.organisation.title} #{if current_user.organisation.abbreviation.present? then "(#{current_user.organisation.abbreviation})" end}", organisation_path(current_user.organisation), title: 'Your organisation' %>

This comment has been minimized.

@jennyd

jennyd Jan 21, 2014
Contributor

This would be clearer if "#{current_user.organisation.title} #{if current_user.organisation.abbreviation.present? then "(#{current_user.organisation.abbreviation})" end}" were in a helper method.

jamiecobbett added a commit that referenced this pull request Jan 22, 2014
Prevent empty parentheses from showing in site header
@jamiecobbett jamiecobbett merged commit 983589d into master Jan 22, 2014
@jamiecobbett jamiecobbett deleted the header-abbreviation branch Jan 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants