Changed report button + Added disclaimer on report page + Added search filter

This commit is contained in:
Shrey 2015-07-22 00:10:41 +05:30 committed by Matt Amos
parent 69c1f6d186
commit b598979374
11 changed files with 57 additions and 31 deletions

View file

@ -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 %>
&nbsp;&#9872;
<% end %>
<% end %>
</h2>

View file

@ -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 %>
&nbsp;&#9872;
<% end %>
<% end %>
</h2>
<div class="browse-section">

View file

@ -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 %>
&nbsp;&#9872;
<% end %>
<% end %>
</p>
<div class="richtext"><%= diary_comment.body.to_html %></div>
<%= if_administrator(:span) do %>

View file

@ -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 %>
&nbsp;&#9872;
<% end %>
</div>
<% end %>
<small class='deemphasize'>

View file

@ -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/>

View file

@ -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>

View file

@ -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') %>
&nbsp;&#9872;
<% end %>
</div>
<% end %>