OSDN Git Service

t#31900:fix story additor
authoryasushiito <yas@pen-chan.jp>
Wed, 21 Aug 2013 09:49:20 +0000 (18:49 +0900)
committeryasushiito <yas@pen-chan.jp>
Wed, 21 Aug 2013 09:49:20 +0000 (18:49 +0900)
app/views/panels/show.html.erb
config/picture_io.yml.org
script/sbt_helper.rb

index f88b6a7..6840f86 100644 (file)
@@ -2,27 +2,32 @@
 <p id="notice"><%= notice %></p>
 <%= 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 %>
 
-<h2><%= t('panels.show.new_comics') -%></h2>
-<table>
-  <% @new_comics.each do |comic| %>
-    <%= render 'append_comic', :panel => @panel, :comic => comic, :author => @author %>
-  <% end %>
-</table>
-<h2><%= t('panels.show.fresh_comics') -%></h2>
-<table>
-  <% @fresh_comics.each do |comic| %>
-    <%= render 'append_comic', :panel => @panel, :comic => comic, :author => @author %>
-  <% end %>
-</table>
-<h2><%= t('panels.show.copy') -%></h2>
-<%= form_for(Panel.new, :html => {:jqform => 'pettanr-panel-form'}) do |f| %>
 
-  <%= hidden_field_tag "json", @panel.copy().to_json %>
-  <div>
-    <%= submit_tag t('panels.show.inspire') -%>
-  </div>
+<% if @author %>
+  <h2><%= t('panels.show.new_comics') -%></h2>
+  <table>
+    <% @new_comics.each do |comic| %>
+      <%= render 'append_comic', :panel => @panel, :comic => comic, :author => @author %>
+    <% end %>
+  </table>
+  <h2><%= t('panels.show.fresh_comics') -%></h2>
+  <table>
+    <% @fresh_comics.each do |comic| %>
+      <%= render 'append_comic', :panel => @panel, :comic => comic, :author => @author %>
+    <% end %>
+  </table>
+  <h2><%= t('panels.show.copy') -%></h2>
+  <%= form_for(Panel.new, :html => {:jqform => 'pettanr-panel-form'}) do |f| %>
+
+    <%= hidden_field_tag "json", @panel.copy().to_json %>
+    <div>
+      <%= submit_tag t('panels.show.inspire') -%>
+    </div>
+  <% end %>
 <% end %>
index 1a03865..d17e7fe 100644 (file)
@@ -17,6 +17,7 @@ test:
 production:
   adapter: s3_picture
   io: S3Picture
-  original_picture: pettanr-original
-  resource_picture: pettanr-picture
-  system_picture: pettanr-system
+  original_picture: pettan/o/
+  resource_picture: pettan/r/
+  picture: pettan/p/
+  system_picture: pettan/s/
index bdfa029..2dd5120 100644 (file)
@@ -32,5 +32,5 @@ replace_system_picture json, wd
 \r
 puts "generating " + outputfile\r
 File.open(outputfile, 'w') do |f|\r
-  f.write json.to_json.to_s\r
+  f.write JSON.pretty_generate(json)\r
 end\r