diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/admin_public_body/_form.rhtml | 15 | ||||
-rw-r--r-- | app/views/admin_public_body/edit.rhtml | 9 | ||||
-rw-r--r-- | app/views/admin_public_body/list.rhtml | 27 | ||||
-rw-r--r-- | app/views/admin_public_body/new.rhtml | 8 | ||||
-rw-r--r-- | app/views/admin_public_body/show.rhtml | 8 | ||||
-rw-r--r-- | app/views/file_request/index.rhtml | 13 | ||||
-rw-r--r-- | app/views/layouts/admin_public_body.rhtml | 17 |
7 files changed, 89 insertions, 8 deletions
diff --git a/app/views/admin_public_body/_form.rhtml b/app/views/admin_public_body/_form.rhtml new file mode 100644 index 000000000..e088ef5c2 --- /dev/null +++ b/app/views/admin_public_body/_form.rhtml @@ -0,0 +1,15 @@ +<%= error_messages_for 'public_body' %> + +<!--[form:public_body]--> +<p><label for="public_body_name">Name</label><br/> +<%= text_field 'public_body', 'name', :size => 60 %></p> +<p><label for="public_body_short_name">Short name</label><br/> +<%= text_field 'public_body', 'short_name', :size => 60 %></p> + +<p><label for="public_body_request_email">Request email</label><br/> +<%= text_field 'public_body', 'request_email', :size => 40 %></p> + +<p><label for="public_body_complaint_email">Complaint email</label><br/> +<%= text_field 'public_body', 'complaint_email', :size => 40 %></p> +<!--[eoform:public_body]--> + diff --git a/app/views/admin_public_body/edit.rhtml b/app/views/admin_public_body/edit.rhtml new file mode 100644 index 000000000..f5c469757 --- /dev/null +++ b/app/views/admin_public_body/edit.rhtml @@ -0,0 +1,9 @@ +<h1>Editing public body</h1> + +<% form_tag :action => 'update', :id => @public_body do %> + <%= render :partial => 'form' %> + <%= submit_tag 'Edit' %> +<% end %> + +<%= link_to 'Show', :action => 'show', :id => @public_body %> | +<%= link_to 'Back', :action => 'list' %> diff --git a/app/views/admin_public_body/list.rhtml b/app/views/admin_public_body/list.rhtml new file mode 100644 index 000000000..ec1c5c431 --- /dev/null +++ b/app/views/admin_public_body/list.rhtml @@ -0,0 +1,27 @@ +<h1>Listing public_bodies</h1> + +<table> + <tr> + <% for column in PublicBody.content_columns %> + <th><%= column.human_name %></th> + <% end %> + </tr> + +<% for public_body in @public_bodies %> + <tr> + <% for column in PublicBody.content_columns %> + <td><%=h public_body.send(column.name) %></td> + <% end %> + <td><%= link_to 'Show', :action => 'show', :id => public_body %></td> + <td><%= link_to 'Edit', :action => 'edit', :id => public_body %></td> + <td><%= link_to 'Destroy', { :action => 'destroy', :id => public_body }, :confirm => 'Are you sure?', :method => :post %></td> + </tr> +<% end %> +</table> + +<%= link_to 'Previous page', { :page => @public_body_pages.current.previous } if @public_body_pages.current.previous %> +<%= link_to 'Next page', { :page => @public_body_pages.current.next } if @public_body_pages.current.next %> + +<br /> + +<%= link_to 'New public_body', :action => 'new' %> diff --git a/app/views/admin_public_body/new.rhtml b/app/views/admin_public_body/new.rhtml new file mode 100644 index 000000000..ee6ce8d81 --- /dev/null +++ b/app/views/admin_public_body/new.rhtml @@ -0,0 +1,8 @@ +<h1>New public body</h1> + +<% form_tag :action => 'create' do %> + <%= render :partial => 'form' %> + <%= submit_tag "Create" %> +<% end %> + +<%= link_to 'Back', :action => 'list' %> diff --git a/app/views/admin_public_body/show.rhtml b/app/views/admin_public_body/show.rhtml new file mode 100644 index 000000000..4e1aa2ad3 --- /dev/null +++ b/app/views/admin_public_body/show.rhtml @@ -0,0 +1,8 @@ +<% for column in PublicBody.content_columns %> +<p> + <b><%= column.human_name %>:</b> <%=h @public_body.send(column.name) %> +</p> +<% end %> + +<%= link_to 'Edit', :action => 'edit', :id => @public_body %> | +<%= link_to 'Back', :action => 'list' %> diff --git a/app/views/file_request/index.rhtml b/app/views/file_request/index.rhtml index c1f686bd7..dec0103fc 100644 --- a/app/views/file_request/index.rhtml +++ b/app/views/file_request/index.rhtml @@ -35,14 +35,11 @@ displayed publically on this website.</p> <!-- (a one line summary of the information you are requesting, e.g. 'Crime statistics by ward level for Wales') --> </p> -<% -=begin %> - <p> - <%= f.text_area :body %> - </p> -<% -=end -%> + <% fields_for :outgoing_message do |o| %> + <p> + <%= o.text_area :body %> + </p> + <% end %> <p> <%= submit_tag "Create" %> diff --git a/app/views/layouts/admin_public_body.rhtml b/app/views/layouts/admin_public_body.rhtml new file mode 100644 index 000000000..18d3caa61 --- /dev/null +++ b/app/views/layouts/admin_public_body.rhtml @@ -0,0 +1,17 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + <meta http-equiv="content-type" content="text/html;charset=UTF-8" /> + <title>AdminPublicBody: <%= controller.action_name %></title> + <%= stylesheet_link_tag 'scaffold' %> +</head> +<body> + +<p style="color: green"><%= flash[:notice] %></p> + +<%= yield %> + +</body> +</html> |