forked from ethangunderson/vanity
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rails 3-ified and cleaned up some templates that were blowing up
- Loading branch information
Ryan Neufeld
committed
Nov 25, 2010
1 parent
e482d42
commit dbff09f
Showing
2 changed files
with
9 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
<h3><%=vanity_h experiment.name %> <span class="type">(<%= experiment.class.friendly_name %>)</span></h3> | ||
<%= experiment.description.to_s.split(/\n\s*\n/).map { |para| vanity_html_safe(%{<p class="description">#{vanity_h para}</p>}) }.join %> | ||
<%= render Vanity.template(experiment.type), :experiment=>experiment %> | ||
<h3> | ||
<%=vanity_h experiment.name %> | ||
<span class="type">(<%= experiment.class.friendly_name %>)</span> | ||
</h3> | ||
<%- experiment.description.to_s.split(/\n\s*\n/).each do |para| %> | ||
<p class="description"><%= vanity_h para %></p> | ||
<%- end %> | ||
<%= render :file => Vanity.template("_#{experiment.type}"), :locals => { :experiment=>experiment } %> | ||
<p class="meta">Started <%= experiment.created_at.strftime("%a, %b %d") %> | ||
<%= " | Completed #{experiment.completed_at.strftime("%a, %b %d")}" unless experiment.active? %></p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<ul class="experiments"> | ||
<% experiments.sort_by { |id, experiment| experiment.created_at }.reverse.each do |id, experiment| %> | ||
<li class="experiment <%= experiment.type %>" id="experiment_<%=vanity_h id.to_s %>"> | ||
<%= render Vanity.template("experiment"), :id=>id, :experiment=>experiment %> | ||
<%= render :file => Vanity.template("_experiment"), :locals => {:id=>id, :experiment=>experiment} %> | ||
</li> | ||
<% end %> | ||
</ul> |