add artist link on new wiki pages
This commit is contained in:
@@ -71,6 +71,7 @@ class WikiPagesController < ApplicationController
|
|||||||
redirect_to wiki_page_path(@wiki_page)
|
redirect_to wiki_page_path(@wiki_page)
|
||||||
else
|
else
|
||||||
@wiki_page = WikiPage.new(:title => params[:title])
|
@wiki_page = WikiPage.new(:title => params[:title])
|
||||||
|
@artist = Artist.name_matches(@wiki_page.title).first
|
||||||
respond_with(@wiki_page)
|
respond_with(@wiki_page)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -8,10 +8,13 @@
|
|||||||
<p>This wiki page does not exist. <%= link_to "Create new wiki page", new_wiki_page_path(:wiki_page => {:title => params[:title]}) %>.</p>
|
<p>This wiki page does not exist. <%= link_to "Create new wiki page", new_wiki_page_path(:wiki_page => {:title => params[:title]}) %>.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<% if @artist %>
|
||||||
|
<p><%= link_to "View artist", @artist %></p>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<%= wiki_page_alias_and_implication_list(@wiki_page)%>
|
<%= wiki_page_alias_and_implication_list(@wiki_page)%>
|
||||||
|
|
||||||
<%= wiki_page_post_previews(@wiki_page) %>
|
<%= wiki_page_post_previews(@wiki_page) %>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user