]> git.openstreetmap.org Git - rails.git/commitdiff
Changed report button + Added disclaimer on report page + Added search filter
authorShrey <shrey14099@iiitd.ac.in>
Tue, 21 Jul 2015 18:40:41 +0000 (00:10 +0530)
committerMatt Amos <zerebubuth@gmail.com>
Mon, 22 Aug 2016 15:18:15 +0000 (16:18 +0100)
app/assets/stylesheets/common.scss
app/controllers/issues_controller.rb
app/views/browse/changeset.html.erb
app/views/browse/note.html.erb
app/views/diary_entry/_diary_comment.html.erb
app/views/diary_entry/_diary_entry.html.erb
app/views/issues/index.html.erb
app/views/issues/new.html.erb
app/views/user/view.html.erb
config/locales/en-GB.yml
config/locales/en.yml

index b7731130750fc16bd5b8fb0bb82341cd4883e8d7..95c21c9012e9a41123830e1ba6c0b3b5dba4fcaa 100644 (file)
@@ -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);
 }
\ No newline at end of file
index ecac5bd1677bc324a1c70dd6a4cff119ea727a54..a499dad9de9ab5311abe6df92b57ebdf91b5c824 100644 (file)
@@ -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 
index 86b17aba1800e075ac303ce01046bfc181ac7b57..465bb2c4ddfd4b006eeb61013a85d614b99dbdea 100644 (file)
@@ -2,14 +2,12 @@
 
 <h2>
   <a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a>
+  <%= t('browse.changeset.title', :id => @changeset.id) %>
   <% 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>
+    <%= 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 %>
-  <%= t('browse.changeset.title', :id => @changeset.id) %>
 </h2>
 
 
index c6a1f86cafa9292c2c34036d56c5dd0c9f744f42..2c7de033199e2efe2c72e2dc277029b7461ae35b 100644 (file)
@@ -2,14 +2,12 @@
 
 <h2>
   <a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a>
+  <%= t "browse.note.#{@note.status}_title", :note_name => @note.id %>
   <% 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>
+    <%= 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 %>
-  <%= t "browse.note.#{@note.status}_title", :note_name => @note.id %>
 </h2>
 
 <div class="browse-section">
index 8f98285d0bbb472c809eebdd63f1be004eb2fad9..b355c91acb5deeb358de10f967a2301ea9a442c9 100644 (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 %>
index 9af5586d3414882c31d72b716f0d416980df9eee..f9c094f2b76060a03c00101709504da1dc82ac13 100644 (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'>
index be0a448edfc26ce3db95e1cb5406ae8da4c53aae..374502c38d71d39cff117d5903815b302f6155e9 100644 (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/>
index ea01890cfbc4eed3680a66d48a4213248bc1a1c4..4252b354fbd598ca530bba346021babc5d331f1a 100644 (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>
index c85ca5fd9a5c9b77585c30fe831a52ffdf3c300b..1628e2364967d267b3a58e78a595ad014ae1e0cf 100644 (file)
     <% 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 %>
index 9fb92714b1e21a4d99f1ca030bc79543d46a3ac0..1c85d677ff534ba919fd87bfb748a85b66c35db5 100644 (file)
@@ -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
index 1d6aacba23692e6a6221d622d6ae52f27352c1be..dd8815329bd2925ed38ba73f1decf8cb720cf827 100644 (file)
@@ -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