Skip to content

Instantly share code, notes, and snippets.

@styson
Created June 11, 2013 17:15
Show Gist options
  • Save styson/5758781 to your computer and use it in GitHub Desktop.
Save styson/5758781 to your computer and use it in GitHub Desktop.
historyListing.spark
<use master="" />
<viewdata model="Agent.Support.Handlers.template.history.listing.HistoryListingModel" />
{[ _.each(groups, function(group) { ]}
<div class="history-group row-fluid">
<div class="rail">
<time datetime="" class="fixed_date">
<em>{{ group.date }}</em><hr/>
<strong>{{ group.month }}</strong>
{{ group.year }}
</time>
</div>
<div class="span9 history-items">
{[ _.each(group.historyItems, function(item) { ]}
<article class="history-item">
<header>
<h4>
<span class="action-taken">{! item.title !}</span>
<small>
<span class="date-ago" data-time="{{ item.when }}">{{ item.when }}</span>
<span>${ UserMessageKeys.BY }</span> <a data-link="spa" class="history-entry-owner" href='${ this.MustacheUrlFor<Agent.Support.Handlers.support.employee.EmployeeRequest>("item.who.login") }'>{{ item.who.name }}</a>
(<span class="time-format" data-time="{{ item.when }}">{{ item.when }}</span>)
</small>
</h4>
</header>
<section>
<p>{! item.detail !}</p>
{[ if (!_.isEmpty(item.internal)) { ]}
<div class="internal">
<span class="label label-important">${ UserMessageKeys.INTERNAL }</span>{! item.internal !}
</div>
{[ } ]}
</section>
</article>
{[ }); ]}
</div>
</div>
{[ }); ]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment