diff options
author | francis <francis> | 2008-11-03 21:45:11 +0000 |
---|---|---|
committer | francis <francis> | 2008-11-03 21:45:11 +0000 |
commit | 9baeea85ce25fca200e68d095651f54bb368043f (patch) | |
tree | 93714c2eac9463d92aa3dadea5f7d03d71f5ac70 | |
parent | 47e8f469b85f33a331bd9709d5cf15ea7d1d738b (diff) |
Show list of tags on side of admin page now there are so many.
-rw-r--r-- | app/views/admin_public_body/_form.rhtml | 29 | ||||
-rw-r--r-- | public/stylesheets/admin.css | 8 |
2 files changed, 29 insertions, 8 deletions
diff --git a/app/views/admin_public_body/_form.rhtml b/app/views/admin_public_body/_form.rhtml index d5da64603..fdcf3e972 100644 --- a/app/views/admin_public_body/_form.rhtml +++ b/app/views/admin_public_body/_form.rhtml @@ -2,6 +2,25 @@ <!--[form:public_body]--> +<div id="tag_help"> + <h2>List of tags</h2> + <% first_row = true %> + <% for row in PublicBody.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> + <p><label for="public_body_name">Name</label><br/> <%= text_field 'public_body', 'name', :size => 60 %></p> @@ -17,14 +36,8 @@ <p><label for="public_body_notes">Notes</label> (for users to consider when making FOI requests to the authority)<br/> <%= text_area 'public_body', 'notes', :rows => 3, :cols => 60 %></p> -<p><label for="public_body_tag_string">Tags (space separated: - <% for category, description in PublicBody.categories_by_tag %> - <% if category != "other" %> - <strong><%= category %></strong>=<%= description %>; - <% end %> - <% end %> -)</label><br/> -<%= text_field 'public_body', 'tag_string', :size => 80 %></p> +<p><label for="public_body_tag_string">Tags (space separated; see list of tags on the right)</label><br/> +<%= text_field 'public_body', 'tag_string', :size => 60 %></p> <p><label for="public_body_last_edit_comment">Comment for this edit</label> (put URL or other source of new info)<br/> <%= text_area 'public_body', 'last_edit_comment', :rows => 2, :cols => 60 %></p> diff --git a/public/stylesheets/admin.css b/public/stylesheets/admin.css index 3123818c7..d35851b3b 100644 --- a/public/stylesheets/admin.css +++ b/public/stylesheets/admin.css @@ -37,4 +37,12 @@ form { border: solid 1px red; padding: 1em; } +#tag_help { + float: right; + width: 25%; +} +#tag_help, h2 { + margin-top: 0; +} + |