0879f56893
Added one week as a time range option. Moved routeForum to routes.ViewForum Renamed form_vars to formVars. Moved the analytics chart JS into it's own file. Changed the header text on the requests chart from Views to Requests. Added simple hooks to global.js Moved some of the in funcname prints to debug mode. De-duplicated some of the back-end analytics logic.
71 lines
3.2 KiB
HTML
71 lines
3.2 KiB
HTML
{{template "header.html" . }}
|
|
|
|
<div class="colstack panel_stack">
|
|
{{template "panel-menu.html" . }}
|
|
<script>
|
|
var formVars = {'perm_preset': ['can_moderate','can_post','read_only','no_access','default','custom']};
|
|
</script>
|
|
|
|
<main class="colstack_right">
|
|
<div class="colstack_item colstack_head">
|
|
<div class="rowitem"><h1>{{.Name}} Forum</h1></div>
|
|
</div>
|
|
<div id="panel_forum" class="colstack_item">
|
|
<form action="/panel/forums/edit/submit/{{.ID}}?session={{.CurrentUser.Session}}" method="post">
|
|
<div class="formrow">
|
|
<div class="formitem formlabel"><a>Name</a></div>
|
|
<div class="formitem"><input name="forum_name" type="text" value="{{.Name}}" placeholder="General Forum" /></div>
|
|
</div>
|
|
<div class="formrow">
|
|
<div class="formitem formlabel"><a>Description</a></div>
|
|
<div class="formitem"><input name="forum_desc" type="text" value="{{.Desc}}" placeholder="Where the general stuff happens" /></div>
|
|
</div>
|
|
<div class="formrow">
|
|
<div class="formitem formlabel"><a>Active</a></div>
|
|
<div class="formitem"><select name="forum_active">
|
|
<option{{if .Active}} selected{{end}} value="1">Yes</option>
|
|
<option{{if not .Active}} selected{{end}} value="0">No</option>
|
|
</select></div>
|
|
</div>
|
|
<div class="formrow">
|
|
<div class="formitem formlabel"><a>Preset</a></div>
|
|
<div class="formitem">
|
|
<select name="forum_preset">
|
|
<option{{if eq .Preset "all"}} selected{{end}} value="all">Everyone</option>
|
|
<option{{if eq .Preset "announce"}} selected{{end}} value="announce">Announcements</option>
|
|
<option{{if eq .Preset "members"}} selected{{end}} value="members">Member Only</option>
|
|
<option{{if eq .Preset "staff"}} selected{{end}} value="staff">Staff Only</option>
|
|
<option{{if eq .Preset "admins"}} selected{{end}} value="admins">Admin Only</option>
|
|
<option{{if eq .Preset "archive"}} selected{{end}} value="archive">Archive</option>
|
|
<option{{if eq .Preset "custom"}} selected{{end}} value="custom">Custom</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="formrow">
|
|
<div class="formitem"><button name="panel-button" class="formbutton form_middle_button">Update Forum</button></div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div class="colstack_item colstack_head">
|
|
<div class="rowitem"><a>Forum Permissions</a></div>
|
|
</div>
|
|
<div id="forum_quick_perms" class="colstack_item rowlist formlist">
|
|
{{range .Groups}}
|
|
<div class="formrow">
|
|
<div class="formitem editable_parent">
|
|
<a>{{.Group.Name}}</a>
|
|
<input name="gid" value="{{.Group.ID}}" type="hidden" class="editable_block" data-field="gid" data-type="hidden" data-value="{{.Group.ID}}" />
|
|
<span class="edit_fields hide_on_edit rowsmall">Edit</span>
|
|
<div class="panel_floater">
|
|
<span data-field="perm_preset" data-type="list" data-value="{{.Preset}}" class="editable_block perm_preset perm_preset_{{.Preset}}"></span>
|
|
<a class="panel_right_button" href="/panel/forums/edit/perms/submit/{{$.ID}}"><button class='panel_tag submit_edit show_on_edit' type='submit'>Update</button></a>
|
|
<a class="panel_right_button" href="/panel/forums/edit/perms/{{$.ID}}-{{.Group.ID}}"><button class='panel_tag show_on_edit' type='submit'>Full Edit</button></a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
</main>
|
|
</div>
|
|
{{template "footer.html" . }}
|