Skip to content

Commit

Permalink
Update tag show.html.erb to add make wiki page button if none present (
Browse files Browse the repository at this point in the history
…publiclab#1029)

* Update tag show.html.erb to add make wiki page button if none present

* Use fontawesome icons
  • Loading branch information
manish310794 authored and jywarren committed Nov 29, 2016
1 parent daccb7c commit 8cd8a3d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/views/tag/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
<p><%= @wiki.latest.render_body.html_safe.match(/<p>(.+)<\/p>/).to_a.try(:first).to_s.html_safe %></p>
<p><%= link_to("Read More &raquo;", "/wiki/#{params[:id]}") if @wiki.latest.render_body.html_safe.match(/<p>(.+)<\/p>/).length > 1 %></p>
<% end %>
</div>
</div>
<% else %>
<p>This topic has no lead wiki page.</p>
<a class="btn btn-primary" href="/wiki/<%= params[:id] %>"><span class="fa fa-plus fa-white"></span> Add one now</a>
<% end %>

<% if @tags.first %>
Expand Down

0 comments on commit 8cd8a3d

Please sign in to comment.