github.com/Azareal/Gosora@v0.0.0-20210729070923-553e66b59003/templates/panel_themes_widgets.html (about) 1 {{/** 2 type Widget struct { 3 Enabled bool 4 Location string // Coming Soon: overview, topics, topic / topic_view, forums, forum, global 5 Position int 6 Body string 7 Side string 8 Type string 9 Literal bool 10 } 11 **/}} 12 <div class="colstack_item colstack_head"> 13 <div class="rowitem"><h1>{{lang "panel_themes_widgets_head"}}</h1></div> 14 </div> 15 {{range $name, $dock := .Docks}} 16 <div class="colstack_item colstack_head colstack_sub_head"> 17 <div class="rowitem"><h2>{{$name}}</h2></div> 18 </div> 19 <div id="panel_widgets_{{$name}}" class="colstack_item rowlist panel_widgets"> 20 {{range $widget := $dock}} 21 <div id="widget_{{$widget.ID}}" class="rowitem panel_compactrow editable_parent widget_item{{if not .Enabled}} bg_red{{end}}"> 22 <div class="widget_normal editable_block hide_on_block_edit"> 23 <a href="/panel/themes/widgets/edit/{{$widget.ID}}" class="panel_upshift">{{$widget.Type}} <span class="widget_disabled">({{lang "panel_themes_widgets_disabled"}})</span></a> 24 <a class="panel_compacttext to_right">{{$widget.Location}}</a> 25 </div> 26 <div class="widget_edit show_on_block_edit"> 27 <form action="/panel/themes/widgets/edit/submit/{{$widget.ID}}"method="post"> 28 <input class="wside"name="wside"value="{{$name}}"type="hidden"> 29 {{template "panel_themes_widgets_widget.html" $widget }} 30 </form> 31 </div> 32 </div> 33 {{end}} 34 <div class="rowitem panel_compactrow editable_parent widget_new"> 35 <a href="#" data-dock="{{$name}}" class="editable_block panel_upshift">{{lang "panel_themes_widgets_new"}}</a> 36 </div> 37 </div> 38 {{end}} 39 <div id="widgetTmpl"> 40 <div class="rowitem panel_compactrow editable_parent widget_item blank_widget bg_red"> 41 <div class="widget_normal editable_block hide_on_block_edit"> 42 <a href="#"class="panel_upshift">{{.BlankWidget.Type}} <span class="widget_disabled">({{lang "panel_themes_widgets_disabled"}})</span></a> 43 <a class="panel_compacttext to_right">{{.BlankWidget.Location}}</a> 44 </div> 45 <div class="widget_edit show_on_block_edit"> 46 <form action="/panel/themes/widgets/create/submit/" method="post"> 47 <input name="s"value="{{.CurrentUser.Session}}"type="hidden"> 48 <input class="wside"name="wside"value=""type="hidden"> 49 {{template "panel_themes_widgets_widget.html" .BlankWidget }} 50 </form> 51 </div> 52 </div> 53 </div>