@@ -16,55 +16,69 @@ as well as a link to its edit page.
1616[1]: http://www.rubydoc.info/gems/administrate/Administrate/Page/Show
1717%>
1818
19- <% content_for(:title) { t("administrate.actions.show_resource", name: page.resource.title ) } %>
19+ <% content_for(:title) { t("administrate.actions.show_resource", name: page.page_title ) } %>
2020<% content_for(:custom_stylesheets) { stylesheet_link_tag "administrate" } %>
2121
2222 <header class ="main-content__header ">
2323 < h1 class ="main-content__page-title ">
2424 <%= content_for ( :title ) %>
2525 </ h1 >
2626
27+ <%= content_for ( :header_middle ) %>
28+
2729 < div >
2830 <%= link_to (
29- t ( "administrate.actions.edit_resource" , name : page . resource . title ) ,
31+ t ( "administrate.actions.edit_resource" , name : page . page_title ) ,
3032 [ :edit , namespace , page . resource ] ,
3133 class : "button" ,
3234 ) if accessible_action? ( page . resource , :edit ) %>
33- <%= link_to (
35+
36+ <%= button_to (
3437 t ( "administrate.actions.destroy" ) ,
3538 [ namespace , page . resource ] ,
3639 class : "button button--danger" ,
3740 method : :delete ,
38- data : { confirm : t ( "administrate.actions.confirm" ) }
41+ data : { turbo_confirm : t ( "administrate.actions.confirm" ) }
3942 ) if accessible_action? ( page . resource , :destroy ) %>
4043 <%= link_to (
4144 t ( "administrate.actions.new_resource" , name : 'hold' ) ,
4245 [ :new , namespace , :hold , { thesis_id : page . resource . id } ] ,
4346 class : "button" ,
4447 ) if accessible_action? ( 'hold' , :new ) %>
4548 </ div >
49+
50+ <%= content_for ( :header_last ) %>
4651</ header >
4752
48- < section class ="main-content__body ">
49- < dl >
50- <% page . attributes . each do |title , attributes | %>
51- < fieldset class ="<%= "field-unit--nested" if title . present? %> ">
52- <% if title . present? %>
53- < legend > <%= t "helpers.label.#{ page . resource_name } .#{ title } " , default : title %> </ legend >
54- <% end %>
53+ <%= content_for ( :before_main ) %>
54+
55+ <% if content_for? ( :main ) %>
56+ <%= content_for ( :main ) %>
57+ <% else %>
58+ < section class ="main-content__body ">
59+ < dl >
60+ <% page . attributes . each do |title , attributes | %>
61+ < fieldset class ="<%= "field-unit--nested" if title . present? %> ">
62+ <% if title . present? %>
63+ < legend > <%= t "helpers.label.#{ page . resource_name } .#{ title } " , default : title %> </ legend >
64+ <% end %>
65+
66+ <% attributes . each do |attribute | %>
67+ < dt class ="attribute-label " id ="<%= attribute . name %> ">
68+ <%= t (
69+ "helpers.label.#{ resource_name } .#{ attribute . name } " ,
70+ default : page . resource . class . human_attribute_name ( attribute . name ) ,
71+ ) %>
72+ </ dt >
5573
56- <% attributes . each do |attribute | %>
57- < dt class ="attribute-label " id ="<%= attribute . name %> ">
58- <%= t (
59- "helpers.label.#{ resource_name } .#{ attribute . name } " ,
60- default : page . resource . class . human_attribute_name ( attribute . name ) ,
61- ) %>
62- </ dt >
74+ < dd class ="attribute-data attribute-data-- <%= attribute . html_class %> ">
75+ <%= render_field attribute , page : page %>
76+ </ dd >
77+ <% end %>
78+ </ fieldset >
79+ <% end %>
80+ </ dl >
81+ </ section >
82+ <% end %>
6383
64- < dd class ="attribute-data attribute-data-- <%= attribute . html_class %> "
65- > <%= render_field attribute , page : page %> </ dd >
66- <% end %>
67- </ fieldset >
68- <% end %>
69- </ dl >
70- </ section >
84+ <%= content_for ( :after_main ) %>
0 commit comments