gosora/templates/panel_themes_widgets.html
Azareal 8b059ac877 other mfa store tests
save a few bytes
2020-04-03 08:24:32 +10:00

53 lines
2.2 KiB
HTML

{{/**
type Widget struct {
Enabled bool
Location string // Coming Soon: overview, topics, topic / topic_view, forums, forum, global
Position int
Body string
Side string
Type string
Literal bool
}
**/}}
<div class="colstack_item colstack_head">
<div class="rowitem"><h1>{{lang "panel_themes_widgets_head"}}</h1></div>
</div>
{{range $name, $dock := .Docks}}
<div class="colstack_item colstack_head colstack_sub_head">
<div class="rowitem"><h2>{{$name}}</h2></div>
</div>
<div id="panel_widgets_{{$name}}" class="colstack_item rowlist panel_widgets">
{{range $widget := $dock}}
<div id="widget_{{$widget.ID}}" class="rowitem panel_compactrow editable_parent widget_item{{if not .Enabled}} bg_red{{end}}">
<div class="widget_normal editable_block hide_on_block_edit">
<a href="/panel/themes/widgets/edit/{{$widget.ID}}" class="panel_upshift">{{$widget.Type}} <span class="widget_disabled">({{lang "panel_themes_widgets_disabled"}})</span></a>
<a class="panel_compacttext to_right">{{$widget.Location}}</a>
</div>
<div class="widget_edit show_on_block_edit">
<form action="/panel/themes/widgets/edit/submit/{{$widget.ID}}"method="post">
<input class="wside"name="wside"value="{{$name}}"type="hidden">
{{template "panel_themes_widgets_widget.html" $widget }}
</form>
</div>
</div>
{{end}}
<div class="rowitem panel_compactrow editable_parent widget_new">
<a href="#" data-dock="{{$name}}" class="editable_block panel_upshift">{{lang "panel_themes_widgets_new"}}</a>
</div>
</div>
{{end}}
<div id="widgetTmpl">
<div class="rowitem panel_compactrow editable_parent widget_item blank_widget bg_red">
<div class="widget_normal editable_block hide_on_block_edit">
<a href="#"class="panel_upshift">{{.BlankWidget.Type}} <span class="widget_disabled">({{lang "panel_themes_widgets_disabled"}})</span></a>
<a class="panel_compacttext to_right">{{.BlankWidget.Location}}</a>
</div>
<div class="widget_edit show_on_block_edit">
<form action="/panel/themes/widgets/create/submit/" method="post">
<input name="s"value="{{.CurrentUser.Session}}"type="hidden">
<input class="wside"name="wside"value=""type="hidden">
{{template "panel_themes_widgets_widget.html" .BlankWidget }}
</form>
</div>
</div>
</div>