Fix linting issues for app/views/html_variants (#1872) [ci skip]

This commit is contained in:
Arnelle Balane 2019-02-27 00:56:26 +08:00 committed by Mac Siri
parent 1fc33cdd10
commit c861fad573
7 changed files with 38 additions and 35 deletions

View file

@ -14,7 +14,6 @@
</div>
<% end %>
<%= form_for(@html_variant) do |f| %>
<% if @html_variant.new_record? %>
<%= f.label :name %>

View file

@ -120,4 +120,4 @@
color: white;
font-weight: bold;
}
</style>
</style>

View file

@ -1,23 +1,23 @@
<div class="html-variants-page-single-variant <%= "html-variants-page-single-big" if html_variant.group == "article_show_below_article_cta" %>">
<%= html_variant.group %> | @<%= html_variant.user.username %>:
<h3>
<a href="/html_variants/<%= html_variant.id %>"><%= html_variant.name %></a>
</h3>
<iframe src="/html_variants/<%= html_variant.id %>"></iframe>
<div class="html-variants-page-single-variant-details">
<% if html_variant.published %>
<span class='pill published'>published</span>
<a class='pill' href="/html_variants/new?fork_id=<%= html_variant.id %>">fork</a>
<% else %>
<a class='pill' href="/html_variants/<%= html_variant.id %>/edit">view/edit</a>
<% end %>
<% if html_variant.approved %>
<span class='pill approved'><%= html_variant.success_rate %></span>
<% elsif admin %>
<%= form_for(html_variant) do |f| %>
<%= f.hidden_field :approved, value: "true" %>
<%= f.submit "APPROVE" %>
<% end %>
<% end %>
</div>
</div>
<div class="html-variants-page-single-variant <%= "html-variants-page-single-big" if html_variant.group == "article_show_below_article_cta" %>">
<%= html_variant.group %> | @<%= html_variant.user.username %>:
<h3>
<a href="/html_variants/<%= html_variant.id %>"><%= html_variant.name %></a>
</h3>
<iframe src="/html_variants/<%= html_variant.id %>"></iframe>
<div class="html-variants-page-single-variant-details">
<% if html_variant.published %>
<span class='pill published'>published</span>
<a class='pill' href="/html_variants/new?fork_id=<%= html_variant.id %>">fork</a>
<% else %>
<a class='pill' href="/html_variants/<%= html_variant.id %>/edit">view/edit</a>
<% end %>
<% if html_variant.approved %>
<span class='pill approved'><%= html_variant.success_rate %></span>
<% elsif admin %>
<%= form_for(html_variant) do |f| %>
<%= f.hidden_field :approved, value: "true" %>
<%= f.submit "APPROVE" %>
<% end %>
<% end %>
</div>
</div>

View file

@ -1,7 +1,9 @@
<%= render "page_styles" %>
<div class="html-variants-page" >
<div><a href="/html_variants">👈 View All</a>
<h1><%= @html_variant.name %></h1>
<%= render "form" %>
<div class="html-variants-page">
<div>
<a href="/html_variants">👈 View All</a>
<h1><%= @html_variant.name %></h1>
<%= render "form" %>
</div>
</div>

View file

@ -1,6 +1,6 @@
<%= render "page_styles" %>
<div class="html-variants-page" >
<div class="html-variants-page">
<h1>
HTML Variants <a href="/html_variants/new">New</a>
</h1>
@ -20,4 +20,4 @@
<% end %>
</div>
<%= paginate @html_variants %>
<%= paginate @html_variants %>

View file

@ -1,5 +1,7 @@
<%= render "page_styles" %>
<div class="html-variants-page" >
<div><a href="/html_variants">👈 View All</a>
<%= render "form" %>
<div class="html-variants-page">
<div>
<a href="/html_variants">👈 View All</a>
<%= render "form" %>
</div>
</div>

View file

@ -19,4 +19,4 @@ all: unset;
<%= @html_variant.html.html_safe %>
</div>
</div>
<% end %>
<% end %>