From dbb55e061a00c4dd0df282318d54d20d929a6384 Mon Sep 17 00:00:00 2001 From: yasushiito Date: Wed, 21 Aug 2013 17:44:23 +0900 Subject: [PATCH] t#31900:fix story additor --- app/views/panels/show.html.erb | 47 +++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/app/views/panels/show.html.erb b/app/views/panels/show.html.erb index f88b6a7c..6840f865 100644 --- a/app/views/panels/show.html.erb +++ b/app/views/panels/show.html.erb @@ -2,27 +2,32 @@

<%= notice %>

<%= render 'standard', :panel => @panel, :author => @author %> -<%= link_to t('link.edit'), edit_panel_path(@panel) %> -<%= link_to t('link.destroy'), panel_path(@panel), :method => :delete %> -<%= link_to t('link.catch'), catch_panel_path(@panel) %> +<% if @panel.own? @author %> + <%= link_to t('link.edit'), edit_panel_path(@panel) %> + <%= link_to t('link.destroy'), panel_path(@panel), :method => :delete %> + <%= link_to t('link.catch'), catch_panel_path(@panel) %> +<% end %> -

<%= t('panels.show.new_comics') -%>

- - <% @new_comics.each do |comic| %> - <%= render 'append_comic', :panel => @panel, :comic => comic, :author => @author %> - <% end %> -
-

<%= t('panels.show.fresh_comics') -%>

- - <% @fresh_comics.each do |comic| %> - <%= render 'append_comic', :panel => @panel, :comic => comic, :author => @author %> - <% end %> -
-

<%= t('panels.show.copy') -%>

-<%= form_for(Panel.new, :html => {:jqform => 'pettanr-panel-form'}) do |f| %> - <%= hidden_field_tag "json", @panel.copy().to_json %> -
- <%= submit_tag t('panels.show.inspire') -%> -
+<% if @author %> +

<%= t('panels.show.new_comics') -%>

+ + <% @new_comics.each do |comic| %> + <%= render 'append_comic', :panel => @panel, :comic => comic, :author => @author %> + <% end %> +
+

<%= t('panels.show.fresh_comics') -%>

+ + <% @fresh_comics.each do |comic| %> + <%= render 'append_comic', :panel => @panel, :comic => comic, :author => @author %> + <% end %> +
+

<%= t('panels.show.copy') -%>

+ <%= form_for(Panel.new, :html => {:jqform => 'pettanr-panel-form'}) do |f| %> + + <%= hidden_field_tag "json", @panel.copy().to_json %> +
+ <%= submit_tag t('panels.show.inspire') -%> +
+ <% end %> <% end %> -- 2.11.0