OSDN Git Service

work
[pettanr/pettanr.git] / app / views / scroll_panels / _scroll_header.html.erb
1 <h1>
2   <%= link_to scroll_icon, scroll_path(scroll) %>
3   <%= link_to h(scroll.title), play_scroll_path(scroll) %>
4 </h1>
5 <% if scroll.own? author -%>
6   <%= form_for(scroll) do |f| %>
7     <div class="field">
8       <%= f.label :title %><br />
9       <%= f.text_field :title %>
10     </div>
11     <div class="field">
12       <%= f.label :visible %><br />
13       <%= f.collection_select :visible, t_select_items(MagicNumber['scroll_visible_items']), :last, :first, :html => {:selected => @scroll.visible} %>
14     </div>
15     <div class="actions">
16       <%= f.submit %>
17     </div>
18   <% end %>
19 <% else %>
20   <p>
21     <b><%= t_m 'Scroll.visible' -%>:</b>
22     <%= t_selected_item('scroll_visible_items', @scroll.visible) %>
23   </p>
24 <% end %>
25
26 <p>
27   <b><%= t_m 'Scroll.author_id' -%>:</b>
28   <%= link_to h(@scroll.author.name), author_path(@scroll.author) %>
29 </p>
30
31 <p>
32   <b><%= t_m 'Scroll.created_at' -%>:</b>
33   <%= l @scroll.created_at %>
34 </p>
35
36 <p>
37   <b><%= t_m 'Scroll.updated_at' -%>:</b>
38   <%= l @scroll.updated_at %>
39 </p>
40