diff --git a/app/views/layouts/moderation.haml b/app/views/layouts/moderation.haml new file mode 100644 index 00000000..59bb4fe9 --- /dev/null +++ b/app/views/layouts/moderation.haml @@ -0,0 +1,10 @@ += render 'moderation/moderation_nav' +.container.j2-page + .row + .col-md-3.col-sm-4.col-xs-12 + = render 'tabs/moderation' + .col-md-9.col-sm-8.col-xs-12 + = yield + +- provide(:title, generate_title("Moderation")) +- parent_layout "base" \ No newline at end of file diff --git a/app/views/moderation/_moderation_tabs.html.haml b/app/views/moderation/_moderation_tabs.html.haml deleted file mode 100644 index 5dbe3c6a..00000000 --- a/app/views/moderation/_moderation_tabs.html.haml +++ /dev/null @@ -1,9 +0,0 @@ -.col-md-3.col-sm-4.col-xs-12 - .card.hidden-xs - .list-group - = list_group_item t('views.moderation.tabs.all'), moderation_path - = list_group_item t('views.general.answer').pluralize(2), moderation_path('answer') - = list_group_item t('views.general.comment').pluralize(2), moderation_path('comment') - = list_group_item t('views.general.user').pluralize(2), moderation_path('user') - = list_group_item t('views.general.question').pluralize(2), moderation_path('question') - = list_group_item 'Priority', moderation_priority_path diff --git a/app/views/moderation/index.html.haml b/app/views/moderation/index.html.haml index 6d381d42..0e7b0a7a 100644 --- a/app/views/moderation/index.html.haml +++ b/app/views/moderation/index.html.haml @@ -1,8 +1,2 @@ -- provide(:title, generate_title("Moderation")) -= render 'moderation/moderation_nav' -.container.j2-page - .row - = render 'moderation/moderation_tabs' - .col-md-9.col-sm-8.col-xs-12 - - @reports.each do |r| - = render 'moderation/moderationbox', report: r +- @reports.each do |r| + = render 'moderation/moderationbox', report: r diff --git a/app/views/moderation/priority.html.haml b/app/views/moderation/priority.html.haml index 0291c89d..92e1ff87 100644 --- a/app/views/moderation/priority.html.haml +++ b/app/views/moderation/priority.html.haml @@ -1,16 +1,10 @@ -- provide(:title, generate_title("Moderation")) -= render 'moderation/moderation_nav' -.container.j2-page +%h2 + - if @host.nil? + Users sorted by reports + - else + Users with the same IP +#users .row - = render 'moderation/moderation_tabs' - .col-md-9.col-sm-9.col-xs-12 - %h2 - - if @host.nil? - Users sorted by reports - - else - Users with the same IP - #users - .row - - @users.each do |u, c| - .col-md-4.col-sm-12col-xs-12 - = render 'moderation/userbox', user: u, count: c + - @users.each do |u, c| + .col-md-4.col-sm-12col-xs-12 + = render 'moderation/userbox', user: u, count: c diff --git a/app/views/tabs/_moderation.haml b/app/views/tabs/_moderation.haml new file mode 100644 index 00000000..d6615055 --- /dev/null +++ b/app/views/tabs/_moderation.haml @@ -0,0 +1,8 @@ +.card.hidden-xs + .list-group + = list_group_item t('views.moderation.tabs.all'), moderation_path + = list_group_item t('views.general.answer').pluralize(2), moderation_path('answer') + = list_group_item t('views.general.comment').pluralize(2), moderation_path('comment') + = list_group_item t('views.general.user').pluralize(2), moderation_path('user') + = list_group_item t('views.general.question').pluralize(2), moderation_path('question') + = list_group_item 'Priority', moderation_priority_path \ No newline at end of file