diff options
| author | hukl <contact@smyck.org> | 2009-09-01 23:13:45 +0200 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-09-01 23:13:45 +0200 |
| commit | cae5b4accca2f880bbd4a5ffae265f78c689075c (patch) | |
| tree | 1688c0e655559999b4963846a80ba34b95b79c7f /app/views | |
| parent | 656af6c97987e103c30946ec944cac433252fe75 (diff) | |
Added javascript goodness to add and sort and drag and drop images on pages
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/nodes/edit.html.erb | 23 | ||||
| -rw-r--r-- | app/views/nodes/show.html.erb | 2 |
2 files changed, 20 insertions, 5 deletions
diff --git a/app/views/nodes/edit.html.erb b/app/views/nodes/edit.html.erb index 00815b7..a8138c2 100644 --- a/app/views/nodes/edit.html.erb +++ b/app/views/nodes/edit.html.erb | |||
| @@ -36,10 +36,15 @@ | |||
| 36 | </tr> | 36 | </tr> |
| 37 | <tr> | 37 | <tr> |
| 38 | <td class="description">Images</td> | 38 | <td class="description">Images</td> |
| 39 | <td style="height: 200px"> | 39 | <td> |
| 40 | <% @draft.assets.images.each do |image| %> | 40 | <ul id="image_box" rel="<%= @draft.id %>"> |
| 41 | <%= image_tag(image.upload.url(:thumb)) %> | 41 | <% @draft.assets.images.each do |image| %> |
| 42 | <% end %> | 42 | <li rel="images_<%= image.id %>"> |
| 43 | <%= image_tag(image.upload.url(:thumb)) %> | ||
| 44 | </li> | ||
| 45 | <% end %> | ||
| 46 | </ul> | ||
| 47 | add image | ||
| 43 | </td> | 48 | </td> |
| 44 | </tr> | 49 | </tr> |
| 45 | </table> | 50 | </table> |
| @@ -69,4 +74,14 @@ | |||
| 69 | </table> | 74 | </table> |
| 70 | <% end %> | 75 | <% end %> |
| 71 | <% end %> | 76 | <% end %> |
| 77 | </div> | ||
| 78 | |||
| 79 | |||
| 80 | |||
| 81 | <div id="asset_toolbox"> | ||
| 82 | <ul> | ||
| 83 | <% Asset.images.each do |image| %> | ||
| 84 | <li rel="images_<%= image.id %>"><%= image_tag(image.upload.url(:thumb)) %></li> | ||
| 85 | <% end %> | ||
| 86 | </ul> | ||
| 72 | </div> \ No newline at end of file | 87 | </div> \ No newline at end of file |
diff --git a/app/views/nodes/show.html.erb b/app/views/nodes/show.html.erb index 8aaedc5..15547f9 100644 --- a/app/views/nodes/show.html.erb +++ b/app/views/nodes/show.html.erb | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | <% content_for :subnavigation do %> | 1 | <% content_for :subnavigation do %> |
| 2 | <%= link_to 'Edit', edit_node_path(@node), :id => 'button', :class => "unselected" %> | 2 | <%= link_to 'Edit', edit_node_path(@node), :class => "unselected" %> |
| 3 | <%= link_to 'Preview', preview_page_path(@page) %> | 3 | <%= link_to 'Preview', preview_page_path(@page) %> |
| 4 | <%= link_to 'Revisions', revision_path(params[:id]) %> | 4 | <%= link_to 'Revisions', revision_path(params[:id]) %> |
| 5 | <% end %> | 5 | <% end %> |
