aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/views/admin_public_body/_form.rhtml30
-rw-r--r--app/views/admin_public_body/_tag_help.rhtml18
-rw-r--r--app/views/admin_public_body/edit.rhtml35
-rw-r--r--app/views/admin_public_body/new.rhtml17
-rw-r--r--app/views/layouts/admin.rhtml8
5 files changed, 52 insertions, 56 deletions
diff --git a/app/views/admin_public_body/_form.rhtml b/app/views/admin_public_body/_form.rhtml
index 15313bbdd..191b29e89 100644
--- a/app/views/admin_public_body/_form.rhtml
+++ b/app/views/admin_public_body/_form.rhtml
@@ -2,38 +2,13 @@
<!--[form:public_body]-->
-<!--
- XXX: disabled temporarily while testing jQuery tabs
-
- <div id="tag_help">
- <h2>List of tags</h2>
- <% first_row = true %>
- <% for row in PublicBodyCategories::CATEGORIES_WITH_HEADINGS %>
- <% if row.instance_of?(Array) %>
- <% if row[0] != 'other' %>
- <strong><%= row[0] %></strong>=<%= row[1] %>
- <br/>
- <% end %>
- <% elsif row != 'Miscellaneous' %>
- <% if not first_row %>
- <% else %>
- <% first_row = false %>
- <% end %>
- <h3><%=h row%></h3>
- <% end %>
- <% end %>
-</div> -->
-
-<h3>Localized Fields</h3>
<div id="div-locales">
-
<ul>
<% for locale in I18n.available_locales do %>
<li><a href="#div-locale-<%=locale.to_s%>"><%=locale_name(locale.to_s)%></a></li>
<% end %>
</ul>
-
<%
for locale in I18n.available_locales do
if locale==I18n.default_locale # The default locale is submitted as part of the bigger object...
@@ -50,7 +25,7 @@
%>
<div id="div-locale-<%=locale.to_s%>">
<%= t.hidden_field :locale, :value => locale.to_s %>
-
+
<p><label for="public_body_name">Name</label><br/>
<%= t.text_field :name, :size => 60 %></p>
@@ -82,6 +57,5 @@
<p><label for="public_body_last_edit_comment"><strong>Comment</strong> for this edit</label> <small>(put URL or other source of new info)</small><br/>
<%= f.text_area :last_edit_comment, :rows => 3, :cols => 60 %></p>
-<!--[eoform:public_body]-->
-
+<!--[eoform:public_body]-->
diff --git a/app/views/admin_public_body/_tag_help.rhtml b/app/views/admin_public_body/_tag_help.rhtml
new file mode 100644
index 000000000..7954ff992
--- /dev/null
+++ b/app/views/admin_public_body/_tag_help.rhtml
@@ -0,0 +1,18 @@
+<div id="tag_help">
+ <h2>List of tags</h2>
+ <% first_row = true %>
+ <% for row in PublicBodyCategories::CATEGORIES_WITH_HEADINGS %>
+ <% if row.instance_of?(Array) %>
+ <% if row[0] != 'other' %>
+ <strong><%= row[0] %></strong>=<%= row[1] %>
+ <br/>
+ <% end %>
+ <% elsif row != 'Miscellaneous' %>
+ <% if not first_row %>
+ <% else %>
+ <% first_row = false %>
+ <% end %>
+ <h3><%=h row%></h3>
+ <% end %>
+ <% end %>
+</div> \ No newline at end of file
diff --git a/app/views/admin_public_body/edit.rhtml b/app/views/admin_public_body/edit.rhtml
index b895fbd70..1883eb083 100644
--- a/app/views/admin_public_body/edit.rhtml
+++ b/app/views/admin_public_body/edit.rhtml
@@ -6,22 +6,25 @@
});
</script>
-<% form_for @public_body, :url => {:action => 'update'} do |f| %>
- <%= render :partial => 'form', :locals => {:f => f} %>
- <p><%= f.submit 'Save', :accesskey => 's' %></p>
-<% end %>
+<%= render :partial => 'tag_help' %>
-<p>
-<%= link_to 'Show', '../show/' + @public_body.id.to_s %> |
-<%= link_to 'List all', '../list' %>
-</p>
-
-<% if @public_body.info_requests.size == 0 %>
- <% form_tag('../destroy/' + @public_body.id.to_s) do %>
- <p>
- <%= hidden_field_tag(:public_body_id, { :value => @public_body.id } ) %>
- <%= submit_tag "Destroy " + @public_body.name %> (this is permanent!)
- </p>
+<div id="public_body_form">
+ <% form_for @public_body, :url => {:action => 'update'} do |f| %>
+ <%= render :partial => 'form', :locals => {:f => f} %>
+ <p><%= f.submit 'Save', :accesskey => 's' %></p>
<% end %>
-<% end %>
+ <p>
+ <%= link_to 'Show', '../show/' + @public_body.id.to_s %> |
+ <%= link_to 'List all', '../list' %>
+ </p>
+
+ <% if @public_body.info_requests.size == 0 %>
+ <% form_tag('../destroy/' + @public_body.id.to_s) do %>
+ <p>
+ <%= hidden_field_tag(:public_body_id, { :value => @public_body.id } ) %>
+ <%= submit_tag "Destroy " + @public_body.name %> (this is permanent!)
+ </p>
+ <% end %>
+ <% end %>
+</div>
diff --git a/app/views/admin_public_body/new.rhtml b/app/views/admin_public_body/new.rhtml
index dcef8ae9f..11186ee47 100644
--- a/app/views/admin_public_body/new.rhtml
+++ b/app/views/admin_public_body/new.rhtml
@@ -8,12 +8,15 @@
});
</script>
+<%= render :partial => 'tag_help' %>
-<% form_for :public_body, @public_body, :url => {:action => "create"} do |f| %>
- <%= render :partial => 'form', :locals => {:f => f} %>
- <p><%= f.submit "Create" %></p>
-<% end %>
+<div id="public_body_form">
+ <% form_for :public_body, @public_body, :url => {:action => "create"} do |f| %>
+ <%= render :partial => 'form', :locals => {:f => f} %>
+ <p><%= f.submit "Create" %></p>
+ <% end %>
-<p>
-<%= link_to 'List all', 'list' %>
-</p> \ No newline at end of file
+ <p>
+ <%= link_to 'List all', 'list' %>
+ </p>
+</div>
diff --git a/app/views/layouts/admin.rhtml b/app/views/layouts/admin.rhtml
index c81ac889f..42ca5dbbb 100644
--- a/app/views/layouts/admin.rhtml
+++ b/app/views/layouts/admin.rhtml
@@ -4,12 +4,10 @@
<meta http-equiv="content-type" content="text/html;charset=UTF-8" >
<title><%= site_name %> admin<%= @title ? ":" : "" %> <%=@title%></title>
- <!-- XXX: use local versions once we agree on tabs -->
- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.15/jquery-ui.min.js"></script>
+ <%= javascript_include_tag 'jquery.js', 'jquery-ui.min' %>
+ <%= stylesheet_link_tag 'admin-theme/jquery-ui-1.8.15.custom.css', :rel => 'stylesheet'%>
<%= stylesheet_link_tag 'admin', :title => "Main", :rel => "stylesheet" %>
- <%= stylesheet_link_tag 'ui-lightness/jquery-ui-1.8.15.custom.css', :rel => 'stylesheet'%>
</head>
<body>
@@ -36,6 +34,6 @@
<% end %>
<%= yield %>
-
+
</body>
</html>