Changed report button + Added disclaimer on report page + Added search filter
This commit is contained in:
parent
69c1f6d186
commit
b598979374
11 changed files with 57 additions and 31 deletions
|
@ -2781,4 +2781,11 @@ input.richtext_title[type="text"] {
|
|||
|
||||
.report-button {
|
||||
float:right;
|
||||
}
|
||||
|
||||
.disclaimer {
|
||||
width: 600px;
|
||||
background: #fff1f0;
|
||||
color: #d85030;
|
||||
border-color: rgba(216, 80, 48, 0.3);
|
||||
}
|
|
@ -13,8 +13,10 @@ class IssuesController < ApplicationController
|
|||
def index
|
||||
if @user.moderator?
|
||||
@issue_types = @moderator_issues
|
||||
@users = User.joins(:roles).where(user_roles: {role: 'moderator'})
|
||||
else
|
||||
@issue_types = @admin_issues
|
||||
@users = User.joins(:roles).where(user_roles: {role: 'administrator'})
|
||||
end
|
||||
|
||||
@issues = Issue.where(issue_type: @user_role).order(sort_column + " " + sort_direction)
|
||||
|
@ -42,6 +44,11 @@ class IssuesController < ApplicationController
|
|||
notice = t('issues.index.search.issues_not_found')
|
||||
end
|
||||
|
||||
if params[:last_reported_by] and !params[:last_reported_by][0].blank?
|
||||
last_reported_by = params[:last_reported_by][0].to_s == "nil" ? nil : params[:last_reported_by][0].to_i
|
||||
@issues = @issues.where(updated_by: last_reported_by)
|
||||
end
|
||||
|
||||
if notice
|
||||
redirect_to issues_path, notice: notice
|
||||
end
|
||||
|
|
|
@ -2,14 +2,12 @@
|
|||
|
||||
<h2>
|
||||
<a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a>
|
||||
<% if @user and @user.id != @changeset.user.id %>
|
||||
<div class="report-button">
|
||||
<%= link_to new_issue_url(reportable_id: @changeset.id, reportable_type: @changeset.class.name, reported_user_id: @changeset.user.id), :title => t('browse.changeset.report') do %>
|
||||
<%= image_tag('notice.png', size: '10x10') %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= t('browse.changeset.title', :id => @changeset.id) %>
|
||||
<% if @user and @user.id != @changeset.user.id %>
|
||||
<%= link_to new_issue_url(reportable_id: @changeset.id, reportable_type: @changeset.class.name, reported_user_id: @changeset.user.id), :title => t('browse.changeset.report') do %>
|
||||
⚐
|
||||
<% end %>
|
||||
<% end %>
|
||||
</h2>
|
||||
|
||||
|
||||
|
|
|
@ -2,14 +2,12 @@
|
|||
|
||||
<h2>
|
||||
<a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a>
|
||||
<% if @user and @user.id!=@note.author.id %>
|
||||
<div class="report-button">
|
||||
<%= link_to new_issue_url(reportable_id: @note.id, reportable_type: @note.class.name, reported_user_id: @note.author.id), :title => t('browse.note.report') do %>
|
||||
<%= image_tag('notice.png', size: '10x10') %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= t "browse.note.#{@note.status}_title", :note_name => @note.id %>
|
||||
<% if @user and @user.id!=@note.author.id %>
|
||||
<%= link_to new_issue_url(reportable_id: @note.id, reportable_type: @note.class.name, reported_user_id: @note.author.id), :title => t('browse.note.report') do %>
|
||||
⚐
|
||||
<% end %>
|
||||
<% end %>
|
||||
</h2>
|
||||
|
||||
<div class="browse-section">
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
<div class="clearfix diary-comment">
|
||||
<%= user_thumbnail diary_comment.user %>
|
||||
<p class="deemphasize comment-heading" id="comment<%= diary_comment.id %>"><%= raw(t('diary_entry.diary_comment.comment_from', :link_user => (link_to h(diary_comment.user.display_name), :controller => 'user', :action => 'view', :display_name => diary_comment.user.display_name), :comment_created_at => link_to(l(diary_comment.created_at, :format => :friendly), :anchor => "comment#{diary_comment.id}"))) %></p>
|
||||
|
||||
<% if @user and diary_comment.user.id != @user.id %>
|
||||
<div class="report-button">
|
||||
<%= link_to new_issue_url(reportable_id: diary_comment.id, reportable_type: diary_comment.class.name, reported_user_id: diary_comment.user.id), :title => t('diary_entry.diary_comment.report') do %>
|
||||
<%= image_tag('notice.png', size: '10x10') %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<p class="deemphasize comment-heading" id="comment<%= diary_comment.id %>"><%= raw(t('diary_entry.diary_comment.comment_from', :link_user => (link_to h(diary_comment.user.display_name), :controller => 'user', :action => 'view', :display_name => diary_comment.user.display_name), :comment_created_at => link_to(l(diary_comment.created_at, :format => :friendly), :anchor => "comment#{diary_comment.id}"))) %>
|
||||
<% if @user and diary_comment.user.id != @user.id %>
|
||||
<%= link_to new_issue_url(reportable_id: diary_comment.id, reportable_type: diary_comment.class.name, reported_user_id: diary_comment.user.id), :title => t('diary_entry.diary_comment.report') do %>
|
||||
⚐
|
||||
<% end %>
|
||||
<% end %>
|
||||
</p>
|
||||
|
||||
<div class="richtext"><%= diary_comment.body.to_html %></div>
|
||||
<%= if_administrator(:span) do %>
|
||||
|
|
|
@ -7,11 +7,9 @@
|
|||
<h2><%= link_to h(diary_entry.title), :action => 'view', :display_name => diary_entry.user.display_name, :id => diary_entry.id %></h2>
|
||||
|
||||
<% if @user and diary_entry.user.id != @user.id %>
|
||||
<div class="report-button">
|
||||
<%= link_to new_issue_url(reportable_id: diary_entry.id, reportable_type: diary_entry.class.name, reported_user_id: diary_entry.user.id), :title => t('diary_entry.diary_entry.report') do %>
|
||||
<%= image_tag('notice.png', size: '10x10') %>
|
||||
<%= link_to new_issue_url(reportable_id: diary_entry.id, reportable_type: diary_entry.class.name, reported_user_id: diary_entry.user.id), :title => t('diary_entry.diary_entry.report') do %>
|
||||
⚐
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<small class='deemphasize'>
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
<p id= "notice"><%= notice %></p>
|
||||
|
||||
<% content_for :heading do %>
|
||||
<h1>List of <%= @user_role %> issues:</h1>
|
||||
<h1>List of <%= @user_role %> issues:</h1>
|
||||
<% end %>
|
||||
|
||||
<%= form_tag(issues_path, :method => :get) do %>
|
||||
Search for a particular issue(s):
|
||||
Search for a particular issue(s): <br/>
|
||||
<%= select :status, nil, [['open', 0],['resolved',2],['ignored',1]],{:include_blank => "Select status"},data: { behavior: 'category_dropdown' } %>
|
||||
<%= select :issue_type, nil, @issue_types,{:include_blank => "Select type"},data: { behavior: 'category_dropdown' } %>
|
||||
<%= select :issue_type, nil, @issue_types,{:include_blank => "Select type"}, data: { behavior: 'category_dropdown' } %>
|
||||
<%= text_field_tag :search_by_user, params[:search_by_user], placeholder: "Reported User" %>
|
||||
<%= select :last_reported_by, nil, @users.all.collect {|f| [f.display_name, f.id]} << ['Not updated',"nil"], {:include_blank => "Select last updated by"}, data: { behavior: 'category_dropdown' } %>
|
||||
<%= submit_tag "Search" %>
|
||||
<% end %>
|
||||
<br/>
|
||||
|
|
|
@ -2,6 +2,15 @@
|
|||
<h1>Report <%= reportable_url(@issue.reportable) %></h1>
|
||||
<% end %>
|
||||
|
||||
<div class="disclaimer">
|
||||
<ul>
|
||||
<%= t('issues.new.disclaimer.placeholder') %>:
|
||||
<li> --> <%= t('issues.new.disclaimer.placeholder1') %> </li>
|
||||
<li> --> <%= t('issues.new.disclaimer.placeholder2') %> </li>
|
||||
<li> --> <%= t('issues.new.disclaimer.placeholder3') %> </li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<%= form_for(@issue) do |f| %>
|
||||
<%= f.error_messages %>
|
||||
<fieldset>
|
||||
|
|
|
@ -156,7 +156,7 @@
|
|||
<% if @user and @this_user.id != @user.id %>
|
||||
<div class="report-button">
|
||||
<%= link_to new_issue_url(reportable_id: @this_user.id, reportable_type: @this_user.class.name, reported_user_id: @this_user.id), :title => t('user.view.report') do%>
|
||||
<%= image_tag('notice.png', size: '10x10') %>
|
||||
⚐
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -958,6 +958,11 @@ en-GB:
|
|||
new:
|
||||
details: Please provide some more details into the problem. (This field cannot be left blank!)
|
||||
select: Select a reason for your report
|
||||
disclaimer:
|
||||
placeholder: Please make sure you have done the below before submitting a report
|
||||
placeholder1: Placeholder 1
|
||||
placeholder2: Placeholder 2
|
||||
placeholder3: Placeholder 3
|
||||
show:
|
||||
comments:
|
||||
reassign: The Issue was reassigned
|
||||
|
|
|
@ -928,6 +928,11 @@ en:
|
|||
new:
|
||||
details: Please provide some more details into the problem. (This field cannot be left blank!)
|
||||
select: Select a reason for your report
|
||||
disclaimer:
|
||||
placeholder: Please make sure you have done the below before submitting a report
|
||||
placeholder1: Placeholder 1
|
||||
placeholder2: Placeholder 2
|
||||
placeholder3: Placeholder 3
|
||||
show:
|
||||
comments:
|
||||
reassign: The Issue was reassigned
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue