From 76ec90799352603406728cb51b4e70913413f2bd Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 13 Dec 2016 13:42:10 +0100 Subject: Improved admin UI --- app/views/admin/accounts/index.html.haml | 32 +++++++++++++++++++++------ app/views/admin/domain_blocks/index.html.haml | 14 ++++++++++++ app/views/admin/pubsubhubbub/index.html.haml | 3 +++ app/views/layouts/admin.html.haml | 11 +++++++++ 4 files changed, 53 insertions(+), 7 deletions(-) create mode 100644 app/views/admin/domain_blocks/index.html.haml create mode 100644 app/views/layouts/admin.html.haml (limited to 'app/views') diff --git a/app/views/admin/accounts/index.html.haml b/app/views/admin/accounts/index.html.haml index a2a3628d6..99c2af576 100644 --- a/app/views/admin/accounts/index.html.haml +++ b/app/views/admin/accounts/index.html.haml @@ -1,9 +1,24 @@ -%ul.filters - %li= link_to 'Local', admin_accounts_path(local: '1') - %li= link_to 'Remote', admin_accounts_path(remote: '1') - %li= link_to 'Silenced', admin_accounts_path(silenced: '1') - %li= link_to 'Suspended', admin_accounts_path(suspended: '1') - %li= link_to 'Most recent', admin_accounts_path(recent: '1') +- content_for :page_title do + Accounts + +.filters + .filter-subset + %strong Location + %ul + %li= filter_link_to 'All', local: nil, remote: nil + %li= filter_link_to 'Local', local: '1', remote: nil + %li= filter_link_to 'Remote', remote: '1', local: nil + .filter-subset + %strong Moderation + %ul + %li= filter_link_to 'All', silenced: nil, suspended: nil + %li= filter_link_to 'Silenced', silenced: '1' + %li= filter_link_to 'Suspended', suspended: '1' + .filter-subset + %strong Order + %ul + %li= filter_link_to 'Alphabetic', recent: nil + %li= filter_link_to 'Most recent', recent: '1' %table.table %thead @@ -38,6 +53,9 @@ %i.fa.fa-check - else %i.fa.fa-times - %td= link_to 'Edit', admin_account_path(account.id) + %td + = table_link_to 'circle', 'Open in web', web_path("accounts/#{account.id}") + = table_link_to 'globe', 'Open public', TagManager.instance.url_for(account) + = table_link_to 'pencil', 'Edit', admin_account_path(account.id) = will_paginate @accounts, pagination_options diff --git a/app/views/admin/domain_blocks/index.html.haml b/app/views/admin/domain_blocks/index.html.haml new file mode 100644 index 000000000..aedf163f7 --- /dev/null +++ b/app/views/admin/domain_blocks/index.html.haml @@ -0,0 +1,14 @@ +- content_for :page_title do + Domain Blocks + +%table.table + %thead + %tr + %th Domain + %tbody + - @blocks.each do |block| + %tr + %td + %samp= block.domain + += will_paginate @blocks, pagination_options diff --git a/app/views/admin/pubsubhubbub/index.html.haml b/app/views/admin/pubsubhubbub/index.html.haml index ad8cf5198..cb11a502c 100644 --- a/app/views/admin/pubsubhubbub/index.html.haml +++ b/app/views/admin/pubsubhubbub/index.html.haml @@ -1,3 +1,6 @@ +- content_for :page_title do + PubSubHubbub + %table.table %thead %tr diff --git a/app/views/layouts/admin.html.haml b/app/views/layouts/admin.html.haml new file mode 100644 index 000000000..2fc116f45 --- /dev/null +++ b/app/views/layouts/admin.html.haml @@ -0,0 +1,11 @@ +- content_for :content do + .admin-wrapper + .sidebar + = link_to root_path do + = image_tag 'logo.png', class: 'logo' + + = render_navigation + .content + = yield + += render template: "layouts/application" -- cgit