diff options
-rw-r--r-- | Gemfile.lock | 2 | ||||
-rw-r--r-- | app/views/admin_request/_some_annotations.html.erb | 48 | ||||
-rw-r--r-- | app/views/admin_request/show.html.erb | 49 | ||||
-rw-r--r-- | app/views/admin_user/show.html.erb | 6 | ||||
-rw-r--r-- | app/views/reports/new.html.erb | 8 | ||||
-rwxr-xr-x | script/site-specific-install.sh | 5 |
6 files changed, 66 insertions, 52 deletions
diff --git a/Gemfile.lock b/Gemfile.lock index 62258c0c6..492c855c3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -266,7 +266,7 @@ GEM nokogiri (>= 1.2.0) rack (>= 1.0) rack-test (>= 0.5.3) - will_paginate (3.0.4) + will_paginate (3.0.5) xapian-full-alaveteli (1.2.9.5) xml-simple (1.1.2) zip (2.0.2) diff --git a/app/views/admin_request/_some_annotations.html.erb b/app/views/admin_request/_some_annotations.html.erb new file mode 100644 index 000000000..dfd46f828 --- /dev/null +++ b/app/views/admin_request/_some_annotations.html.erb @@ -0,0 +1,48 @@ +<% if comments.size > 0 %> + <div class="accordion" id="comments"> + <% for comment in comments %> + <div class="accordion-group"> + <div class="accordion-heading"> + <a href="#comment_<%=comment.id%>" data-toggle="collapse" data-parent="#comments"><%= chevron_right %></a> + <%= link_to admin_request_edit_comment_path(comment) do %> + #<%=comment.id%> + -- + <%=h(comment.user.name)%> + <%=admin_value(comment.created_at)%> + <% end %> + <blockquote class="incoming-message"> + <%= truncate(comment.body, :length => 400) %> + </blockquote> + </div> + <div id="comment_<%=comment.id%>" class="accordion-body collapse"> + <table class="table table-striped table-condensed"> + <tbody> + <tr> + <td colspan="2"> + By <%= user_both_links(comment.user) %> + </td> + </tr> + <% comment.for_admin_column do |name, value, type, column_name |%> + <tr> + <td> + <b><%=name%></b> + </td> + <td> + <% if column_name == 'body' && !comment.visible %> + <s><%=h comment.send(column_name) %></s> + <% else %> + <%=h comment.send(column_name) %> + <% end %> + </td> + </tr> + <% end %> + </tbody> + </table> + </div> + </div> + <% end %> + </div> +<% else %> + <p>None yet.</p> +<% end %> + diff --git a/app/views/admin_request/show.html.erb b/app/views/admin_request/show.html.erb index 83d9c3764..2589e52b4 100644 --- a/app/views/admin_request/show.html.erb +++ b/app/views/admin_request/show.html.erb @@ -325,53 +325,8 @@ <hr> <h2>Annotations</h2> -<% if @info_request.comments.size > 0 %> - <div class="accordion" id="comments"> - <% for comment in @info_request.comments %> - <div class="accordion-group"> - <div class="accordion-heading"> - <a href="#comment_<%=comment.id%>" data-toggle="collapse" data-parent="#comments"><%= chevron_right %></a> - <%= link_to admin_request_edit_comment_path(comment) do %> - #<%=comment.id%> - -- - <%=h(comment.user.name)%> - <%=admin_value(comment.created_at)%> - <% end %> - <blockquote class="incoming-message"> - <%= truncate(comment.body, :length => 400) %> - </blockquote> - </div> - <div id="comment_<%=comment.id%>" class="accordion-body collapse"> - <table class="table table-striped table-condensed"> - <tbody> - <tr> - <td colspan="2"> - By <%= user_both_links(comment.user) %> - </td> - </tr> - <% comment.for_admin_column do |name, value, type, column_name |%> - <tr> - <td> - <b><%=name%></b> - </td> - <td> - <% if column_name == 'body' && !comment.visible %> - <s><%=h comment.send(column_name) %></s> - <% else %> - <%=h comment.send(column_name) %> - <% end %> - </td> - </tr> - <% end %> - </tbody> - </table> - </div> - </div> - <% end %> - </div> -<% else %> - <p>None yet.</p> -<% end %> +<%= render :partial => 'admin_request/some_annotations' , :locals => { :comments => @info_request.comments } %> + <hr> <h2>Mail server delivery logs</h2> diff --git a/app/views/admin_user/show.html.erb b/app/views/admin_user/show.html.erb index c93c08e50..6d12aeff5 100644 --- a/app/views/admin_user/show.html.erb +++ b/app/views/admin_user/show.html.erb @@ -91,6 +91,12 @@ <hr> +<h2>Annotations</h2> + +<%= render :partial => 'admin_request/some_annotations' , :locals => { :comments => @admin_user.comments } %> + +<hr> + <h2>Censor rules</h2> <%= render :partial => 'admin_censor_rule/show', :locals => { :censor_rules => @admin_user.censor_rules, :user => @admin_user } %> diff --git a/app/views/reports/new.html.erb b/app/views/reports/new.html.erb index 7d558ab4e..1197b2255 100644 --- a/app/views/reports/new.html.erb +++ b/app/views/reports/new.html.erb @@ -4,17 +4,17 @@ <p><%= _("This request has already been reported for administrator attention") %></p> <% else %> <p> - Reporting a request notifies the site administrators. They will respond as soon as possible. + <%= _("Reporting a request notifies the site administrators. They will respond as soon as possible.") %> </p> - <p>Why specifically do you consider this request unsuitable?</p> + <p><%= _("Why specifically do you consider this request unsuitable?") %></p> <%= form_tag request_report_path(:request_id => @info_request.url_title) do %> <p> <label class="form_label" for="reason">Reason:</label> - <%= select_tag :reason, options_for_select(@info_request.report_reasons, @reason), :prompt => "Choose a reason" %> + <%= select_tag :reason, options_for_select(@info_request.report_reasons, @reason), :prompt => _("Choose a reason") %> </p> <p> - <label class="form_label" for="message">Please tell us more:</label> + <label class="form_label" for="message"><%= _("Please tell us more:") %></label> <%= text_area_tag :message, @message, :rows => 10, :cols => 60 %> </p> diff --git a/script/site-specific-install.sh b/script/site-specific-install.sh index 8917fd577..7d47a5990 100755 --- a/script/site-specific-install.sh +++ b/script/site-specific-install.sh @@ -66,6 +66,11 @@ ensure_line_present \ /etc/postfix/main.cf 644 ensure_line_present \ + "^ *myhostname *=" \ + "myhostname = $(hostname --fqdn)" \ + /etc/postfix/main.cf 644 + +ensure_line_present \ "^do-not-reply" \ "do-not-reply-to-this-address: :blackhole:" \ /etc/aliases 644 |