summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-06-23 18:04:37 +0200
committererdgeist <erdgeist@erdgeist.org>2026-06-23 18:04:37 +0200
commit6424e10be5a89f175a74c71c55660412a169b8b8 (patch)
treeae8c8111bd1e8c6e82c0a5f9a2c4b088c92bafe5 /app
parent375ed745052148faeb34763087fe04214105f1b8 (diff)
Update deployed state to what's currently running
Diffstat (limited to 'app')
-rw-r--r--app/controllers/nodes_controller.rb1
-rw-r--r--app/helpers/admin_helper.rb4
-rw-r--r--app/helpers/content_helper.rb6
-rw-r--r--app/models/node.rb29
-rw-r--r--app/models/page.rb15
-rw-r--r--app/views/admin/index.html.erb18
-rw-r--r--app/views/content/_featured_articles.html.erb6
-rw-r--r--app/views/content/_main_navigation.html.erb6
-rw-r--r--app/views/content/_search.html.erb9
-rw-r--r--app/views/content/_tags.html.erb4
-rw-r--r--app/views/layouts/application.html.erb43
-rw-r--r--app/views/nodes/edit.html.erb156
12 files changed, 161 insertions, 136 deletions
diff --git a/app/controllers/nodes_controller.rb b/app/controllers/nodes_controller.rb
index b8cd644..95aed48 100644
--- a/app/controllers/nodes_controller.rb
+++ b/app/controllers/nodes_controller.rb
@@ -55,6 +55,7 @@ class NodesController < ApplicationController
55 55
56 def show 56 def show
57 node = Node.find(params[:id]) 57 node = Node.find(params[:id])
58 node.wipe_draft!
58 @page = node.draft || node.head 59 @page = node.draft || node.head
59 end 60 end
60 61
diff --git a/app/helpers/admin_helper.rb b/app/helpers/admin_helper.rb
index 232862b..389f6dc 100644
--- a/app/helpers/admin_helper.rb
+++ b/app/helpers/admin_helper.rb
@@ -3,9 +3,9 @@ module AdminHelper
3 def language_selector 3 def language_selector
4 case I18n.locale 4 case I18n.locale
5 when :de 5 when :de
6 link_to 'English (Aktiv: Deutsch)', url_for(:overwrite_params => {:locale => :en}) 6 link_to raw('<span class="inactive">English</span>'), url_for(:overwrite_params => {:locale => :en})
7 when :en 7 when :en
8 link_to 'Deutsch (Active: English)', url_for(:overwrite_params => {:locale => :de}) 8 link_to raw('<span class="inactive">Deutsch</span>'), url_for(:overwrite_params => {:locale => :de})
9 end 9 end
10 end 10 end
11end 11end
diff --git a/app/helpers/content_helper.rb b/app/helpers/content_helper.rb
index 7286976..17364f8 100644
--- a/app/helpers/content_helper.rb
+++ b/app/helpers/content_helper.rb
@@ -43,7 +43,7 @@ module ContentHelper
43 # Returns the published_at attribute of a page if it is not nil, otherwise 43 # Returns the published_at attribute of a page if it is not nil, otherwise
44 # it returns the auto-filled value of the created_at attribute 44 # it returns the auto-filled value of the created_at attribute
45 def date_for_page page 45 def date_for_page page
46 page.published_at.to_s(:db) rescue page.created_at.to_s(:db) 46 I18n.l(page.published_at, :format => :ccc) rescue I18n.l(page.created_at, :format => :ccc)
47 end 47 end
48 48
49 def author_for_page page 49 def author_for_page page
@@ -80,10 +80,10 @@ module ContentHelper
80 begin 80 begin
81 if content =~ /<aggregate([^<>]*)>/ 81 if content =~ /<aggregate([^<>]*)>/
82 tag = $~.to_s 82 tag = $~.to_s
83 matched_data = $1.scan(/\w+\=\"[a-zA-Z\s\/_\d,]*\"/) 83 matched_data = $1.scan(/\w+\=\"[a-zA-Z\s\/_\d,.=]*\"/)
84 84
85 matched_data.each do |data| 85 matched_data.each do |data|
86 splitted_data = data.split("=") 86 splitted_data = data.split("=", 2)
87 options[splitted_data[0].to_sym] = splitted_data[1].gsub(/\"/, "") 87 options[splitted_data[0].to_sym] = splitted_data[1].gsub(/\"/, "")
88 end 88 end
89 89
diff --git a/app/models/node.rb b/app/models/node.rb
index 6c11fed..75122d1 100644
--- a/app/models/node.rb
+++ b/app/models/node.rb
@@ -3,11 +3,11 @@ class Node < ActiveRecord::Base
3 acts_as_nested_set 3 acts_as_nested_set
4 4
5 # Associations 5 # Associations
6 has_many :pages, :order => "revision ASC" 6 has_many :pages, :order => "revision ASC", :dependent => :destroy
7 belongs_to :head, :class_name => "Page", :foreign_key => :head_id 7 belongs_to :head, :class_name => "Page", :foreign_key => :head_id, :dependent => :destroy
8 belongs_to :draft, :class_name => "Page", :foreign_key => :draft_id 8 belongs_to :draft, :class_name => "Page", :foreign_key => :draft_id, :dependent => :destroy
9 has_many :permissions 9 has_many :permissions, :dependent => :destroy
10 has_one :event 10 has_one :event, :dependent => :destroy
11 belongs_to :lock_owner, :class_name => "User", :foreign_key => :locking_user_id 11 belongs_to :lock_owner, :class_name => "User", :foreign_key => :locking_user_id
12 12
13 # Callbacks 13 # Callbacks
@@ -60,6 +60,7 @@ class Node < ActiveRecord::Base
60 # Instance Methods 60 # Instance Methods
61 61
62 def find_or_create_draft current_user 62 def find_or_create_draft current_user
63 self.wipe_draft!
63 if draft && self.lock_owner == current_user 64 if draft && self.lock_owner == current_user
64 draft 65 draft
65 elsif draft && self.lock_owner.nil? 66 elsif draft && self.lock_owner.nil?
@@ -115,6 +116,24 @@ class Node < ActiveRecord::Base
115 end 116 end
116 end 117 end
117 118
119 # removes a draft and the lock if it is older than a day and still
120 # identical to head
121 def wipe_draft!
122 unless self.draft
123 self.unlock!
124 return
125 end
126 return unless self.head
127 return unless self.draft.updated_at < 1.day.ago
128 return if Page.find(self.head).has_changes_to? self.draft
129
130 self.draft.destroy
131 self.draft_id = nil
132 self.unlock!
133 self.save!
134 self.reload
135 end
136
118 def restore_revision! revision 137 def restore_revision! revision
119 if page = self.pages.find_by_revision(revision) 138 if page = self.pages.find_by_revision(revision)
120 self.head = page 139 self.head = page
diff --git a/app/models/page.rb b/app/models/page.rb
index 0cfad53..f804353 100644
--- a/app/models/page.rb
+++ b/app/models/page.rb
@@ -64,7 +64,7 @@ class Page < ActiveRecord::Base
64 64
65 Page.heads.paginate( 65 Page.heads.paginate(
66 find_options_for_find_tagged_with( 66 find_options_for_find_tagged_with(
67 options[:tags].gsub(/\s/, ","), :match_all => true 67 options[:tags].gsub(/\s/, ","), :match_all => true, :conditions => options[:conditions]
68 ).merge( 68 ).merge(
69 :page => page, 69 :page => page,
70 :per_page => options[:limit], 70 :per_page => options[:limit],
@@ -94,6 +94,19 @@ class Page < ActiveRecord::Base
94 end 94 end
95 end 95 end
96 96
97 # Is used to compare a node's head with the node's draft
98
99 def has_changes_to? draft
100 return true unless node == draft.node
101 return true unless assets == draft.assets
102 return true unless tag_list == draft.tag_list
103 return true unless template_name == draft.template_name
104 return true unless translated_locales.sort_by(&:to_s) == draft.translated_locales.sort_by(&:to_s)
105 changed = false
106 translated_locales.each { |locale| I18n.with_locale(locale) { changed = true unless title == draft.title && abstract == draft.abstract && body == draft.body } }
107 return changed
108 end
109
97 # Instance Methods 110 # Instance Methods
98 111
99 def public_template_path 112 def public_template_path
diff --git a/app/views/admin/index.html.erb b/app/views/admin/index.html.erb
index edad1d6..2741db3 100644
--- a/app/views/admin/index.html.erb
+++ b/app/views/admin/index.html.erb
@@ -1,14 +1,14 @@
1<div id="admin_wizard"> 1<div id="admin_wizard">
2 <%= link_to 'Create Update or Pressemitteilung', new_node_path, :only_path => false %> 2 <div class="admin_wizard_button"><%= link_to 'Create Update or Pressemitteilung', new_node_path, :only_path => false %></div>
3 <a href="#" id="admin_wizard_my_work" class="admin_wizard_button button">Continue my work</a> 3 <div class="admin_wizard_button"><a href="#" id="admin_wizard_my_work" class="button">Continue my work</a></div>
4 <a href="#" id="admin_wizard_create_page" class="admin_wizard_button button">Add a page in the page tree</a> 4 <div class="admin_wizard_button"><a href="#" id="admin_wizard_create_page" class="button">Add a page in the page tree</a></div>
5 <%= link_to("Upload a new asset", new_asset_path, :only_path => false) %> 5 <div class="admin_wizard_button"><%= link_to("Upload a new asset", new_asset_path, :only_path => false) %></div>
6</div> 6</div>
7 7
8<p id="overview_toggle"> 8<p id="overview_toggle">
9 <a href="#" id="recent_changes_toggle" class="button">recent changes</a> 9 <a href="#" id="recent_changes_toggle" class="button">recent changes</a>
10 <a href="#" id="my_work_toggle" class="button">my work</a> 10 <a href="#" id="my_work_toggle" class="button">my work</a>
11 <a href="#" id="current_drafts_toggle" class="button">current drafts</a> 11 <a href="#" id="current_drafts_toggle" class="button">current drafts (<%= @drafts_count %>)</a>
12 <a href="#" id="admin_sitemap_toggle" class="button">site map</a> 12 <a href="#" id="admin_sitemap_toggle" class="button">site map</a>
13</p> 13</p>
14 14
@@ -39,7 +39,7 @@
39 <%= node.lock_owner.login if node.lock_owner %> 39 <%= node.lock_owner.login if node.lock_owner %>
40 </td> 40 </td>
41 <td> 41 <td>
42 <%= node.draft ? node.draft.revision : node.head.revision %> 42 <%= link_to ( node.draft ? node.draft.revision : (node.head ? node.head.revision : "EMPTY" ) ), node_revisions_path(node) %>
43 </td> 43 </td>
44 </tr> 44 </tr>
45 <% end %> 45 <% end %>
@@ -73,7 +73,7 @@
73 <%= node.lock_owner.login if node.lock_owner %> 73 <%= node.lock_owner.login if node.lock_owner %>
74 </td> 74 </td>
75 <td> 75 <td>
76 <%= node.draft ? node.draft.revision : node.head.revision %> 76 <%= link_to ( node.draft ? node.draft.revision : (node.head ? node.head.revision : "EMPTY" ) ), node_revisions_path(node) %>
77 </td> 77 </td>
78 </tr> 78 </tr>
79 <% end %> 79 <% end %>
@@ -107,7 +107,7 @@
107 <%= node.lock_owner.login if node.lock_owner %> 107 <%= node.lock_owner.login if node.lock_owner %>
108 </td> 108 </td>
109 <td> 109 <td>
110 <%= node.draft ? node.draft.revision : ( node.head ? node.head.revision : "EMPTY" ) %> 110 <%= link_to ( node.draft ? node.draft.revision : (node.head ? node.head.revision : "EMPTY" ) ), node_revisions_path(node) %>
111 </td> 111 </td>
112 </tr> 112 </tr>
113 <% end %> 113 <% end %>
@@ -135,7 +135,7 @@
135 </td> 135 </td>
136 <td class="actions"> 136 <td class="actions">
137 <%= link_to 'create subpage', new_node_path(:parent_id => node.id) %> 137 <%= link_to 'create subpage', new_node_path(:parent_id => node.id) %>
138 <%= link_to ':: Revisions', node_revisions_path(node) %> 138 <%= link_to 'Revisions', node_revisions_path(node) %>
139 </td> 139 </td>
140 <td> 140 <td>
141 <%= node.lock_owner.login if node.lock_owner %> 141 <%= node.lock_owner.login if node.lock_owner %>
diff --git a/app/views/content/_featured_articles.html.erb b/app/views/content/_featured_articles.html.erb
index 0220abb..c69911f 100644
--- a/app/views/content/_featured_articles.html.erb
+++ b/app/views/content/_featured_articles.html.erb
@@ -11,7 +11,7 @@
11 11
12 <%= link_to( 12 <%= link_to(
13 image_tag( 'chaosradio.png' ), 13 image_tag( 'chaosradio.png' ),
14 "http://chaosradio.ccc.de/", 14 "https://chaosradio.ccc.de/",
15 :id => "chaosradio_icon", 15 :id => "chaosradio_icon",
16 :title => "Chaosradio" 16 :title => "Chaosradio"
17 )%> 17 )%>
@@ -25,14 +25,14 @@
25 25
26 <%= link_to( 26 <%= link_to(
27 image_tag( 'ds.png' ), 27 image_tag( 'ds.png' ),
28 "http://ds.ccc.de/", 28 "https://ds.ccc.de/",
29 :id => "ds_icon", 29 :id => "ds_icon",
30 :title => "Datenschleuder" 30 :title => "Datenschleuder"
31 )%> 31 )%>
32 32
33 <%= link_to( 33 <%= link_to(
34 image_tag( 'events.png' ), 34 image_tag( 'events.png' ),
35 "http://events.ccc.de/", 35 "https://events.ccc.de/",
36 :id => "events_icon", 36 :id => "events_icon",
37 :title => "Events Blog" 37 :title => "Events Blog"
38 )%> 38 )%>
diff --git a/app/views/content/_main_navigation.html.erb b/app/views/content/_main_navigation.html.erb
index a984512..2fe8b77 100644
--- a/app/views/content/_main_navigation.html.erb
+++ b/app/views/content/_main_navigation.html.erb
@@ -3,11 +3,5 @@
3 <% menu_items.each do |item| %> 3 <% menu_items.each do |item| %>
4 <li><%= link_to_path item.title, item.path %></li> 4 <li><%= link_to_path item.title, item.path %></li>
5 <% end %> 5 <% end %>
6 <li>
7 <%= language_selector %>
8 </li>
9 <li id="light-mode-li">
10 <input id="light-mode" type="checkbox" /><label for="light-mode">lights on</label>
11 </li>
12 </ul> 6 </ul>
13</div> 7</div>
diff --git a/app/views/content/_search.html.erb b/app/views/content/_search.html.erb
index 9f61042..e654462 100644
--- a/app/views/content/_search.html.erb
+++ b/app/views/content/_search.html.erb
@@ -1,8 +1,3 @@
1<% form_tag search_path, :method => 'get' do %> 1<% form_tag search_path, :method => 'get' do %>
2<table> 2 <div><%= text_field_tag :search_term, params[:search_term], :placeholder => 'suchen', :type => 'search' %></div>
3 <tr> 3<% end %>
4 <td><%= text_field_tag :search_term, params[:search_term] %></td>
5 <td style="padding-top: 2px"><%= image_submit_tag("search_button.png") %></td>
6 </tr>
7</table>
8<% end %> \ No newline at end of file
diff --git a/app/views/content/_tags.html.erb b/app/views/content/_tags.html.erb
index d33bc10..fd808b6 100644
--- a/app/views/content/_tags.html.erb
+++ b/app/views/content/_tags.html.erb
@@ -1,3 +1,4 @@
1<% unless @page.tags.empty? %>
1<div id="tags"> 2<div id="tags">
2 <h2>Tags</h2> 3 <h2>Tags</h2>
3 <ul class="teasertext"> 4 <ul class="teasertext">
@@ -5,4 +6,5 @@
5 <li><%= link_to tag.name, tag_path(:id => tag.name) %></li> 6 <li><%= link_to tag.name, tag_path(:id => tag.name) %></li>
6 <% end %> 7 <% end %>
7 </ul> 8 </ul>
8</div> \ No newline at end of file 9</div>
10<% end %>
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index 915091d..d2a624f 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -1,11 +1,10 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 1<!DOCTYPE HTML>
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 2
4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5 <head> 4 <head>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> 5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
7 <meta name="viewport" content="width=device-width,initial-scale=1"/> 6 <meta name="viewport" content="width=device-width,initial-scale=1"/>
8 <meta name="description" content="Der Chaos Computer Club ist eine galaktische Gemeinschaft von Lebewesen für Informationsfreiheit und Technikfolgenabschätzung."> 7 <meta name="description" content="Der Chaos Computer Club ist eine galaktische Gemeinschaft von Lebewesen für Informationsfreiheit und Technikfolgenabschätzung."/>
9 8
10 <meta property="og:image" content="https://www.ccc.de/images/chaosknoten.svg" /> 9 <meta property="og:image" content="https://www.ccc.de/images/chaosknoten.svg" />
11 <meta property="og:description" content="Der Chaos Computer Club ist eine galaktische Gemeinschaft von Lebewesen für Informationsfreiheit und Technikfolgenabschätzung." /> 10 <meta property="og:description" content="Der Chaos Computer Club ist eine galaktische Gemeinschaft von Lebewesen für Informationsfreiheit und Technikfolgenabschätzung." />
@@ -19,21 +18,45 @@
19 18
20 <%= auto_discovery_link_tag(:atom, {:locale => :de, :controller => "rss", :action => "updates", :format => :xml}) %> 19 <%= auto_discovery_link_tag(:atom, {:locale => :de, :controller => "rss", :action => "updates", :format => :xml}) %>
21 <%= auto_discovery_link_tag(:rss, {:locale => :de, :controller => "rss", :action => "updates", :format => :rdf}) %> 20 <%= auto_discovery_link_tag(:rss, {:locale => :de, :controller => "rss", :action => "updates", :format => :rdf}) %>
21
22 <script>
23 (function() { document.addEventListener("DOMContentLoaded", function() {
24 if (localStorage.getItem('override-prefers-color-scheme', false))
25 document.getElementById("light-mode").checked = true;
26 }); })();
27 </script>
28
22 </head> 29 </head>
23 30
24 <body lang="<%= @page.effective_lang %>"> 31 <body lang="<%= @page.effective_lang %>">
25 <div id="wrapper"> 32 <div id="wrapper">
26 <div id="header"> 33 <div id="header">
27 <%= link_to_path(image_tag("header.png"), "/home") %> 34 <%= image_tag("header.png") %>
35 <!-- <%= link_to_path(image_tag("header.png"), "/home") %> -->
28 </div> 36 </div>
29 <div id="search"> 37 <div id="toolbox">
30 <%= render :partial => "content/search" %> 38 <div id="search">
39 <%= render :partial => "content/search" %>
40 </div>
41 <div id="light-mode-div">
42 <input id="light-mode" type="checkbox" aria-label="Switch between dark and light mode" /><label for="light-mode"><span class="hide-me">lights</span></label>
43 </div>
44 <div id="burger-div">
45 <input type="checkbox" id="menu-toggle" class="menu-checkbox">
46 <label for="menu-toggle" class="burger-menu"><span></span><span></span><span></span></label>
47 </div>
31 </div> 48 </div>
32 <div id="left_column"> 49 <div id="left_column">
33 <%= main_menu %> 50 <%= main_menu %>
34 51
35 <% if current_user && @page.node %> 52 <% if current_user && @page.node %>
36 <%= link_to "Edit", node_path(:id => @page.node) %> 53 <div class="main_navigation">
54 <h2>Admin</h2>
55 <ul>
56 <li><%= link_to raw('<span class="inactive admin_edit_link">⚙️ Overview</span>'),:controller => :admin, :action => 'index' %></li>
57 <li><%= link_to raw('<span class="inactive admin_edit_link">✎ Edit</span>'), node_path(:id => @page.node) %></li>
58 </ul>
59 </div>
37 <% end %> 60 <% end %>
38 61
39 <%= calendar %> 62 <%= calendar %>
@@ -42,9 +65,11 @@
42 <%= yield :layout %> 65 <%= yield :layout %>
43 <div id="footer"> 66 <div id="footer">
44 <br /> 67 <br />
45 <br />
46 <p style="text-align: center"> 68 <p style="text-align: center">
47 <%= link_to t(:sponsors), content_path("sponsors") %> 69 <%= link_to "Impressum", content_path("imprint") %>
70 <%= link_to "Datenschutz", content_path("datenschutz") %>
71 <%= language_selector %>
72 <!-- %= link_to t(:sponsors), content_path("sponsors") % -->
48 </p> 73 </p>
49 </div> 74 </div>
50 </div> 75 </div>
diff --git a/app/views/nodes/edit.html.erb b/app/views/nodes/edit.html.erb
index ee11047..612a3d3 100644
--- a/app/views/nodes/edit.html.erb
+++ b/app/views/nodes/edit.html.erb
@@ -11,100 +11,76 @@
11 <%= f.error_messages %> 11 <%= f.error_messages %>
12 12
13 <div id="metadata"> 13 <div id="metadata">
14 <table> 14 <div class="node_description">Event</div>
15 <tr> 15 <div class="node_content"><%= event_information %></div>
16 <td class="description">Event</td>
17 <td><%= event_information %></td>
18 </tr>
19 <tr>
20 <td class="description">Slug</td>
21 <td>
22 <%=
23 f.text_field(
24 :staged_slug, :value => @node.staged_slug || @node.slug
25 )
26 %>
27 </td>
28 </tr>
29 <tr>
30 <td class="description">parent</td>
31 <td>
32 <%= text_field_tag :move_to_search_term, @node.parent.title rescue "" %>
33 <div id="search_results">
34 16
35 </div> 17 <div class="node_description">Slug</div>
36 <%= f.hidden_field( 18 <div class="node_content">
37 :staged_parent_id, 19 <%= f.text_field(
38 :value => @node.staged_parent_id || @node.parent_id 20 :staged_slug, :value => @node.staged_slug || @node.slug
39 ) 21 )
40 %> 22 %>
41 </td> 23 </div>
42 </tr> 24
25 <div class="node_description">parent</div>
26 <div class="node_content">
27 <%= text_field_tag :move_to_search_term, @node.parent.title rescue "" %>
28 <div id="search_results">
29
30 </div>
31 <%= f.hidden_field(
32 :staged_parent_id,
33 :value => @node.staged_parent_id || @node.parent_id
34 )
35 %>
36 </div>
43 37
44 <% fields_for @draft do |d| %> 38 <% fields_for @draft do |d| %>
45 <tr> 39 <div class="node_description">Tags - comma seperated</div>
46 <td class="description">Tags - comma seperated</td> 40 <div class="node_content"><%= text_field_tag :tag_list, @draft.tag_list %></div>
47 <td><%= text_field_tag :tag_list, @draft.tag_list %></td> 41
48 </tr> 42 <div class="node_description">Publish at</div>
49 <tr> 43 <div class="node_content"><%= d.datetime_select :published_at, :value => @draft.published_at %></div>
50 <td class="description">Publish at</td> 44
51 <td><%= d.datetime_select :published_at, :value => @draft.published_at %></td> 45 <div class="node_description">Template</div>
52 </tr> 46 <div class="node_content"><%= d.select :template_name, custom_page_templates, {:prompt => 'Select Template'} %></div>
53 <tr> 47
54 <td class="description">Template</td> 48 <div class="node_description">Author</div>
55 <td><%= d.select :template_name, custom_page_templates, {:prompt => 'Select Template'} %></td> 49 <div class="node_content"><%= d.select :user_id, user_list %></div>
56 </tr> 50
57 <tr> 51 <div class="node_description">Images</div>
58 <td class="description">Author</td> 52 <div class="node_content">
59 <td><%= d.select :user_id, user_list %></td> 53 <ul id="image_box" rel="<%= @draft.id %>">
60 </tr> 54 <% @draft.assets.images.each do |image| %>
61 <tr> 55 <li rel="images_<%= image.id %>">
62 <td class="description">Images</td> 56 <%= image_tag(image.upload.url(:thumb)) %>
63 <td> 57 </li>
64 <ul id="image_box" rel="<%= @draft.id %>"> 58 <% end %>
65 <% @draft.assets.images.each do |image| %> 59 </ul>
66 <li rel="images_<%= image.id %>"> 60 <div class="clear_left right">
67 <%= image_tag(image.upload.url(:thumb)) %> 61 <a id="image_browser_toggle" class="unselected" href="#">image browser</a>
68 </li> 62 </div>
69 <% end %> 63 <div id="image_browser">
70 </ul> 64 <ul>
71 <div class="clear_left right"> 65 <% Asset.images.each do |image| %>
72 <a id="image_browser_toggle" class="unselected" href="#">image browser</a> 66 <li rel="images_<%= image.id %>"><%= image_tag(image.upload.url(:thumb)) %></li>
73 </div> 67 <% end %>
74 <div id="image_browser"> 68 </ul>
75 <ul> 69 </div>
76 <% Asset.images.each do |image| %> 70 </div>
77 <li rel="images_<%= image.id %>"><%= image_tag(image.upload.url(:thumb)) %></li>
78 <% end %>
79 </ul>
80 </div>
81 </td>
82 </tr>
83 </table>
84 </div> 71 </div>
85 72
86 <table id="content"> 73 <div id="content">
87 <tr> 74 <div class="node_description">Title</div>
88 <th class="description"></th> 75 <div class="node_content"><%= d.text_field :title, :pattern => "(?:[^<>&amp;]|&amp;amp;|&amp;lt;|&amp;gt;)*", :title => "Warning: Unescaped HTML entities detected! Use &amp;lt;, &amp;gt;, &amp;amp; instead of <, >, &." %></div>
89 <th class="content"></th> 76
90 </tr> 77 <div class="node_description">Abstract</div>
91 <tr> 78 <div class="node_content"><%= d.text_area :abstract %></div>
92 <td class="description">Title</td> 79
93 <td><%= d.text_field :title, :pattern => "(?:[^<>&amp;]|&amp;amp;|&amp;lt;|&amp;gt;)*", :title => "Warning: Unescaped HTML entities detected! Use &amp;lt;, &amp;gt;, &amp;amp; instead of <, >, &." %></td> 80 <div class="node_description">Body</div>
94 </tr> 81 <div class="node_content"><%= d.text_area :body, :class => 'with_editor' %></div>
95 <tr> 82
96 <td class="description">Abstract</td> 83 <div><%= d.submit 'save' %></div>
97 <td><%= d.text_area :abstract %></td>
98 </tr>
99 <tr>
100 <td class="description">Body</td>
101 <td><%= d.text_area :body, :class => 'with_editor' %></td>
102 </tr>
103 <tr>
104 <td></td>
105 <td class="right"><%= d.submit 'save' %></td>
106 </tr>
107 </table>
108 <% end %> 84 <% end %>
109<% end %> 85<% end %>
110</div> 86</div>