diff options
-rw-r--r-- | app/views/request/frontpage.rhtml | 20 | ||||
-rw-r--r-- | app/views/request/list.rhtml | 23 | ||||
-rw-r--r-- | app/views/request/show.rhtml (renamed from app/views/request/index.rhtml) | 0 |
3 files changed, 43 insertions, 0 deletions
diff --git a/app/views/request/frontpage.rhtml b/app/views/request/frontpage.rhtml new file mode 100644 index 000000000..f44aa95b3 --- /dev/null +++ b/app/views/request/frontpage.rhtml @@ -0,0 +1,20 @@ +<div id="frontpage"> + + <div id="make_requests"> + <h1>Make requests for information from the UK Government</h1> + + <% form_for(:info_request, @info_request, :url => { :controller => :new, :action => :index }, :html => { :id => 'public_body_form', :class => 'plaque' } ) do |f| %> + <p>Choose which public body you would like information from.</p> + <%= @public_bodies = PublicBody.find(:all, :order => "name") + f.collection_select(:public_body_id, @public_bodies, :id, :name) %> + <p><%= submit_tag "Submit >>" %></p> + <% end %> + </div> + + <div id="find_information"> + <h1>Find information that others requested</h1> + <p><a href="/list">View all information</a></p> + </div> + + +</div> diff --git a/app/views/request/list.rhtml b/app/views/request/list.rhtml new file mode 100644 index 000000000..47b3bfc55 --- /dev/null +++ b/app/views/request/list.rhtml @@ -0,0 +1,23 @@ +<% @title = "Recent Freedom of Information requests" %> + +<h2><%=@title%></h2> + +<table id="list_requests"> + <tr> + <th>Public body</th> + <th>Title</th> + <th>Requester</th> + <th>Created</th> + + </tr> + +<% for info_request in @info_requests %> + <tr class="<%= cycle('odd', 'even') %>"> + <td><%= link_to h(info_request.public_body.short_name), :controller => 'body', :action => 'show', :short_name => info_request.public_body.short_name %></td> + <td><%= link_to h(info_request.title), :controller => 'request', :action => 'index', :id => info_request %></td> + <td><%= link_to h(info_request.user.name), :controller => 'user', :action => 'index', :name => info_request.user.name %></td> + <td><%= simple_date(info_request.created_at) %></td> + </tr> +<% end %> +</table> + diff --git a/app/views/request/index.rhtml b/app/views/request/show.rhtml index 950ecd8e9..950ecd8e9 100644 --- a/app/views/request/index.rhtml +++ b/app/views/request/show.rhtml |