extends ../layout/main.pug block root - var title = 'Admin panel' block head link(rel='stylesheet' href='/static/ui/control_panel.css') block content h2 Admin panel hr if !access_level p(style='color:#a02020;font-weight:bold;font-size:1em') | Warning: Your access level is unkown, so everything is displayed and some funtions may not work. hr - access_level = 4 table(class='control_panel') tr td(class='cp_panel_panel') h5 Guestbook panel hr p if (access_level >= 3) a(href='/admin/panel/guestbook.editor') Edit data br a(href='/admin/panel/guestbook.csv') Download data (.CSV) br a(href='/admin/panel/guestbook.csv') Download data (SQL) if (access_level >= 4) div(style='padding-left:4px') form(action='/admin/panel/gb_api') h5 Import from file p b WARNING: | All the records will be removed and replaced with your values! label(for='filetype') File type: select(name='filetype') option(value='csv') .CSV option(value='sql') .TSV br input(type='file' name='file') br input(type='submit' name='import' value='Send') hr div(style='max-height:160px;overflow-y:scroll') table(width='100%') if (!gb_records || gb_records.length == 0) p Nothing to show. each record of gb_records tr(class='cp_gb_entry' + (record.hidden ? ' cp_gb_entry_hidden' : '')) form(action='/admin/panel/gb_api' method='POST') input(type='hidden' name='id' value=record.id) td(class='cp_gb_entry_name') a(href='/guestbook#gb_entry_' + record.id)= record.id | : b= record.name + ' says:' td if (record.text.length > 30) | #{record.text.substr(0, 340)}... else | #{record.text} if (access_level >= 3) td(class='cp_gb_entry_hide') if (!record.hidden) input(type='submit' name='hide' value='Hide') else input(type='submit' name='hide' value='Unhide') td(class='cp_panel_panel') h5 Articles hr p a(href='/admin/article/new') Create new article if (access_level >= 4) br a(href='/admin/articles.csv') Download data (.CSV) br a(href='/admin/articles.sql') Download data (SQL) div(style='padding-left:4px') form(action='/admin/panel/article_api' method='POST') h5 Import from file p b WARNING: | All the records will be removed and replaced with your values! hr if (!articles) p Nothing to show.