OSDN Git Service

fix owner
[pettanr/pettanr.git] / app / views / authors / show.html.erb
index 5006a50..529975a 100644 (file)
@@ -1,22 +1,23 @@
-<% @page_title = t('.title') + ':' + @author.name %>
-<h1><%= t '.title' -%></h1>
-<p id="notice"><%= notice %></p>
-
-<p>
-  <b><%= t_m 'Author.name' -%>:</b>
-  <%= h @author.name %>
-</p>
+<% @page_title = t('.title') + ':' + @item.name %>
+<h1>
+  <%= link_to icon_tag('Author'), author_path(@item) %>
+  <%= link_to h(@item.name), author_path(@item) %>
+  <%= link_to icon_tag('Prof'), author_path(@item, :format => :prof) %>
+</h1>
 
 <p>
   <b><%= t_m 'Author.created_at' -%>:</b>
-  <%= l @author.created_at %>
+  <%= l @item.created_at %>
 </p>
 
 <p>
   <b><%= t_m 'Author.updated_at' -%>:</b>
-  <%= l @author.updated_at %>
+  <%= l @item.updated_at %>
 </p>
 
-<% if @author.own?(@author) %>
-  <%= link_to t('link.edit'), edit_author_path(@author) %>
+<% if @item.own?(@item) %>
+  <h3><%= t('editor') -%></h3>
+  <p id="notice"><%= notice %></p>
+  
+  <%= link_to t('link.edit'), edit_author_path(@item) %>
 <% end %>