aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/views/admin_public_body_categories/_heading_list.html.erb2
-rw-r--r--app/views/admin_public_body_categories/edit.html.erb27
-rw-r--r--app/views/admin_public_body_categories/new.html.erb14
-rw-r--r--app/views/admin_public_body_headings/edit.html.erb23
-rw-r--r--app/views/admin_public_body_headings/new.html.erb14
5 files changed, 43 insertions, 37 deletions
diff --git a/app/views/admin_public_body_categories/_heading_list.html.erb b/app/views/admin_public_body_categories/_heading_list.html.erb
index f76584592..f92f0c9b0 100644
--- a/app/views/admin_public_body_categories/_heading_list.html.erb
+++ b/app/views/admin_public_body_categories/_heading_list.html.erb
@@ -4,7 +4,7 @@
<div class="accordion-heading accordion-toggle row">
<span class="item-title span6">
<a href="#heading_<%= heading.id %>_categories" data-toggle="collapse" data-parent="#categories">
- <span class="badge"><%= category_headings.size %></span>
+ <span class="badge"><%= heading.public_body_categories.size %></span>
<%= chevron_right %>
</a>
<strong><%= link_to(heading.name, edit_admin_heading_path(heading), :title => "view full details") %></strong>
diff --git a/app/views/admin_public_body_categories/edit.html.erb b/app/views/admin_public_body_categories/edit.html.erb
index 0664a0515..f83d0768d 100644
--- a/app/views/admin_public_body_categories/edit.html.erb
+++ b/app/views/admin_public_body_categories/edit.html.erb
@@ -8,23 +8,28 @@
<div class="form-actions">
<%= f.submit 'Save', :accesskey => 's', :class => "btn btn-success" %>
+ <%= link_to 'List all', admin_categories_path, :class => "btn" %>
</div>
<% end %>
+ </div>
</div>
</div>
-<div class="row">
- <div class="span8 well">
- <%= link_to 'List all', admin_categories_path, :class => "btn" %>
- </div>
-</div>
+<hr />
<div class="row">
- <div class="span8">
- <%= form_for @category, :url => admin_category_path(@category), :method => 'delete', :class => "form form-inline" do |f| %>
- <%= f.submit "Destroy #{ @category.title }",
- :title => @category.title,
- :class => "btn btn-danger" %> (this is permanent!)
- <% end %>
+ <div class="span12">
+ <div class="well">
+ <%= form_for @category, :url => admin_category_path(@category), :method => 'delete', :class => "form form-inline" do |f| %>
+ <%= f.submit "Destroy #{ @category.title }",
+ :title => @category.title,
+ :class => "btn btn-danger",
+ :confirm => 'Are you sure?' %>
+ <span class="help-block">
+ Destroying a category does not destroy the public authorities
+ associated with the category.
+ </span>
+ <% end %>
+ </div>
</div>
</div>
diff --git a/app/views/admin_public_body_categories/new.html.erb b/app/views/admin_public_body_categories/new.html.erb
index 8b1b1103f..ed9f06d7c 100644
--- a/app/views/admin_public_body_categories/new.html.erb
+++ b/app/views/admin_public_body_categories/new.html.erb
@@ -1,21 +1,17 @@
<% @title = 'New category' %>
-<h1><%=@title%></h1>
+<h1><%= @title %></h1>
<div class="row">
<div class="span8">
<div id="public_category_form">
- <%= form_for @category, :url => admin_categories_path, :html => {:class => "form form-horizontal"} do |f| %>
- <%= render :partial => 'form', :locals => {:f => f} %>
+ <%= form_for @category, :url => admin_categories_path, :html => { :class => "form form-horizontal" } do |f| %>
+ <%= render :partial => 'form', :locals => { :f => f } %>
<div class="form-actions">
<%= f.submit "Create", :class => "btn btn-primary" %>
+ <%= link_to 'List all', admin_categories_path, :class => "btn" %>
</div>
- <% end %>
- <div class="row">
- <div class="span8 well">
- <%= link_to 'List all', admin_categories_path, :class => "btn" %>
- </div>
- </div>
+ <% end %>
</div>
</div>
</div>
diff --git a/app/views/admin_public_body_headings/edit.html.erb b/app/views/admin_public_body_headings/edit.html.erb
index 800394aa4..d4bc02562 100644
--- a/app/views/admin_public_body_headings/edit.html.erb
+++ b/app/views/admin_public_body_headings/edit.html.erb
@@ -8,23 +8,32 @@
<div class="form-actions">
<%= f.submit 'Save', :accesskey => 's', :class => "btn btn-success" %>
+ <%= link_to 'List all', admin_categories_path, :class => "btn" %>
</div>
<% end %>
+ </div>
</div>
</div>
-<div class="row">
- <div class="span8 well">
- <%= link_to 'List all', admin_categories_path, :class => "btn" %>
- </div>
-</div>
+<hr />
<div class="row">
- <div class="span8">
+ <div class="span12">
+ <div class="well">
<%= form_for @heading, :url => admin_heading_path(@heading), :method => 'delete', :class => "form form-inline" do |f| %>
<%= f.submit "Destroy #{ @heading.name }",
:name => @heading.name,
- :class => "btn btn-danger" %> (this is permanent!)
+ :class => "btn btn-danger",
+ :confirm => 'Are you sure?' %>
+ <span class="help-block">
+ <ul>
+ <li>Destroying a category heading only destroys the heading itself.</li>
+ <li>Child categories assigned to another heading remain assigned to the other heading.</li>
+ <li>Child categories with no other heading become "Categories with no heading".</li>
+ <li>Public authorities remain assigned to the categories.</li>
+ </ul>
+ </span>
<% end %>
+ </div>
</div>
</div>
diff --git a/app/views/admin_public_body_headings/new.html.erb b/app/views/admin_public_body_headings/new.html.erb
index 91d5d4a9d..c6fe514b0 100644
--- a/app/views/admin_public_body_headings/new.html.erb
+++ b/app/views/admin_public_body_headings/new.html.erb
@@ -1,21 +1,17 @@
<% @title = 'New category heading' %>
-<h1><%=@title%></h1>
+<h1><%= @title %></h1>
<div class="row">
<div class="span8">
<div id="public_heading_form">
- <%= form_for @heading, :url => admin_headings_path, :html => {:class => "form form-horizontal"} do |f| %>
- <%= render :partial => 'form', :locals => {:f => f} %>
+ <%= form_for @heading, :url => admin_headings_path, :html => { :class => "form form-horizontal" } do |f| %>
+ <%= render :partial => 'form', :locals => { :f => f } %>
<div class="form-actions">
<%= f.submit "Create", :class => "btn btn-primary" %>
+ <%= link_to 'List all', admin_categories_path, :class => "btn" %>
</div>
- <% end %>
- <div class="row">
- <div class="span8 well">
- <%= link_to 'List all', admin_categories_path, :class => "btn" %>
- </div>
- </div>
+ <% end %>
</div>
</div>
</div>