aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/admin_track_controller_spec.rb
blob: 4d5b0ac5e51207f294b54844c997e64d1a52b813 (plain)
1
2
3
4
5
6
7
8
9
10
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe AdminTrackController, "when administering tracks" do
    integrate_views
    fixtures :track_things, :users
  
    it "shows the list page" do
        get :list
    end
end
if @highlight_words.nil? @highlight_words = [] end %> <div class="request_listing"> <div class="request_left"> <span class="head"> <% if event.is_incoming_message? %> <%= link_to highlight_words(info_request.title, @highlight_words), incoming_message_path(event.incoming_message_selective_columns("incoming_messages.id")) %> <% elsif event.is_outgoing_message? and event.event_type == 'followup_sent' %> <%= link_to highlight_words(info_request.title, @highlight_words), outgoing_message_path(event.outgoing_message) %> <% elsif event.is_comment? %> <%= link_to highlight_words(info_request.title, @highlight_words), comment_path(event.comment) %> <% else %> <%= link_to highlight_words(info_request.title, @highlight_words), request_path(info_request) %> <% end %> </span> <div class="requester"> <% if event.event_type == 'sent' %> <%= _('Request sent to {{public_body_name}} by {{info_request_user}} on {{date}}.',:public_body_name=>public_body_link_absolute(info_request.public_body),:info_request_user=>request_user_link_absolute(info_request),:date=>simple_date(event.created_at )) %> <% elsif event.event_type == 'followup_sent' %> <%=event.display_status %> <%= _('sent to {{public_body_name}} by {{info_request_user}} on {{date}}.',:public_body_name=>public_body_link_absolute(info_request.public_body),:info_request_user=>request_user_link_absolute(info_request),:date=>simple_date(event.created_at )) %> <% elsif event.event_type == 'response' %> <%=event.display_status %> <%= _('by {{public_body_name}} to {{info_request_user}} on {{date}}.',:public_body_name=>public_body_link_absolute(info_request.public_body),:info_request_user=>request_user_link_absolute(info_request),:date=>simple_date(event.created_at )) %> <% elsif event.event_type == 'comment' %> <%= _('Request to {{public_body_name}} by {{info_request_user}}. Annotated by {{event_comment_user}} on {{date}}.',:public_body_name=>public_body_link_absolute(info_request.public_body),:info_request_user=>request_user_link_absolute(info_request),:event_comment_user=>user_link_absolute(event.comment.user),:date=>simple_date(event.created_at)) %> <% else %> <%# Events of other types will not be indexed: see InfoRequestEvent#indexed_by_search? However, it can happen that we see other types of event transiently here in the period between a change being made and the update-xapian-index job being run. %> <!-- Event of type '<%= event.event_type %>', id=<%= event.id %> --> <% end %> </div> <span class="bottomline icon_<%= info_request.calculate_status %>"> <strong> <%= info_request.display_status(cached_value_ok=true) %> </strong><br> </span> </div> <div class="request_right"> <span class="desc"> <%= highlight_and_excerpt(event.search_text_main(true), @highlight_words, 150) %> </span> </div> </div>