diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-06-24 04:13:16 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-06-24 04:13:16 +0200 |
| commit | e0a7e0fec760ba12c8067a37e10c96f1f05876e2 (patch) | |
| tree | d0cf745592a46aee4d4913911fd34c7c24515220 /app/views | |
| parent | 6424e10be5a89f175a74c71c55660412a169b8b8 (diff) | |
Stage 1 complete: Rails 2.3.5 to Rails 3.2.22.5 upgrade
- Converted plugins to gems (Gemfile)
- Updated config structure (application.rb, boot.rb, environment.rb)
- Converted routes to Rails 3 DSL
- Converted named_scope to scope throughout models
- Converted find(:all, :conditions) to where() chains
- Fixed has_many :order to use ordering scope
- Updated session store and secret token configuration
- Fixed exception_notification middleware configuration
- Patched Ruby 2.4 / Rails 3.2 incompatibilities:
- Integer/Float duration arithmetic (ActiveSupport)
- Arel visit_Integer for PostgreSQL adapter
- create_database String/Integer coercion
- ActionController consider_all_requests_local
- Migrated taggings schema for acts-as-taggable-on
- Replaced dynamic_form gem with custom form_error_messages helper
- Fixed Rails 3 block helper syntax (form_for, form_tag, fields_for)
- Fixed admin layout yield
- Updated test suite for Rails 3 APIs
Diffstat (limited to 'app/views')
24 files changed, 129 insertions, 50 deletions
diff --git a/app/views/assets/edit.html.erb b/app/views/assets/edit.html.erb index d60db94..e65d600 100644 --- a/app/views/assets/edit.html.erb +++ b/app/views/assets/edit.html.erb | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | <h1>Editing asset</h1> | 1 | <h1>Editing asset</h1> |
| 2 | 2 | ||
| 3 | <% form_for(@asset) do |f| %> | 3 | <%= form_for(@asset) do |f| %> |
| 4 | <%= f.error_messages %> | 4 | <%= form_error_messages(f) %> |
| 5 | 5 | ||
| 6 | <p> | 6 | <p> |
| 7 | <%= f.submit 'Update' %> | 7 | <%= f.submit 'Update' %> |
| @@ -9,4 +9,4 @@ | |||
| 9 | <% end %> | 9 | <% end %> |
| 10 | 10 | ||
| 11 | <%= link_to 'Show', @asset %> | | 11 | <%= link_to 'Show', @asset %> | |
| 12 | <%= link_to 'Back', assets_path %> \ No newline at end of file | 12 | <%= link_to 'Back', assets_path %> |
diff --git a/app/views/assets/new.html.erb b/app/views/assets/new.html.erb index 366488f..6c1310a 100644 --- a/app/views/assets/new.html.erb +++ b/app/views/assets/new.html.erb | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | <h1>New asset</h1> | 1 | <h1>New asset</h1> |
| 2 | 2 | ||
| 3 | <% form_for(@asset, :html => { :multipart => true }) do |f| %> | 3 | <%= form_for(@asset, :html => { :multipart => true }) do |f| %> |
| 4 | <%= f.error_messages %> | 4 | <%= form_error_messages(f) %> |
| 5 | 5 | ||
| 6 | <p> | 6 | <p> |
| 7 | <%= f.label :name %><br /> | 7 | <%= f.label :name %><br /> |
| @@ -14,4 +14,4 @@ | |||
| 14 | </p> | 14 | </p> |
| 15 | <% end %> | 15 | <% end %> |
| 16 | 16 | ||
| 17 | <%= link_to 'Back', assets_path %> \ No newline at end of file | 17 | <%= link_to 'Back', assets_path %> |
diff --git a/app/views/content/_search.html.erb b/app/views/content/_search.html.erb index e654462..aa91424 100644 --- a/app/views/content/_search.html.erb +++ b/app/views/content/_search.html.erb | |||
| @@ -1,3 +1,3 @@ | |||
| 1 | <% form_tag search_path, :method => 'get' do %> | 1 | <%= form_tag search_path, :method => 'get' do %> |
| 2 | <div><%= text_field_tag :search_term, params[:search_term], :placeholder => 'suchen', :type => 'search' %></div> | 2 | <div><%= text_field_tag :search_term, params[:search_term], :placeholder => 'suchen', :type => 'search' %></div> |
| 3 | <% end %> | 3 | <% end %> |
diff --git a/app/views/content/_tags.html.erb b/app/views/content/_tags.html.erb index fd808b6..169ae84 100644 --- a/app/views/content/_tags.html.erb +++ b/app/views/content/_tags.html.erb | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | <% unless @page.tags.empty? %> | 1 | <% unless @page.nil? || @page.tags.empty? %> |
| 2 | <div id="tags"> | 2 | <div id="tags"> |
| 3 | <h2>Tags</h2> | 3 | <h2>Tags</h2> |
| 4 | <ul class="teasertext"> | 4 | <ul class="teasertext"> |
diff --git a/app/views/custom/page_templates/public/no_date_and_author_with_map.html.erb b/app/views/custom/page_templates/public/no_date_and_author_with_map.html.erb new file mode 100644 index 0000000..6e86edf --- /dev/null +++ b/app/views/custom/page_templates/public/no_date_and_author_with_map.html.erb | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | <div class="article"> | ||
| 2 | <h2 class="headline"><%= @page.title %></h2> | ||
| 3 | <p><%= sanitize( @page.abstract ) %></p> | ||
| 4 | <object data="/system/uploads/327/original/map.svg" type="image/svg+xml"/> | ||
| 5 | <%= aggregate?(@page.body) %> | ||
| 6 | </div> | ||
| 7 | |||
| 8 | <%= will_paginate(@content_collection) if @content_collection %> | ||
diff --git a/app/views/events/edit.html.erb b/app/views/events/edit.html.erb index 17b6980..824cd66 100644 --- a/app/views/events/edit.html.erb +++ b/app/views/events/edit.html.erb | |||
| @@ -6,8 +6,8 @@ | |||
| 6 | 6 | ||
| 7 | <h1>Editing event</h1> | 7 | <h1>Editing event</h1> |
| 8 | 8 | ||
| 9 | <% form_for(@event) do |f| %> | 9 | <%= form_for(@event) do |f| %> |
| 10 | <%= f.error_messages %> | 10 | <%= form_error_messages(f) %> |
| 11 | 11 | ||
| 12 | <p> | 12 | <p> |
| 13 | <%= f.label :start_time %><br /> | 13 | <%= f.label :start_time %><br /> |
| @@ -47,4 +47,4 @@ | |||
| 47 | <p> | 47 | <p> |
| 48 | <%= f.submit 'Update' %> | 48 | <%= f.submit 'Update' %> |
| 49 | </p> | 49 | </p> |
| 50 | <% end %> \ No newline at end of file | 50 | <% end %> |
diff --git a/app/views/events/new.html.erb b/app/views/events/new.html.erb index 8c9812e..cd892c5 100644 --- a/app/views/events/new.html.erb +++ b/app/views/events/new.html.erb | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | <h1>New event</h1> | 1 | <h1>New event</h1> |
| 2 | 2 | ||
| 3 | <% form_for(@event) do |f| %> | 3 | <%= form_for(@event) do |f| %> |
| 4 | <%= f.error_messages %> | 4 | <%= form_error_messages(f) %> |
| 5 | 5 | ||
| 6 | <p> | 6 | <p> |
| 7 | <%= f.label :start_time %><br /> | 7 | <%= f.label :start_time %><br /> |
| @@ -43,4 +43,4 @@ | |||
| 43 | </p> | 43 | </p> |
| 44 | <% end %> | 44 | <% end %> |
| 45 | 45 | ||
| 46 | <%= link_to 'Back', events_path %> \ No newline at end of file | 46 | <%= link_to 'Back', events_path %> |
diff --git a/app/views/layouts/admin.html.erb b/app/views/layouts/admin.html.erb index 97b81df..9f36021 100644 --- a/app/views/layouts/admin.html.erb +++ b/app/views/layouts/admin.html.erb | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | <% end %> | 34 | <% end %> |
| 35 | </div> | 35 | </div> |
| 36 | <div id="content"> | 36 | <div id="content"> |
| 37 | <%= yield :layout %> | 37 | <%= yield %> |
| 38 | </div> | 38 | </div> |
| 39 | 39 | ||
| 40 | <div id="results"></div> | 40 | <div id="results"></div> |
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index d2a624f..2a46f09 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | 28 | ||
| 29 | </head> | 29 | </head> |
| 30 | 30 | ||
| 31 | <body lang="<%= @page.effective_lang %>"> | 31 | <body lang="<%= @page ? @page.effective_lang : 'de' %>"> |
| 32 | <div id="wrapper"> | 32 | <div id="wrapper"> |
| 33 | <div id="header"> | 33 | <div id="header"> |
| 34 | <%= image_tag("header.png") %> | 34 | <%= image_tag("header.png") %> |
diff --git a/app/views/layouts/application.html.erb.bak b/app/views/layouts/application.html.erb.bak new file mode 100644 index 0000000..3c95d75 --- /dev/null +++ b/app/views/layouts/application.html.erb.bak | |||
| @@ -0,0 +1,54 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | ||
| 2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
| 3 | |||
| 4 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | ||
| 5 | <head> | ||
| 6 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | ||
| 7 | |||
| 8 | <title><%= page_title %></title> | ||
| 9 | <%= stylesheet_link_tag "ccc" %> | ||
| 10 | <%= javascript_include_tag 'jquery-1.3.2.min' %> | ||
| 11 | <%= javascript_include_tag 'shadowbox/shadowbox' %> | ||
| 12 | <%= stylesheet_link_tag "shadowbox" %> | ||
| 13 | <%= javascript_include_tag 'public' %> | ||
| 14 | |||
| 15 | <%= auto_discovery_link_tag(:atom, {:locale => :de, :controller => "rss", :action => "updates", :format => :xml}) %> | ||
| 16 | <%= auto_discovery_link_tag(:rss, {:locale => :de, :controller => "rss", :action => "updates", :format => :rdf}) %> | ||
| 17 | </head> | ||
| 18 | |||
| 19 | <body> | ||
| 20 | <div id="wrapper"> | ||
| 21 | <div id="header"> | ||
| 22 | <%= link_to_path(image_tag("header.png"), "/home") %> | ||
| 23 | </div> | ||
| 24 | <div id="search"> | ||
| 25 | <%= render :partial => "content/search" %> | ||
| 26 | </div> | ||
| 27 | <div id="left_column"> | ||
| 28 | <%= main_menu %> | ||
| 29 | |||
| 30 | <%= language_selector %> | ||
| 31 | <% if current_user && @page.node %> | ||
| 32 | <%= link_to "Edit", node_path(:id => @page.node) %> | ||
| 33 | <% end %> | ||
| 34 | |||
| 35 | <%= calendar %> | ||
| 36 | </div> | ||
| 37 | <div id="center_column"> | ||
| 38 | <%= yield :layout %> | ||
| 39 | |||
| 40 | <div id="footer"> | ||
| 41 | <br /> | ||
| 42 | <br /> | ||
| 43 | <p style="text-align: center"> | ||
| 44 | <%= link_to t(:sponsors), content_path("sponsors") %> | ||
| 45 | </p> | ||
| 46 | </div> | ||
| 47 | </div> | ||
| 48 | <div id="right_column"> | ||
| 49 | <%= tags %> | ||
| 50 | <%= featured_articles %> | ||
| 51 | </div> | ||
| 52 | </div> | ||
| 53 | </body> | ||
| 54 | </html> \ No newline at end of file | ||
diff --git a/app/views/menu_items/edit.html.erb b/app/views/menu_items/edit.html.erb index 9ea0fcc..9891708 100644 --- a/app/views/menu_items/edit.html.erb +++ b/app/views/menu_items/edit.html.erb | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <h1>Edit Menu Item</h1> | 1 | <h1>Edit Menu Item</h1> |
| 2 | 2 | ||
| 3 | <% form_for @menu_item do |f| %> | 3 | <%= form_for @menu_item do |f| %> |
| 4 | <table> | 4 | <table> |
| 5 | 5 | ||
| 6 | <tr> | 6 | <tr> |
| @@ -29,4 +29,4 @@ | |||
| 29 | <td class="right"><%= f.submit 'Update' %></td> | 29 | <td class="right"><%= f.submit 'Update' %></td> |
| 30 | </tr> | 30 | </tr> |
| 31 | </table> | 31 | </table> |
| 32 | <% end %> \ No newline at end of file | 32 | <% end %> |
diff --git a/app/views/menu_items/new.html.erb b/app/views/menu_items/new.html.erb index 64b9abb..68081d0 100644 --- a/app/views/menu_items/new.html.erb +++ b/app/views/menu_items/new.html.erb | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <h1>Add Menu Item</h1> | 1 | <h1>Add Menu Item</h1> |
| 2 | 2 | ||
| 3 | <% form_for @menu_item do |f| %> | 3 | <%= form_for @menu_item do |f| %> |
| 4 | <table> | 4 | <table> |
| 5 | 5 | ||
| 6 | <tr> | 6 | <tr> |
| @@ -29,4 +29,4 @@ | |||
| 29 | <td class="right"><%= f.submit 'Create' %></td> | 29 | <td class="right"><%= f.submit 'Create' %></td> |
| 30 | </tr> | 30 | </tr> |
| 31 | </table> | 31 | </table> |
| 32 | <% end %> \ No newline at end of file | 32 | <% end %> |
diff --git a/app/views/nodes/edit.html.erb b/app/views/nodes/edit.html.erb index 612a3d3..d40d4e7 100644 --- a/app/views/nodes/edit.html.erb +++ b/app/views/nodes/edit.html.erb | |||
| @@ -7,8 +7,12 @@ | |||
| 7 | <% end %> | 7 | <% end %> |
| 8 | 8 | ||
| 9 | <div id="page_editor"> | 9 | <div id="page_editor"> |
| 10 | <% form_for(@node) do |f| %> | 10 | <%= form_for(@node) do |f| %> |
| 11 | <%= f.error_messages %> | 11 | <% if @node.errors.any? %> |
| 12 | <div class="error_messages"> | ||
| 13 | <ul><% @node.errors.full_messages.each do |msg| %><li><%= msg %></li><% end %></ul> | ||
| 14 | </div> | ||
| 15 | <% end %> | ||
| 12 | 16 | ||
| 13 | <div id="metadata"> | 17 | <div id="metadata"> |
| 14 | <div class="node_description">Event</div> | 18 | <div class="node_description">Event</div> |
| @@ -35,7 +39,7 @@ | |||
| 35 | %> | 39 | %> |
| 36 | </div> | 40 | </div> |
| 37 | 41 | ||
| 38 | <% fields_for @draft do |d| %> | 42 | <%= fields_for @draft do |d| %> |
| 39 | <div class="node_description">Tags - comma seperated</div> | 43 | <div class="node_description">Tags - comma seperated</div> |
| 40 | <div class="node_content"><%= text_field_tag :tag_list, @draft.tag_list %></div> | 44 | <div class="node_content"><%= text_field_tag :tag_list, @draft.tag_list %></div> |
| 41 | 45 | ||
diff --git a/app/views/nodes/index.html.erb b/app/views/nodes/index.html.erb index bf01645..e5a55d4 100644 --- a/app/views/nodes/index.html.erb +++ b/app/views/nodes/index.html.erb | |||
| @@ -27,7 +27,7 @@ | |||
| 27 | <%= node.lock_owner.login if node.lock_owner %> | 27 | <%= node.lock_owner.login if node.lock_owner %> |
| 28 | </td> | 28 | </td> |
| 29 | <td> | 29 | <td> |
| 30 | <%= node.draft ? node.draft.revision : node.head.revision %> | 30 | <%= node.draft ? node.draft.revision : (node.head ? node.head.revision : "EMPTY") %> |
| 31 | </td> | 31 | </td> |
| 32 | </tr> | 32 | </tr> |
| 33 | <% end %> | 33 | <% end %> |
diff --git a/app/views/nodes/new.html.erb b/app/views/nodes/new.html.erb index 7d744de..028d727 100644 --- a/app/views/nodes/new.html.erb +++ b/app/views/nodes/new.html.erb | |||
| @@ -1,11 +1,14 @@ | |||
| 1 | <h1>Create new node</h1> | 1 | <h1>Create new node</h1> |
| 2 | 2 | ||
| 3 | <%= error_messages_for( :node ).gsub("Slug", "Title") %> | 3 | <% if @node.errors.any? %> |
| 4 | 4 | <div class="error_messages"> | |
| 5 | <ul><% @node.errors.full_messages.each do |msg| %><li><%= msg.to_s.gsub("Slug", "Title") %></li><% end %></ul> | ||
| 6 | </div> | ||
| 7 | <% end %> | ||
| 5 | 8 | ||
| 6 | <p>What kind of node do you want to create?</p> | 9 | <p>What kind of node do you want to create?</p> |
| 7 | 10 | ||
| 8 | <% form_tag nodes_path do %> | 11 | <%= form_tag nodes_path do %> |
| 9 | <table id="new_node"> | 12 | <table id="new_node"> |
| 10 | <tr> | 13 | <tr> |
| 11 | <td class="description">Type</td> | 14 | <td class="description">Type</td> |
diff --git a/app/views/occurrences/edit.html.erb b/app/views/occurrences/edit.html.erb index 6a81188..aa4f6e0 100644 --- a/app/views/occurrences/edit.html.erb +++ b/app/views/occurrences/edit.html.erb | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | <h1>Editing occurrence</h1> | 1 | <h1>Editing occurrence</h1> |
| 2 | 2 | ||
| 3 | <% form_for(@occurrence) do |f| %> | 3 | <%= form_for(@occurrence) do |f| %> |
| 4 | <%= f.error_messages %> | 4 | <%= form_error_messages(f) %> |
| 5 | 5 | ||
| 6 | <p> | 6 | <p> |
| 7 | <%= f.label :summary %><br /> | 7 | <%= f.label :summary %><br /> |
| @@ -29,4 +29,4 @@ | |||
| 29 | <% end %> | 29 | <% end %> |
| 30 | 30 | ||
| 31 | <%= link_to 'Show', @occurrence %> | | 31 | <%= link_to 'Show', @occurrence %> | |
| 32 | <%= link_to 'Back', occurrences_path %> \ No newline at end of file | 32 | <%= link_to 'Back', occurrences_path %> |
diff --git a/app/views/occurrences/new.html.erb b/app/views/occurrences/new.html.erb index 0a77af1..c05ce40 100644 --- a/app/views/occurrences/new.html.erb +++ b/app/views/occurrences/new.html.erb | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | <h1>New occurrence</h1> | 1 | <h1>New occurrence</h1> |
| 2 | 2 | ||
| 3 | <% form_for(@occurrence) do |f| %> | 3 | <%= form_for(@occurrence) do |f| %> |
| 4 | <%= f.error_messages %> | 4 | <%= form_error_messages(f) %> |
| 5 | 5 | ||
| 6 | <p> | 6 | <p> |
| 7 | <%= f.label :summary %><br /> | 7 | <%= f.label :summary %><br /> |
| @@ -28,4 +28,4 @@ | |||
| 28 | </p> | 28 | </p> |
| 29 | <% end %> | 29 | <% end %> |
| 30 | 30 | ||
| 31 | <%= link_to 'Back', occurrences_path %> \ No newline at end of file | 31 | <%= link_to 'Back', occurrences_path %> |
diff --git a/app/views/pages/edit.html.erb b/app/views/pages/edit.html.erb index 749d7e3..8b1242c 100644 --- a/app/views/pages/edit.html.erb +++ b/app/views/pages/edit.html.erb | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | <h1>Editing page</h1> | 1 | <h1>Editing page</h1> |
| 2 | 2 | ||
| 3 | <% form_for(@page) do |f| %> | 3 | <%= form_for(@page) do |f| %> |
| 4 | <%= f.error_messages %> | 4 | <%= form_error_messages(f) %> |
| 5 | 5 | ||
| 6 | <p> | 6 | <p> |
| 7 | <%= f.label :title %><br /> | 7 | <%= f.label :title %><br /> |
diff --git a/app/views/pages/new.html.erb b/app/views/pages/new.html.erb index b27dc62..2758faf 100644 --- a/app/views/pages/new.html.erb +++ b/app/views/pages/new.html.erb | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | <h1>New page</h1> | 1 | <h1>New page</h1> |
| 2 | 2 | ||
| 3 | <% form_for(@page) do |f| %> | 3 | <%= form_for(@page) do |f| %> |
| 4 | <%= f.error_messages %> | 4 | <%= form_error_messages(f) %> |
| 5 | 5 | ||
| 6 | <p> | 6 | <p> |
| 7 | <%= f.label :node_id %><br /> | 7 | <%= f.label :node_id %><br /> |
diff --git a/app/views/revisions/diff.html.erb b/app/views/revisions/diff.html.erb index f7ad79c..efda85d 100644 --- a/app/views/revisions/diff.html.erb +++ b/app/views/revisions/diff.html.erb | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | 5 | ||
| 6 | <h1>Revisions#diff</h1> | 6 | <h1>Revisions#diff</h1> |
| 7 | 7 | ||
| 8 | <% form_tag diff_node_revisions_path do %> | 8 | <%= form_tag diff_node_revisions_path do %> |
| 9 | <%= select_tag :start_revision, options_for_select(@node.pages.map{|x| x.revision}, params[:start_revision].to_i) %> | 9 | <%= select_tag :start_revision, options_for_select(@node.pages.map{|x| x.revision}, params[:start_revision].to_i) %> |
| 10 | <%= select_tag :end_revision, options_for_select(@node.pages.map{|x| x.revision}, params[:end_revision].to_i) %> | 10 | <%= select_tag :end_revision, options_for_select(@node.pages.map{|x| x.revision}, params[:end_revision].to_i) %> |
| 11 | <%= submit_tag 'Diff' %> | 11 | <%= submit_tag 'Diff' %> |
| @@ -62,4 +62,4 @@ | |||
| 62 | 62 | ||
| 63 | <h3>Body</h3> | 63 | <h3>Body</h3> |
| 64 | <p id="diffview_body"></p> | 64 | <p id="diffview_body"></p> |
| 65 | </div> \ No newline at end of file | 65 | </div> |
diff --git a/app/views/revisions/index.html.erb b/app/views/revisions/index.html.erb index dc9ad51..306f9ea 100644 --- a/app/views/revisions/index.html.erb +++ b/app/views/revisions/index.html.erb | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | <h2>Revisions for Node: <%= @node.unique_name %></h2> | 5 | <h2>Revisions for Node: <%= @node.unique_name %></h2> |
| 6 | 6 | ||
| 7 | <% form_tag diff_node_revisions_path(@node) do %> | 7 | <%= form_tag diff_node_revisions_path(@node) do %> |
| 8 | <table id="revisions"> | 8 | <table id="revisions"> |
| 9 | <tr class="header"> | 9 | <tr class="header"> |
| 10 | <th>First</th> | 10 | <th>First</th> |
| @@ -15,7 +15,7 @@ | |||
| 15 | <th>Date</th> | 15 | <th>Date</th> |
| 16 | <th></th> | 16 | <th></th> |
| 17 | </tr> | 17 | </tr> |
| 18 | <% @node.pages.reverse.each do |page| %> | 18 | <% (@pages || @node.pages.all).reverse.each do |page| %> |
| 19 | <tr> | 19 | <tr> |
| 20 | <td><%= radio_button_tag :start_revision, page.revision %></td> | 20 | <td><%= radio_button_tag :start_revision, page.revision %></td> |
| 21 | <td><%= radio_button_tag :end_revision, page.revision %></td> | 21 | <td><%= radio_button_tag :end_revision, page.revision %></td> |
| @@ -41,4 +41,4 @@ | |||
| 41 | </tr> | 41 | </tr> |
| 42 | </table> | 42 | </table> |
| 43 | 43 | ||
| 44 | <% end %> \ No newline at end of file | 44 | <% end %> |
diff --git a/app/views/sessions/new.html.erb b/app/views/sessions/new.html.erb index fef0912..3c10303 100644 --- a/app/views/sessions/new.html.erb +++ b/app/views/sessions/new.html.erb | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | <div id="login_form"> | 1 | <div id="login_form"> |
| 2 | <% form_tag session_path do -%> | 2 | <%= form_tag session_path do -%> |
| 3 | <table> | 3 | <table> |
| 4 | <tr> | 4 | <tr> |
| 5 | <td></td> | 5 | <td></td> |
| @@ -21,4 +21,4 @@ | |||
| 21 | </tr> | 21 | </tr> |
| 22 | </table> | 22 | </table> |
| 23 | <% end -%> | 23 | <% end -%> |
| 24 | </div> \ No newline at end of file | 24 | </div> |
diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb index 226e821..df1005b 100644 --- a/app/views/users/edit.html.erb +++ b/app/views/users/edit.html.erb | |||
| @@ -1,8 +1,13 @@ | |||
| 1 | <h1>Edit existing user</h1> | 1 | <h1>Edit existing user</h1> |
| 2 | 2 | ||
| 3 | <%= error_messages_for :user %> | 3 | <% if @user.errors.any? %> |
| 4 | <div class="error_messages"> | ||
| 5 | <ul><% @user.errors.full_messages.each do |msg| %><li><%= msg.gsub("Slug", "Title") %></li><% end %></ul> | ||
| 6 | </div> | ||
| 7 | <% end %> | ||
| 4 | 8 | ||
| 5 | <% form_for @user do |f| %> | 9 | |
| 10 | <%= form_for @user do |f| %> | ||
| 6 | <table id="new_node"> | 11 | <table id="new_node"> |
| 7 | <tr> | 12 | <tr> |
| 8 | <td class="description">Login</td> | 13 | <td class="description">Login</td> |
| @@ -31,4 +36,4 @@ | |||
| 31 | <td class="right"><%= f.submit "Update" %></td> | 36 | <td class="right"><%= f.submit "Update" %></td> |
| 32 | </tr> | 37 | </tr> |
| 33 | </table> | 38 | </table> |
| 34 | <% end %> \ No newline at end of file | 39 | <% end %> |
diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb index 6990c27..6beda4f 100644 --- a/app/views/users/new.html.erb +++ b/app/views/users/new.html.erb | |||
| @@ -1,8 +1,13 @@ | |||
| 1 | <h1>Create new user</h1> | 1 | <h1>Create new user</h1> |
| 2 | 2 | ||
| 3 | <%= error_messages_for :user %> | 3 | <% if @user.errors.any? %> |
| 4 | <div class="error_messages"> | ||
| 5 | <ul><% @user.errors.full_messages.each do |msg| %><li><%= msg.gsub("Slug", "Title") %></li><% end %></ul> | ||
| 6 | </div> | ||
| 7 | <% end %> | ||
| 4 | 8 | ||
| 5 | <% form_for @user do |f| %> | 9 | |
| 10 | <%= form_for @user do |f| %> | ||
| 6 | <table id="new_node"> | 11 | <table id="new_node"> |
| 7 | <tr> | 12 | <tr> |
| 8 | <td class="description">Login</td> | 13 | <td class="description">Login</td> |
| @@ -29,4 +34,4 @@ | |||
| 29 | <td class="right"><%= f.submit "Create" %></td> | 34 | <td class="right"><%= f.submit "Create" %></td> |
| 30 | </tr> | 35 | </tr> |
| 31 | </table> | 36 | </table> |
| 32 | <% end %> \ No newline at end of file | 37 | <% end %> |
