Skip to content

Instantly share code, notes, and snippets.

@senorgeno
Created October 23, 2014 04:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save senorgeno/9de66bf93110218f9c14 to your computer and use it in GitHub Desktop.
Save senorgeno/9de66bf93110218f9c14 to your computer and use it in GitHub Desktop.
<div class="row">
<dl class="dl-horizontal">
<dt>Primary :</dt>
<dd>
<%= fixDiscipline(data.Application.Disciplines[0].Title, data.Application.Disciplines[0].SkillLevel) %>
</dd>
<dt>Secondary :</dt>
<dd><%= fixDiscipline(data.Application.Disciplines[1].Title, data.Application.Disciplines[1].SkillLevel) %></dd>
<dt>Additional :</dt>
<dd><% _.each(data.Application.Disciplines, function (Discipline, index) { %>
<% if (index > 1) { %>
<%= fixDiscipline(Discipline.Title, Discipline.SkillLevel) %><% if ( Discipline != _.last(data.Application.Disciplines) ) { %>,<% } %>
<% } %>
<% }); %>
<% if(data.Application.OtherPhotography) { %><% if (data.Application.Disciplines.length > 0) { %>, <% } %><%= data.Application.OtherPhotography %><% } %></dd>
</dl>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment