Sha256: ae643ba73a8104c446c014eb5ac3672bccb66f18897a57b4e91782e02b2e05db

Contents?: true

Size: 1.66 KB

Versions: 14

Compression:

Stored size: 1.66 KB

Contents

<% if experiment.active? %>
  <% status = experiment.enabled? ? 'status_enabled' : 'status_disabled' %>
<% else %>
  <% status = 'status_completed' %>
<% end %>
<div class="inner <%= status %>">
<h3>
  <%=vanity_h experiment.name %><span class="type">(<%= experiment.class.friendly_name %>)</span>
  <% if experiment.type == 'ab_test' && experiment.active? && experiment.playground.collecting? %>
    <span class='enabled-links'>
      <% action = experiment.enabled? ? :disable : :enable %>
      
      <% if experiment.enabled? %> <%= I18n.t( 'vanity.enabled' ) %> | <% end %>
      <a title='<%=I18n.t( action, scope: 'vanity.act_on_this_experiment' )%>' href='#'
         data-id='<%= experiment.id %>' data-url='<%= url_for(:action=>action, :e => experiment.id) %>'>
        <%= action %></a>
      <% if !experiment.enabled? %> | <%= I18n.t( 'vanity.disabled' ) %> <% end %>
      
    </span>
  <% end %>
</h3>
<%= experiment.description.to_s.split(/\n\s*\n/).map { |para| vanity_html_safe(%{<p class="description">#{vanity_h para}</p>}) }.join.html_safe %>
<% if flash.notice %>
  <p>
    <%= flash.notice %>
  </p>
<% end %>
<a class="button reset" title="<%= I18n.t('vanity.reset') %>" href="#" data-id="<%= experiment.id %>" data-url="<%= url_for(:action=>:reset, :e=>experiment.id) %>"><%= I18n.t 'vanity.reset' %></a>
<%= render :file => Vanity.template("_" + experiment.type), :locals => {:experiment => experiment} %>
<p class="meta">
  <%= I18n.t('vanity.started_at', :timestamp=>I18n.l(experiment.created_at, :format=>'%a, %b %d')) %>
  <%= ' | '+I18n.t('vanity.completed_at', :timestamp=>I18n.l(experiment.completed_at, :format=>'%a, %b %d')) unless experiment.active? %>
</p>

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
vanity-3.0.0 lib/vanity/templates/_experiment.erb
vanity-2.2.10 lib/vanity/templates/_experiment.erb
vanity-2.2.9 lib/vanity/templates/_experiment.erb
vanity-2.2.8 lib/vanity/templates/_experiment.erb
vanity-2.2.7 lib/vanity/templates/_experiment.erb
vanity-2.2.6 lib/vanity/templates/_experiment.erb
vanity-2.2.4 lib/vanity/templates/_experiment.erb
vanity-2.2.3 lib/vanity/templates/_experiment.erb
vanity-2.2.2 lib/vanity/templates/_experiment.erb
vanity-2.2.1 lib/vanity/templates/_experiment.erb
vanity-2.2.0 lib/vanity/templates/_experiment.erb
vanity-2.1.2 lib/vanity/templates/_experiment.erb
vanity-2.1.1 lib/vanity/templates/_experiment.erb
vanity-2.1.0 lib/vanity/templates/_experiment.erb