diff options
| -rw-r--r-- | app/views/nodes/edit.html.erb | 58 | ||||
| -rw-r--r-- | public/javascripts/admin_interface.js | 6 |
2 files changed, 38 insertions, 26 deletions
diff --git a/app/views/nodes/edit.html.erb b/app/views/nodes/edit.html.erb index 5973a6c..00815b7 100644 --- a/app/views/nodes/edit.html.erb +++ b/app/views/nodes/edit.html.erb | |||
| @@ -10,30 +10,40 @@ | |||
| 10 | <% form_for(@node) do |f| %> | 10 | <% form_for(@node) do |f| %> |
| 11 | <%= f.error_messages %> | 11 | <%= f.error_messages %> |
| 12 | 12 | ||
| 13 | <table id="metadata"> | 13 | <div id="metadata"> |
| 14 | <tr> | 14 | <table> |
| 15 | <td class="description">Event</td> | 15 | <tr> |
| 16 | <td><%= event_information %></td> | 16 | <td class="description">Event</td> |
| 17 | </tr> | 17 | <td><%= event_information %></td> |
| 18 | <tr> | 18 | </tr> |
| 19 | <td class="description">Slug</td> | 19 | <tr> |
| 20 | <td><%= f.text_field :slug %></td> | 20 | <td class="description">Slug</td> |
| 21 | </tr> | 21 | <td><%= f.text_field :slug %></td> |
| 22 | 22 | </tr> | |
| 23 | <% fields_for @draft do |d| %> | 23 | |
| 24 | <tr> | 24 | <% fields_for @draft do |d| %> |
| 25 | <td class="description">Tags - comma seperated</td> | 25 | <tr> |
| 26 | <td><%= text_field_tag :tag_list, @draft.tag_list %></td> | 26 | <td class="description">Tags - comma seperated</td> |
| 27 | </tr> | 27 | <td><%= text_field_tag :tag_list, @draft.tag_list %></td> |
| 28 | <tr> | 28 | </tr> |
| 29 | <td class="description">Publish at</td> | 29 | <tr> |
| 30 | <td><%= d.datetime_select :published_at %></td> | 30 | <td class="description">Publish at</td> |
| 31 | </tr> | 31 | <td><%= d.datetime_select :published_at %></td> |
| 32 | <tr> | 32 | </tr> |
| 33 | <td class="description">Template</td> | 33 | <tr> |
| 34 | <td><%= d.select :template_name, custom_page_templates, {:prompt => 'Select Template'} %></td> | 34 | <td class="description">Template</td> |
| 35 | </tr> | 35 | <td><%= d.select :template_name, custom_page_templates, {:prompt => 'Select Template'} %></td> |
| 36 | </table> | 36 | </tr> |
| 37 | <tr> | ||
| 38 | <td class="description">Images</td> | ||
| 39 | <td style="height: 200px"> | ||
| 40 | <% @draft.assets.images.each do |image| %> | ||
| 41 | <%= image_tag(image.upload.url(:thumb)) %> | ||
| 42 | <% end %> | ||
| 43 | </td> | ||
| 44 | </tr> | ||
| 45 | </table> | ||
| 46 | </div> | ||
| 37 | 47 | ||
| 38 | <table id="content"> | 48 | <table id="content"> |
| 39 | <tr> | 49 | <tr> |
diff --git a/public/javascripts/admin_interface.js b/public/javascripts/admin_interface.js index b0e43e6..ce971a4 100644 --- a/public/javascripts/admin_interface.js +++ b/public/javascripts/admin_interface.js | |||
| @@ -20,10 +20,10 @@ $(document).ready(function () { | |||
| 20 | 20 | ||
| 21 | meta_data = { | 21 | meta_data = { |
| 22 | initialize : function() { | 22 | initialize : function() { |
| 23 | $("#metadata").attr("style", "display: none;"); | 23 | $("#metadata").hide(); |
| 24 | 24 | ||
| 25 | $("#button").click(function () { | 25 | $("#button").click(function () { |
| 26 | $("#metadata").slideToggle("slow"); | 26 | $("#metadata").slideToggle(1200); |
| 27 | 27 | ||
| 28 | if ($("#button").attr("class") == "unselected") { | 28 | if ($("#button").attr("class") == "unselected") { |
| 29 | $("#button").attr("class", "selected"); | 29 | $("#button").attr("class", "selected"); |
| @@ -31,6 +31,8 @@ meta_data = { | |||
| 31 | else { | 31 | else { |
| 32 | $("#button").attr("class", "unselected"); | 32 | $("#button").attr("class", "unselected"); |
| 33 | } | 33 | } |
| 34 | |||
| 35 | return false; | ||
| 34 | }); | 36 | }); |
| 35 | } | 37 | } |
| 36 | }; | 38 | }; |
