From 41fbeb4a740bfe9e35130bc1c9f4d7e4198fe6cf Mon Sep 17 00:00:00 2001 From: hukl Date: Sat, 7 Nov 2009 21:11:29 +0100 Subject: Using password field for user passwords. Closes #43 --- app/views/users/edit.html.erb | 4 ++-- app/views/users/new.html.erb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'app') diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb index 63dfd9c..226e821 100644 --- a/app/views/users/edit.html.erb +++ b/app/views/users/edit.html.erb @@ -14,11 +14,11 @@ Password - <%= f.text_field :password %> + <%= f.password_field :password %> Confirm - <%= f.text_field :password_confirmation %> + <%= f.password_field :password_confirmation %> <% if current_user.admin? %> diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb index 8bd21d6..6990c27 100644 --- a/app/views/users/new.html.erb +++ b/app/views/users/new.html.erb @@ -14,11 +14,11 @@ Password - <%= f.text_field :password %> + <%= f.password_field :password %> Confirm - <%= f.text_field :password_confirmation %> + <%= f.password_field :password_confirmation %> Admin? -- cgit v1.3 From bc2908b802f911b44884f3de01369d298554cbb7 Mon Sep 17 00:00:00 2001 From: hukl Date: Sun, 8 Nov 2009 18:58:56 +0100 Subject: changes for atom feed - hope that helps --- app/views/layouts/application.html.erb | 2 +- app/views/rss/updates.xml.builder | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'app') diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index c7704ac..cc4c01b 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -12,7 +12,7 @@ <%= stylesheet_link_tag "shadowbox" %> <%= javascript_include_tag 'public' %> - <%= auto_discovery_link_tag(:rss, {:controller => "rss", :action => "updates"}) %> + <%= auto_discovery_link_tag(:atom, {:controller => "rss", :action => "updates"}) %> diff --git a/app/views/rss/updates.xml.builder b/app/views/rss/updates.xml.builder index 6be49e9..2461099 100644 --- a/app/views/rss/updates.xml.builder +++ b/app/views/rss/updates.xml.builder @@ -3,21 +3,22 @@ xml.instruct! xml.feed(:xmlns => "http://www.w3.org/2005/Atom", "xml:base" => @host) do xml.title("Chaos Computer Club Updates") xml.link(:href => "http://www.ccc.de/") - xml.link(:rel => "self", :href => "/rss/updates.xml") + xml.link(:rel => "self", :href => "#{@host}/rss/updates") xml.updated(@items.first.published_at.xmlschema) xml.author do xml.name("Chaos Computer Club e.V.") end - xml.id("http://www.ccc.de/") + xml.id("#{@host}/rss/updates") @items.each do |item| xml.entry do xml.title(item.title) xml.link( - :href => content_path_helper(item.node.unique_path), - :rel => "alternate" + :href => "#{@host}/de/#{item.node.unique_name}", + :rel => "alternate", + :type => "text/html" ) - xml.id(content_url_helper(item.node.unique_path)) + xml.id(item.node.id) xml.updated(item.published_at.xmlschema) xml.content(:type => "xhtml") do xml.div(item.body, :xmlns => "http://www.w3.org/1999/xhtml") -- cgit v1.3 From 6c2db7cc95abacb6a5a766521863f1b1f6b70440 Mon Sep 17 00:00:00 2001 From: hukl Date: Sun, 8 Nov 2009 19:02:21 +0100 Subject: id must be an url of course --- app/views/rss/updates.xml.builder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/views/rss/updates.xml.builder b/app/views/rss/updates.xml.builder index 2461099..451e724 100644 --- a/app/views/rss/updates.xml.builder +++ b/app/views/rss/updates.xml.builder @@ -18,7 +18,7 @@ xml.feed(:xmlns => "http://www.w3.org/2005/Atom", "xml:base" => @host) do :rel => "alternate", :type => "text/html" ) - xml.id(item.node.id) + xml.id("#{@host}/de/#{item.node.unique_name}") xml.updated(item.published_at.xmlschema) xml.content(:type => "xhtml") do xml.div(item.body, :xmlns => "http://www.w3.org/1999/xhtml") -- cgit v1.3 From f696cdb88a1d3e243699f7745a44190f8ffbd3ee Mon Sep 17 00:00:00 2001 From: hukl Date: Sun, 8 Nov 2009 19:19:26 +0100 Subject: fixed typo - evil --- app/helpers/content_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/helpers/content_helper.rb b/app/helpers/content_helper.rb index 9eb7d7e..1e56488 100644 --- a/app/helpers/content_helper.rb +++ b/app/helpers/content_helper.rb @@ -91,7 +91,7 @@ module ContentHelper end rescue - sanatize( content ) + sanitize( content ) end end -- cgit v1.3 From de0647b6b5af45037b75c4e2ddb32d6aed752233 Mon Sep 17 00:00:00 2001 From: hukl Date: Mon, 9 Nov 2009 19:59:23 +0100 Subject: Added logout link to main navigation --- app/views/admin/_menu.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/views/admin/_menu.html.erb b/app/views/admin/_menu.html.erb index f2875aa..e8b39ce 100644 --- a/app/views/admin/_menu.html.erb +++ b/app/views/admin/_menu.html.erb @@ -1,5 +1,5 @@ <%= language_selector %> - +<%= link_to 'Logout', :controller => :sessions, :action => :destroy %> <%= link_to 'Overview', :controller => :admin, :action => 'index' %> <%= link_to 'Nodes', nodes_path, selected?('nodes') %> <%= link_to 'Assets', assets_path, selected?('assets') %> -- cgit v1.3