Fully internationalise the issues and reports interfaces.
This commit is contained in:
parent
ae44879213
commit
79bd1777ab
8 changed files with 79 additions and 43 deletions
|
@ -8,7 +8,7 @@
|
|||
<%= comment.body %>
|
||||
</div>
|
||||
<span class="deemphasize">
|
||||
On <%= l comment.created_at.to_datetime, :format => :friendly %>
|
||||
<%= t(".created_at", :datetime => l(comment.created_at.to_datetime, :format => :friendly)) %>
|
||||
</span>
|
||||
<hr>
|
||||
<% end %>
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
<div style="float:left">
|
||||
<%= link_to user_thumbnail(report.user), :controller => :user, :action =>:view, :display_name => report.user.display_name %>
|
||||
</div>
|
||||
Reported by <b><%= link_to report.user.display_name, :controller => :user, :action =>:view, :display_name => report.user.display_name %></b> <br/>
|
||||
<%= t(".reported_by_html", :user_name => report.user.display_name, :user_url => url_for(:controller => :user, :action => :view, :display_name => report.user.display_name)) %> <br/>
|
||||
<span class="deemphasize">
|
||||
On <%= l report.updated_at.to_datetime, :format => :friendly %>
|
||||
<%= t(".updated_at", :datetime => l(report.updated_at.to_datetime, :format => :friendly)) %>
|
||||
</span>
|
||||
<br/>
|
||||
<span class="deemphasize">
|
||||
Category: <%= report.category %>
|
||||
<%= t ".category", category: report.category %>
|
||||
</span>
|
||||
<br/>
|
||||
<%= report.details %>
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
<% content_for :heading do %>
|
||||
<h1>List of issues:</h1>
|
||||
<h1><%= t ".title" %></h1>
|
||||
<% end %>
|
||||
|
||||
<%= form_tag(issues_path, :method => :get) do %>
|
||||
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' } %>
|
||||
<%= 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" %>
|
||||
<p><%= t ".search_guidance" %></p>
|
||||
<%= select :status, nil, [['open', 0], ['resolved', 2], ['ignored', 1]], { :include_blank => t(".select_status")}, data: { behavior: 'category_dropdown' } %>
|
||||
<%= select :issue_type, nil, @issue_types, { :include_blank => t(".select_type")}, data: { behavior: 'category_dropdown' } %>
|
||||
<%= text_field_tag :search_by_user, params[:search_by_user], placeholder: t(".reported_user") %>
|
||||
<%= select :last_reported_by, nil, @users.all.collect {|f| [f.display_name, f.id]} << [ t(".not_updated"), "nil"], { :include_blank => t(".select_last_updated_by")}, data: { behavior: 'category_dropdown' } %>
|
||||
<%= submit_tag t(".search") %>
|
||||
<% end %>
|
||||
<br/>
|
||||
|
||||
<% if @issues.length == 0 %>
|
||||
<p><%= t ".search.issues_not_found" %></p>
|
||||
<p><%= t ".issues_not_found" %></p>
|
||||
<% end %>
|
||||
|
||||
<br/>
|
||||
|
@ -21,13 +21,13 @@ Search for a particular issue(s): <br/>
|
|||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td><b>Status</b></td>
|
||||
<td><b>Number of Reports</b></td>
|
||||
<td><b>Last updated at</b></td>
|
||||
<td><b>Last updated by</b></td>
|
||||
<td><b>Link to reports</b></td>
|
||||
<td><b>Reported User</b></td>
|
||||
<td><b>Link to reported instance</b></td>
|
||||
<td><b><%= t ".status" %></b></td>
|
||||
<td><b><%= t ".number_of_reports" %></b></td>
|
||||
<td><b><%= t ".last_updated_at" %></b></td>
|
||||
<td><b><%= t ".last_updated_by" %></b></td>
|
||||
<td><b><%= t ".link_to_reports" %></b></td>
|
||||
<td><b><%= t ".reported_user" %></b></td>
|
||||
<td><b><%= t ".link_to_reported_instance" %></b></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<% content_for :heading do %>
|
||||
<h2> <%= @issue.status.humanize %> Issue #<%= @issue.id %> <br/></h2>
|
||||
<h2><%= t ".title", :status => @issue.status.humanize, :issue_id => @issue.id %></h2>
|
||||
<p><%= report_type(@issue.reportable_type) %> : <%= reportable_url(@issue.reportable) %></p>
|
||||
<p class="deemphasize">
|
||||
<small>
|
||||
<%= @issue.assigned_role %>
|
||||
| <%= @issue.reports.count %> reports
|
||||
| First reported: <%= l @issue.created_at.to_datetime, :format => :friendly %>
|
||||
<%= "| Last resolved at #{l(@issue.resolved_at.to_datetime, :format =>:friendly)}" if @issue.resolved_at? %>
|
||||
<%= "| Last updated at #{l(@issue.updated_at.to_datetime, :format => :friendly)} by #{@issue.user_updated.display_name}" if @issue.user_updated %>
|
||||
| <%= t ".reports", :count => @issue.reports.count %>
|
||||
| <%= t ".report_created_at", :datetime => l(@issue.created_at.to_datetime, :format => :friendly) %>
|
||||
<%= " | " + t(".last_resolved_at", :datetime => l(@issue.resolved_at.to_datetime, :format =>:friendly)) if @issue.resolved_at? %>
|
||||
<%= " | " + t(".last_updated_at", :datetime => l(@issue.updated_at.to_datetime, :format => :friendly), :displayname => @issue.user_updated.display_name ) if @issue.user_updated %>
|
||||
</small>
|
||||
</p>
|
||||
<p>
|
||||
|
@ -22,28 +22,26 @@
|
|||
<div class="report-related-block">
|
||||
|
||||
<div class="report-block">
|
||||
<h3>Reports under this issue:</h3>
|
||||
<h3><%= t ".reports_of_this_issue" %></h3>
|
||||
|
||||
<% if @read_reports.present? %>
|
||||
<div class="read-reports">
|
||||
<h4>Read Reports:</h4>
|
||||
<br/>
|
||||
<%= render 'reports',reports: @read_reports %>
|
||||
<h4><%= t ".read_reports" %></h4>
|
||||
<%= render 'reports', reports: @read_reports %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if @unread_reports.any? %>
|
||||
<div class="unread-reports">
|
||||
<h4>New Reports:</h4>
|
||||
<br/>
|
||||
<%= render 'reports',reports: @unread_reports %>
|
||||
<h4><%= t ".new_reports" %></h4>
|
||||
<%= render 'reports', reports: @unread_reports %>
|
||||
</div>
|
||||
<% end %>
|
||||
<br/>
|
||||
</div>
|
||||
|
||||
<div class="related-block">
|
||||
<h3> Other issues against this user: </h3>
|
||||
<h3><%= t ".other_issues_against_this_user" %></h3>
|
||||
<div class="unread-reports">
|
||||
<% if @related_issues.count > 1 %>
|
||||
<% @related_issues.each do |issue| %>
|
||||
|
@ -52,13 +50,13 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<p>No other reports against this user!</p>
|
||||
<p><%= t ".no_other_issues" %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>Comments on this issue:</h3>
|
||||
<h3><%= t ".comments_on_this_issue" %></h3>
|
||||
<div class="unread-reports">
|
||||
<%= render 'comments', comments: @comments %>
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<% content_for :heading do %>
|
||||
<h1>Report <%= reportable_url(@report.issue.reportable) %></h1>
|
||||
<h1><%= t ".title_html", :link => reportable_url(@report.issue.reportable) %></h1>
|
||||
<% end %>
|
||||
|
||||
<div class="disclaimer">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue