summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke "Jared" Bennett <lbennett@gitlab.com>2016-07-22 18:33:35 +0100
committerLuke Bennett <lukeeeebennettplus@gmail.com>2016-08-14 00:54:18 +0100
commitcbae07db5e70972bfb320c90640f9a9e12d0351e (patch)
tree4c850491d3643bfe96da77789d61ec5c87febeec
parent30f5b9a5b711b46f1065baf755e413ceced5646b (diff)
downloadgitlab-ce-cbae07db5e70972bfb320c90640f9a9e12d0351e.tar.gz
Altered abuse report UI
-rw-r--r--app/views/admin/abuse_reports/_abuse_report.html.haml69
-rw-r--r--app/views/admin/abuse_reports/index.html.haml41
2 files changed, 69 insertions, 41 deletions
diff --git a/app/views/admin/abuse_reports/_abuse_report.html.haml b/app/views/admin/abuse_reports/_abuse_report.html.haml
index dd2e7ebd030..0dd3904dfa9 100644
--- a/app/views/admin/abuse_reports/_abuse_report.html.haml
+++ b/app/views/admin/abuse_reports/_abuse_report.html.haml
@@ -1,31 +1,44 @@
- reporter = abuse_report.reporter
- user = abuse_report.user
-%tr
- %td
- - if user
- = link_to user.name, user
- .light.small
- Joined #{time_ago_with_tooltip(user.created_at)}
- - else
- (removed)
- %td
- - if reporter
- = link_to reporter.name, reporter
- - else
- (removed)
- .light.small
- = time_ago_with_tooltip(abuse_report.created_at)
- %td
- = markdown(abuse_report.message.squish!, pipeline: :single_line, author: reporter)
- %td
- - if user
- = link_to 'Remove user & report', admin_abuse_report_path(abuse_report, remove_user: true),
- data: { confirm: "USER #{user.name} WILL BE REMOVED! Are you sure?" }, remote: true, method: :delete, class: "btn btn-xs btn-remove js-remove-tr"
- %td
- - if user && !user.blocked?
- = link_to 'Block user', block_admin_user_path(user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: "btn btn-xs"
- - else
- .btn.btn-xs.disabled
- Already Blocked
- = link_to 'Remove report', [:admin, abuse_report], remote: true, method: :delete, class: "btn btn-xs btn-close js-remove-tr"
+.panel.panel-default
+ .panel-heading{ id: "heading#{ abuse_report_counter }", role: 'tab' }
+ %h4.panel-title
+ %a{ role: 'button', href: "#collapse#{ abuse_report_counter }", data: { toggle: 'collapse', parent: '#accordion' }, aria: { expanded: 'true', controls: "collapse#{ abuse_report_counter }" } }
+ Collapsible Group Item #
+ = abuse_report_counter.to_s
+ .btn-group.pull-right
+ - if user
+ = link_to 'Remove user & report', admin_abuse_report_path(abuse_report, remove_user: true),
+ data: { confirm: "USER #{user.name} WILL BE REMOVED! Are you sure?" }, remote: true, method: :delete, class: "btn btn-sm btn-remove js-remove-tr"
+ - if user && !user.blocked?
+ = link_to 'Block user', block_admin_user_path(user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: "btn btn-sm"
+ - else
+ .btn.btn-sm.disabled
+ Already Blocked
+ = link_to 'Remove report', [:admin, abuse_report], remote: true, method: :delete, class: "btn btn-sm btn-close js-remove-tr"
+ .clearfix
+ .panel-collapse.collapse{ id: "collapse#{ abuse_report_counter }", class: (abuse_report_counter == 0 ? 'in' : ''), role: 'tabpanel', aria: { labelledby: "heading#{ abuse_report_counter }" } }
+ .panel-body
+ Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
+
+-# %tr
+-# %td
+-# - if user
+-# = link_to user.name, user
+-# .light.small
+-# Joined #{time_ago_with_tooltip(user.created_at)}
+-# - else
+-# (removed)
+-# %td
+-# - if reporter
+-# = link_to reporter.name, reporter
+-# - else
+-# (removed)
+-# .light.small
+-# = time_ago_with_tooltip(abuse_report.created_at)
+-# %td
+-# = markdown(abuse_report.message.squish!, pipeline: :single_line, author: reporter)
+-# %td
+-#
+-# %td
diff --git a/app/views/admin/abuse_reports/index.html.haml b/app/views/admin/abuse_reports/index.html.haml
index bc4a9cedb2c..93ea82c7454 100644
--- a/app/views/admin/abuse_reports/index.html.haml
+++ b/app/views/admin/abuse_reports/index.html.haml
@@ -1,17 +1,32 @@
-- page_title "Abuse Reports"
+- page_title 'Abuse Reports'
%h3.page-title Abuse Reports
%hr
-- if @abuse_reports.present?
- .table-holder
- %table.table
- %thead
- %tr
- %th User
- %th Reported by
- %th Message
- %th Primary action
- %th
- = render @abuse_reports
+-# - if @abuse_reports.present?
+- if false
+ .panel-group#accordion{ role: 'tablist', aria: { multiselectable: 'true' } }
+ = render @abuse_reports
= paginate @abuse_reports
- else
- %h4 There are no abuse reports
+ .no-reports
+ .pull-left
+ There are no abuse reports!
+ .pull-left
+ = emoji_icon 'tada'
+
+ -# .panel.panel-default
+ -# .panel-heading#headingOne{ role: 'tab' }
+ -# %h4.panel-title
+ -# %a{ role: 'button', href: '#collapseOne', data: { toggle: 'collapse', parent: '#accordion' }, aria: { expanded: 'true', controls: 'collapseOne' } }
+ -# Collapsible Group Item #1
+ -# .panel-collapse.collapse.in#collapseOne{ role: 'tabpanel', aria: { labelledby: 'headingOne' } }
+ -# .panel-body
+ -# Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
+
+ -# .panel.panel-default
+ -# .panel-heading#headingTwo{ role: 'tab' }
+ -# %h4.panel-title
+ -# %a.collapsed{ role: 'button', href: '#collapseTwo', data: { toggle: 'collapse', parent: '#accordion' }, aria: { expanded: 'false', controls: 'collapseTwo' } }
+ -# Collapsible Group Item #2
+ -# .panel-collapse.collapse#collapseTwo{ role: 'tabpanel', aria: { labelledby: 'headingTwo' } }
+ -# .panel-body
+ -# Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.