summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorJosh Frye <joshfng@gmail.com>2016-01-12 12:36:28 -0500
committerJosh Frye <joshfng@gmail.com>2016-01-16 10:47:12 -0500
commitc70ed7f2cdc0fbecea739a08332529b71325938c (patch)
treedd50fff1b8746fedaea49aa3765ee5a19318d64b /app/views
parent5cd2f77769d968d10cc8e4371e88ff8be9f28c8c (diff)
downloadgitlab-ce-c70ed7f2cdc0fbecea739a08332529b71325938c.tar.gz
Autofill abuse message text with user url. Closes #2838
Diffstat (limited to 'app/views')
-rw-r--r--app/views/abuse_reports/new.html.haml2
-rw-r--r--app/views/users/show.html.haml23
2 files changed, 24 insertions, 1 deletions
diff --git a/app/views/abuse_reports/new.html.haml b/app/views/abuse_reports/new.html.haml
index 3e5cdd2ce4a..8d31182a3e6 100644
--- a/app/views/abuse_reports/new.html.haml
+++ b/app/views/abuse_reports/new.html.haml
@@ -16,7 +16,7 @@
.form-group
= f.label :message, class: 'control-label'
.col-sm-10
- = f.text_area :message, class: "form-control js-quick-submit", rows: 2, required: true
+ = f.text_area :message, class: "form-control js-quick-submit", rows: 2, required: true, value: @ref_url
.help-block
Explain the problem with this user. If appropriate, provide a link to the relevant issue or comment.
diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml
index 849304ee2b6..7125b01c3ff 100644
--- a/app/views/users/show.html.haml
+++ b/app/views/users/show.html.haml
@@ -93,7 +93,30 @@
%h4.center.light
%i.fa.fa-spinner.fa-spin
.user-calendar-activities
+ .cover-controls
+ - if @user == current_user
+ = link_to profile_path, class: 'btn btn-gray' do
+ = icon('pencil')
+ - elsif current_user
+ %span.report-abuse
+ - if @user.abuse_report
+ %button.btn.btn-danger{ title: 'Already reported for abuse',
+ data: { toggle: 'tooltip', placement: 'left', container: 'body' }}
+ = icon('exclamation-circle')
+ - else
+ = link_to new_abuse_report_path(user_id: @user.id, ref_url: request.referrer), class: 'btn btn-gray',
+ title: 'Report abuse', data: {toggle: 'tooltip', placement: 'left', container: 'body'} do
+ = icon('exclamation-circle')
+ - if current_user
+ &nbsp;
+ = link_to user_path(@user, :atom, { private_token: current_user.private_token }), class: 'btn btn-gray' do
+ = icon('rss')
+.gray-content-block.second-block
+ .user-calendar
+ %h4.center.light
+ %i.fa.fa-spinner.fa-spin
+ .user-calendar-activities
.content_list
= spinner