lib/templates/default/steptransformers/html/transformers.erb in cucumber-in-the-yard-1.7.1 vs lib/templates/default/steptransformers/html/transformers.erb in cucumber-in-the-yard-1.7.2
- old
+ new
@@ -1,46 +1,61 @@
<% @items.each do |item| %>
-<div class="stepdef">
- <a name="<%= anchor_for item %>"></a>
- <div class="title">
- <span class="pre"><%= item.keyword %></span>
- <span class="name"><%= item.value %></span>
- <div style="float: right;"><%= h( item.location ) %></div>
- </div>
- <div>
- <%= T('docstring').run(options.dup.merge({:object => item})) %>
- </div>
- <div class="method_details_list">
- <table class="source_code">
- <tr>
- <td>
- <pre class="lines"><%= "" %><%= h format_lines(item) %></pre>
- </td>
- <td>
- <pre class="code"><%= "" %><%= html_syntax_highlight item.source %></pre>
- </td>
- </tr>
- </table>
- </div>
+ <div class="transformer <%= @item_type.gsub(/\s/,'') %>">
+ <a name="<%= anchor_for item %>"></a>
+ <div class="title">
+ <span class="pre"><%= h item.keyword %></span>
+ <span class="name"><%= h item.value %></span>
+ <a style="float: right;" href="http://rubular.com/?regex=<%= urlencode item.value %>" target="_blank">Rubular</a>
+ <div style="clear: both;"></div>
+ </div>
- <div class="steps">
- <% if item.steps && !item.steps.empty? %>
- <% item.steps.each_with_index do |step,step_index| %>
- <div class="step <%= (step_index + 1) % 2 == 0 ? 'even' : 'odd' %>">
- <span class="predicate">
- <%= step.keyword %>
- </span>
- <span class="defined">
- <%= link_transformed_step(step) %>
- </span>
- <div class="definition"><a href="<%= url_for step.scenario.feature %>"><%= h(step.location) %></a></div>
- </div>
- <% end %>
- <% else %>
- <span class="undefined">No steps were found to match this <%= @item_type %>.</span>
- <% end%>
- </div>
+ <div class="details">
-</div>
+ <div class="meta" style="clear: right;">
+ <div class="file"><%= h item.location %></div>
+ </div>
+
+ <!-- Comments -->
+ <div>
+ <%= T('docstring').run(options.dup.merge({:object => item})) %>
+ </div>
+
+ <!-- Source Code -->
+ <div class="method_details_list">
+ <table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines"><%= "" %><%= h format_lines(item) %></pre>
+ </td>
+ <td>
+ <pre class="code"><%= "" %><%= html_syntax_highlight item.source %></pre>
+ </td>
+ </tr>
+ </table>
+ </div>
+
+ <!-- Matching Step Instances -->
+ <div class="steps">
+ <% if item.steps && !item.steps.empty? %>
+ <% item.steps.each_with_index do |step,step_index| %>
+ <div class="step <%= (step_index + 1) % 2 == 0 ? 'even' : 'odd' %>">
+ <span class="predicate">
+ <%= h step.keyword %>
+ </span>
+ <span class="defined">
+ <%= link_transformed_step(step) %>
+ </span>
+ <a class="definition" href="<%= url_for step.scenario.feature %>"><%= h step.location %></a>
+ <div style="clear: both;"></div>
+ </div>
+ <% end %>
+ <% else %>
+ <div class="undefined">No steps were found to match this <%= @item_type %>.</div>
+ <% end%>
+ </div>
+
+ </div>
+
+ </div>
<% end %>