parlement 0.14 → 0.17
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +41 -1
- data/MEMORY +66 -5
- data/README +10 -5
- data/Rakefile +15 -23
- data/app/controllers/account_controller.rb +48 -43
- data/app/controllers/{application.rb → application_controller.rb} +15 -12
- data/app/controllers/elt_controller.rb +77 -32
- data/app/controllers/subscriber_controller.rb +11 -10
- data/app/helpers/application_helper.rb +14 -1
- data/app/helpers/elt_helper.rb +9 -7
- data/app/models/elt.rb +25 -24
- data/app/models/mail.rb +44 -47
- data/app/models/person_notify.rb +2 -2
- data/app/models/user.rb +128 -2
- data/app/models/user_notify.rb +15 -15
- data/app/views/account/_login.rhtml +39 -39
- data/app/views/account/_show.rhtml +22 -30
- data/app/views/account/signup.rhtml +2 -2
- data/app/views/elt/_choice.rhtml +6 -6
- data/app/views/elt/_elt.rhtml +27 -32
- data/app/views/elt/choices.rhtml +16 -18
- data/app/views/elt/list/_byDate.rhtml +14 -14
- data/app/views/elt/list/_byVote.rhtml +15 -15
- data/app/views/elt/list/_children.rhtml +48 -40
- data/app/views/elt/list/_subscribers.rhtml +1 -1
- data/app/views/elt/new.rhtml +22 -21
- data/app/views/elt/rss.rxml +4 -11
- data/app/views/elt/show.rhtml +65 -61
- data/app/views/elt/vote_rss.rxml +4 -11
- data/app/views/layouts/top.rhtml +39 -50
- data/app/views/person/_listElts.rhtml +1 -1
- data/app/views/person/show.rhtml +1 -1
- data/{vendor/plugins/login_engine/app → app}/views/user_notify/change_password.rhtml +0 -0
- data/{vendor/plugins/login_engine/app → app}/views/user_notify/delete.rhtml +0 -0
- data/{vendor/plugins/login_engine/app → app}/views/user_notify/forgot_password.rhtml +0 -0
- data/{vendor/plugins/login_engine/app → app}/views/user_notify/pending_delete.rhtml +0 -0
- data/{vendor/plugins/login_engine/app → app}/views/user_notify/signup.rhtml +0 -0
- data/config/boot.rb +97 -32
- data/config/environment.rb +37 -35
- data/config/environments/development.rb +2 -3
- data/config/environments/production.rb +3 -0
- data/config/initializers/string_ruby_1.8.rb +10 -0
- data/config/routes.rb +17 -22
- data/db/schema.rb +102 -74
- data/lib/tasks/rspec.rake +167 -0
- data/public/404.html +25 -7
- data/public/500.html +26 -7
- data/public/dispatch.cgi +0 -0
- data/public/dispatch.fcgi +0 -0
- data/public/dispatch.rb +0 -0
- data/public/images/live_tree_branch_collapsed_icon.gif +0 -0
- data/public/images/live_tree_branch_expanded_icon.gif +0 -0
- data/public/images/live_tree_leaf_icon.gif +0 -0
- data/public/javascripts/application.js +258 -0
- data/public/javascripts/controls.js +544 -414
- data/public/javascripts/dragdrop.js +229 -198
- data/public/javascripts/effects.js +499 -459
- data/public/javascripts/prototype.js +2926 -1121
- data/public/javascripts/shadedborder.js +68 -50
- data/public/stylesheets/default.css +34 -34
- data/public/stylesheets/live_tree.css +0 -0
- data/public/stylesheets/scaffold.css +6 -6
- data/script/about +0 -0
- data/script/autospec +6 -0
- data/script/benchmarker +0 -0
- data/script/breakpointer +0 -0
- data/script/console +0 -0
- data/script/dbconsole +3 -0
- data/script/destroy +0 -0
- data/script/generate +0 -0
- data/script/plugin +0 -0
- data/script/profiler +0 -0
- data/script/runner +0 -0
- data/script/server +0 -0
- data/script/spec +10 -0
- data/script/spec_server +9 -0
- data/test/unit/attachment_test.rb +4 -4
- data/test/unit/choice_test.rb +1 -1
- data/test/unit/elt_test.rb +9 -9
- data/test/unit/mail_notify_test.rb +2 -2
- data/test/unit/mail_test.rb +18 -11
- data/test/unit/person_notify_test.rb +1 -1
- data/test/unit/person_test.rb +1 -1
- data/test/unit/subscriber_test.rb +1 -1
- data/test/unit/user_test.rb +81 -0
- data/test/unit/visit_test.rb +6 -6
- data/vendor/plugins/activerecord_foreign_key_extensions/init.rb +2 -0
- data/vendor/plugins/activerecord_foreign_key_extensions/lib/active_record_extensions.rb +182 -0
- data/vendor/plugins/activerecord_text_id_extensions/init.rb +2 -0
- data/vendor/plugins/activerecord_text_id_extensions/lib/active_record_extensions.rb +24 -0
- data/vendor/plugins/acts_as_nested_set/README +15 -0
- data/vendor/plugins/acts_as_nested_set/init.rb +1 -0
- data/vendor/plugins/acts_as_nested_set/lib/active_record/acts/nested_set.rb +210 -0
- data/vendor/plugins/acts_as_nested_set/test/nested_set_test.rb +269 -0
- data/vendor/plugins/acts_as_tree/README +26 -0
- data/vendor/plugins/acts_as_tree/Rakefile +22 -0
- data/vendor/plugins/acts_as_tree/init.rb +1 -0
- data/vendor/plugins/acts_as_tree/lib/active_record/acts/tree.rb +96 -0
- data/vendor/plugins/{output_compression/CHANGELOG → acts_as_tree/test/abstract_unit.rb} +0 -0
- data/vendor/plugins/acts_as_tree/test/acts_as_tree_test.rb +219 -0
- data/vendor/plugins/acts_as_tree/test/database.yml +0 -0
- data/vendor/plugins/acts_as_tree/test/fixtures/mixin.rb +0 -0
- data/vendor/plugins/acts_as_tree/test/fixtures/mixins.yml +0 -0
- data/vendor/plugins/acts_as_tree/test/schema.rb +0 -0
- data/vendor/plugins/classic_pagination/CHANGELOG +152 -0
- data/vendor/plugins/classic_pagination/README +18 -0
- data/vendor/plugins/{output_compression/rakefile → classic_pagination/Rakefile} +22 -22
- data/vendor/plugins/classic_pagination/init.rb +33 -0
- data/vendor/plugins/classic_pagination/install.rb +1 -0
- data/vendor/plugins/classic_pagination/lib/pagination.rb +405 -0
- data/vendor/plugins/classic_pagination/lib/pagination_helper.rb +135 -0
- data/vendor/plugins/classic_pagination/test/fixtures/companies.yml +24 -0
- data/vendor/plugins/classic_pagination/test/fixtures/company.rb +9 -0
- data/vendor/plugins/classic_pagination/test/fixtures/developer.rb +7 -0
- data/vendor/plugins/classic_pagination/test/fixtures/developers.yml +21 -0
- data/vendor/plugins/classic_pagination/test/fixtures/developers_projects.yml +13 -0
- data/vendor/plugins/classic_pagination/test/fixtures/project.rb +3 -0
- data/vendor/plugins/classic_pagination/test/fixtures/projects.yml +7 -0
- data/vendor/plugins/classic_pagination/test/fixtures/replies.yml +13 -0
- data/vendor/plugins/classic_pagination/test/fixtures/reply.rb +5 -0
- data/vendor/plugins/classic_pagination/test/fixtures/schema.sql +42 -0
- data/vendor/plugins/classic_pagination/test/fixtures/topic.rb +3 -0
- data/vendor/plugins/classic_pagination/test/fixtures/topics.yml +22 -0
- data/vendor/plugins/classic_pagination/test/helper.rb +117 -0
- data/vendor/plugins/classic_pagination/test/pagination_helper_test.rb +38 -0
- data/vendor/plugins/classic_pagination/test/pagination_test.rb +177 -0
- data/vendor/plugins/file_column/lib/file_column.rb +1 -1
- data/vendor/plugins/file_column/test/file_column_test.rb +0 -0
- metadata +151 -197
- data/app/helpers/live_tree.rb +0 -238
- data/app/views/elt/_form.rhtml +0 -31
- data/app/views/elt/show_tree.rhtml +0 -8
- data/config/environments/user_environment.rb +0 -1
- data/db/ROOT/Titemagli.txt +0 -3
- data/db/ROOT/titemagli.txt +0 -9
- data/public/javascripts/behaviour.js +0 -254
- data/public/javascripts/ie7-load.htc +0 -1
- data/public/javascripts/ie7.js +0 -6
- data/public/javascripts/live_tree.js +0 -749
- data/public/javascripts/mybehaviour.js +0 -225
- data/public/javascripts/scriptaculous.js +0 -47
- data/public/javascripts/slider.js +0 -283
- data/public/stylesheets/blue.css +0 -471
- data/vendor/plugins/engines/CHANGELOG +0 -241
- data/vendor/plugins/engines/MIT-LICENSE +0 -21
- data/vendor/plugins/engines/README +0 -64
- data/vendor/plugins/engines/Rakefile +0 -32
- data/vendor/plugins/engines/UPGRADING +0 -93
- data/vendor/plugins/engines/about.yml +0 -7
- data/vendor/plugins/engines/generators/plugin_migration/USAGE +0 -45
- data/vendor/plugins/engines/generators/plugin_migration/plugin_migration_generator.rb +0 -79
- data/vendor/plugins/engines/generators/plugin_migration/templates/plugin_migration.erb +0 -13
- data/vendor/plugins/engines/init.rb +0 -40
- data/vendor/plugins/engines/install.rb +0 -32
- data/vendor/plugins/engines/lib/engines.rb +0 -323
- data/vendor/plugins/engines/lib/engines/deprecated_config_support.rb +0 -135
- data/vendor/plugins/engines/lib/engines/plugin.rb +0 -214
- data/vendor/plugins/engines/lib/engines/plugin_list.rb +0 -31
- data/vendor/plugins/engines/lib/engines/plugin_migrator.rb +0 -60
- data/vendor/plugins/engines/lib/engines/rails_extensions.rb +0 -6
- data/vendor/plugins/engines/lib/engines/rails_extensions/active_record.rb +0 -19
- data/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb +0 -143
- data/vendor/plugins/engines/lib/engines/rails_extensions/migrations.rb +0 -155
- data/vendor/plugins/engines/lib/engines/rails_extensions/public_asset_helpers.rb +0 -116
- data/vendor/plugins/engines/lib/engines/rails_extensions/rails.rb +0 -20
- data/vendor/plugins/engines/lib/engines/rails_extensions/rails_initializer.rb +0 -86
- data/vendor/plugins/engines/lib/engines/rails_extensions/routing.rb +0 -77
- data/vendor/plugins/engines/lib/engines/rails_extensions/templates.rb +0 -140
- data/vendor/plugins/engines/lib/engines/testing.rb +0 -87
- data/vendor/plugins/engines/tasks/engines.rake +0 -149
- data/vendor/plugins/login_engine/CHANGELOG +0 -22
- data/vendor/plugins/login_engine/README +0 -344
- data/vendor/plugins/login_engine/app/controllers/user_controller.rb +0 -262
- data/vendor/plugins/login_engine/app/helpers/user_helper.rb +0 -88
- data/vendor/plugins/login_engine/app/models/user.rb +0 -7
- data/vendor/plugins/login_engine/app/models/user_notify.rb +0 -75
- data/vendor/plugins/login_engine/app/views/user/_edit.rhtml +0 -11
- data/vendor/plugins/login_engine/app/views/user/_password.rhtml +0 -9
- data/vendor/plugins/login_engine/app/views/user/change_password.rhtml +0 -17
- data/vendor/plugins/login_engine/app/views/user/edit.rhtml +0 -23
- data/vendor/plugins/login_engine/app/views/user/forgot_password.rhtml +0 -18
- data/vendor/plugins/login_engine/app/views/user/home.rhtml +0 -7
- data/vendor/plugins/login_engine/app/views/user/login.rhtml +0 -17
- data/vendor/plugins/login_engine/app/views/user/logout.rhtml +0 -8
- data/vendor/plugins/login_engine/app/views/user/signup.rhtml +0 -17
- data/vendor/plugins/login_engine/db/migrate/001_initial_schema.rb +0 -25
- data/vendor/plugins/login_engine/init_engine.rb +0 -11
- data/vendor/plugins/login_engine/install.rb +0 -4
- data/vendor/plugins/login_engine/lib/login_engine.rb +0 -62
- data/vendor/plugins/login_engine/lib/login_engine/authenticated_system.rb +0 -113
- data/vendor/plugins/login_engine/lib/login_engine/authenticated_user.rb +0 -155
- data/vendor/plugins/login_engine/public/stylesheets/login_engine.css +0 -81
- data/vendor/plugins/login_engine/test/fixtures/users.yml +0 -41
- data/vendor/plugins/login_engine/test/functional/user_controller_test.rb +0 -536
- data/vendor/plugins/login_engine/test/mocks/mail.rb +0 -14
- data/vendor/plugins/login_engine/test/mocks/time.rb +0 -19
- data/vendor/plugins/login_engine/test/test_helper.rb +0 -11
- data/vendor/plugins/login_engine/test/unit/user_test.rb +0 -114
- data/vendor/plugins/output_compression/MIT-LICENSE +0 -20
- data/vendor/plugins/output_compression/README +0 -4
- data/vendor/plugins/output_compression/init.rb +0 -1
- data/vendor/plugins/output_compression/lib/output_compression.rb +0 -84
- data/vendor/plugins/output_compression/test/output_test.rb +0 -11
- data/vendor/plugins/output_compression/test/test_controller.rb +0 -3
- data/vendor/plugins/output_compression/test/test_helper.rb +0 -14
data/app/views/elt/rss.rxml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
xml.rss("version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/") do
|
2
2
|
xml.channel do
|
3
3
|
xml.title @elt.subject
|
4
|
-
xml.link url_for(:only_path => false, :
|
4
|
+
xml.link url_for(:only_path => false, :id => @elt)
|
5
5
|
xml.description @elt.subject
|
6
6
|
|
7
7
|
Elt.find(:all,
|
@@ -11,17 +11,10 @@ xml.rss("version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/") do
|
|
11
11
|
xml.item do
|
12
12
|
xml.title item.subject
|
13
13
|
#xml.category(@elt.subject)
|
14
|
-
xml.pubDate item.created_on
|
14
|
+
xml.pubDate item.created_on.strftime('%Y-%m-%d %H:%M:%S%z')
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
:action => 'blog', :id => item.id+'.html'))
|
19
|
-
xml.comments(url_for(:only_path => false, :controller => 'perso',
|
20
|
-
:action => 'blog', :id => item.id+'.html'))
|
21
|
-
else
|
22
|
-
xml.link(url_for(:only_path => false, :action => 'show', :id => item))
|
23
|
-
xml.comments(url_for(:only_path => false, :action => 'show', :id => item))
|
24
|
-
end
|
16
|
+
xml.link(url_for(:only_path => false, :action => 'index', :id => item))
|
17
|
+
xml.comments(url_for(:only_path => false, :action => 'index', :id => item))
|
25
18
|
|
26
19
|
xml.tag!("dc:creator", item.person.name) if item.person
|
27
20
|
|
data/app/views/elt/show.rhtml
CHANGED
@@ -1,21 +1,23 @@
|
|
1
1
|
<% voters = Choice.count :select => 'person_id', :distinct => true %>
|
2
2
|
|
3
|
-
<div id="sidebar"
|
4
|
-
<script type="text/javascript">if (displayBorder) { border.render('sidebar'); }</script>
|
3
|
+
<div id="sidebar">
|
5
4
|
<%= render :partial => '/layouts/title' %>
|
6
5
|
|
7
|
-
|
8
|
-
|
6
|
+
<%= periodically_call_remote(
|
7
|
+
:update => 'spinner',
|
8
|
+
:frequency => UPDATE_VIEW_PERIOD,
|
9
|
+
:url => { :action => 'updateView', :id => @elt })%>
|
10
|
+
<span id="spinner"></span>
|
9
11
|
|
10
|
-
|
11
|
-
|
12
|
-
|
12
|
+
<div class="box identity" id="identity">
|
13
|
+
<%= render :partial => 'account/show', :locals => { :elt => @elt.parent } %>
|
14
|
+
</div>
|
13
15
|
|
14
16
|
<div class="box" id="filter">
|
15
17
|
<h3 class="boxTitle"><%= _('Filter') %></h3>
|
16
18
|
<form id="filterForm" action="">
|
17
19
|
<p>
|
18
|
-
<a onclick="return decrementFilter()" href="#" accesskey="-"
|
20
|
+
<a onclick="return decrementFilter()" href="#" accesskey="-">-</a>
|
19
21
|
<select name="filter"
|
20
22
|
onchange="setFilter(this.options[this.selectedIndex].value, '<%= @elt.id %>')">
|
21
23
|
<%= options_for_select [["", -voters]] %>
|
@@ -28,59 +30,63 @@
|
|
28
30
|
<script type="text/javascript">setFilterFromCookie();</script>
|
29
31
|
</div>
|
30
32
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
33
|
+
<div class="box" id="listVisitors">
|
34
|
+
<%= render :partial => '/elt/list/visitors' %>
|
35
|
+
</div>
|
36
|
+
|
37
|
+
<div class="box" id="listSubscribers">
|
38
|
+
<%= render :partial => '/elt/list/subscribers' %>
|
39
|
+
</div>
|
40
|
+
|
41
|
+
<div class="box" id="listByVote">
|
42
|
+
<%= render :partial => '/elt/list/byVote' %>
|
43
|
+
</div>
|
44
|
+
|
45
|
+
<div class="box" id="listByDate">
|
46
|
+
<%= render :partial => '/elt/list/byDate' %>
|
47
|
+
</div>
|
48
|
+
|
49
|
+
<div class="box">
|
50
|
+
<h3 class="boxTitle"><%= _('Links') %></h3>
|
51
|
+
<div class="boxLine"><a href="http://alivrouvert.fr">
|
52
|
+
À Livr’ Ouvert</a></div>
|
53
|
+
<div class="boxLine"><a href="http://www.baratissus.com">
|
54
|
+
Le bar à tissus</a></div>
|
55
|
+
<div class="boxLine"><a href="http://april.org">
|
56
|
+
April</a></div>
|
57
|
+
|
58
|
+
<h4><%= _('Blogs') %></h4>
|
59
|
+
<div class="boxLine"><a href="http://bookinette.fr">
|
60
|
+
Bookinette's</a></div>
|
61
|
+
<div class="boxLine"><a href="http://blog.echarp.org">
|
62
|
+
echarp's</a></div>
|
63
|
+
<div class="boxLine"><a href="http://www-inf.int-evry.fr/~olberger/weblog/">
|
64
|
+
Olivier's</a></div>
|
65
|
+
<div class="boxLine"><a href="http://www.couchet.org/blog/">
|
66
|
+
mad’s</a></div>
|
67
|
+
<div class="boxLine"><a href="http://www.grassouille.org/blog/">
|
68
|
+
benj’s</a></div>
|
69
|
+
|
70
|
+
<h4><%= _('Democracy') %></h4>
|
71
|
+
<div class="boxLine"><a href="http://worldblu.com">
|
72
|
+
World BLU</a></div>
|
73
|
+
<div class="boxLine"><a href="http://groups.google.com/group/worldcit">
|
74
|
+
The Community of World Citizens</a></div>
|
75
|
+
<div class="boxLine"><a href="http://world-wide-democracy.net">
|
76
|
+
Worldwide Direct Democracy Movement</a></div>
|
77
|
+
</div>
|
74
78
|
|
75
79
|
<div class="box">
|
76
|
-
|
80
|
+
<h3 class="boxTitle"><%= _('Search') %></h3>
|
77
81
|
<form action="http://google.com/search">
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
82
|
+
<div>
|
83
|
+
<input type="hidden" name="domains"
|
84
|
+
value="<%= ActionMailer::Base.smtp_settings[:domain] %>" />
|
85
|
+
<input type="hidden" name="sitesearch"
|
86
|
+
value="<%= ActionMailer::Base.smtp_settings[:domain] %>" />
|
87
|
+
<input type="text" name="q" style="width:50%"/>
|
88
|
+
<%= submit_tag 'OK' %>
|
89
|
+
</div>
|
84
90
|
</form>
|
85
91
|
</div>
|
86
92
|
|
@@ -144,7 +150,5 @@
|
|
144
150
|
</h3>
|
145
151
|
|
146
152
|
<ul class="top">
|
147
|
-
<%= render :partial => 'elt', :
|
148
|
-
:locals => { :elt => @elt, :eltTop => true } %>
|
153
|
+
<%= render :partial => 'elt', :locals => { :elt => @elt, :eltTop => true } %>
|
149
154
|
</ul>
|
150
|
-
|
data/app/views/elt/vote_rss.rxml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
xml.rss("version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/") do
|
2
2
|
xml.channel do
|
3
3
|
xml.title @elt.subject
|
4
|
-
xml.link url_for(:only_path => false, :
|
4
|
+
xml.link url_for(:only_path => false, :id => @elt)
|
5
5
|
xml.description @elt.subject
|
6
6
|
|
7
7
|
Elt.find(:all,
|
@@ -18,17 +18,10 @@ xml.rss("version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/") do
|
|
18
18
|
xml.title item.subject
|
19
19
|
#xml.category(@elt.subject)
|
20
20
|
xml.vote item.result
|
21
|
-
xml.pubDate item.created_on
|
21
|
+
xml.pubDate item.created_on.strftime('%Y-%m-%d %H:%M:%S%z')
|
22
22
|
|
23
|
-
|
24
|
-
|
25
|
-
:action => 'blog', :id => item.id+'.html'))
|
26
|
-
xml.comments(url_for(:only_path => false, :controller => 'perso',
|
27
|
-
:action => 'blog', :id => item.id+'.html'))
|
28
|
-
else
|
29
|
-
xml.link(url_for(:only_path => false, :action => 'show', :id => item))
|
30
|
-
xml.comments(url_for(:only_path => false, :action => 'show', :id => item))
|
31
|
-
end
|
23
|
+
xml.link(url_for(:only_path => false, :action => 'index', :id => item))
|
24
|
+
xml.comments(url_for(:only_path => false, :action => 'index', :id => item))
|
32
25
|
|
33
26
|
xml.tag!("dc:creator", item.person.name) if item.person
|
34
27
|
|
data/app/views/layouts/top.rhtml
CHANGED
@@ -7,8 +7,6 @@
|
|
7
7
|
<meta name="verify-v1" content="GQG8JPKekfUN1haTZYQRLP+PvKkH43Rg2HQ53OTLgTg=" />
|
8
8
|
<!-- For www.echarp.org -->
|
9
9
|
<meta name="verify-v1" content="GQG8JPKekfUN1haTZYQRLP+PvKkH43Rg2HQ53OTLgTg=" />
|
10
|
-
<!-- echarp.dyndns.org -->
|
11
|
-
<meta name="verify-v1" content="6espv1bly2noRX0tNze9x9In903DuzgvEzmAQdDw250=" />
|
12
10
|
<title><%= @title %></title>
|
13
11
|
|
14
12
|
<link rel="alternate" type="application/rss+xml" title="<%= _('Latest posts') %> - <%= @title %>"
|
@@ -16,42 +14,32 @@
|
|
16
14
|
<link rel="alternate" type="application/rss+xml" title="<%= _('Highest posts') %> - <%= @title %>"
|
17
15
|
href="<%= url_for :action => 'vote_rss', :id => @elt %>"/>
|
18
16
|
|
17
|
+
<%request.subdomains.each { |d|%>
|
18
|
+
<%= stylesheet_link_tag d, :title => d, :rel => 'alternate stylesheet' %>
|
19
|
+
<%}%>
|
20
|
+
|
21
|
+
<link rel="shortcut icon" href="/images/world.png" type="image/png"/>
|
19
22
|
<%= stylesheet_link_tag 'default' %>
|
20
|
-
<%= stylesheet_link_tag 'blue', :title => 'blue', :rel => 'alternate stylesheet' %>
|
21
|
-
<%= javascript_include_tag "/javascripts/prototype" %>
|
22
|
-
<%= javascript_include_tag "/javascripts/scriptaculous" %>
|
23
|
-
<%= javascript_include_tag "/javascripts/shadedborder" %>
|
24
23
|
|
25
|
-
|
26
|
-
|
24
|
+
<script src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.2/prototype.js" type="text/javascript"></script>
|
25
|
+
<script src="http://ajax.googleapis.com/ajax/libs/scriptaculous/1.8.1/scriptaculous.js" type="text/javascript"></script>
|
27
26
|
|
28
27
|
<!-- compliance patch for microsoft browsers -->
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
border-right: white;
|
43
|
-
border-left: white; }
|
44
|
-
ul.top li.elt { background: none; }
|
45
|
-
</style>
|
46
|
-
<script type="text/javascript">
|
47
|
-
displayBorder = false;
|
48
|
-
//IE7_PNG_SUFFIX = "architecture.png";
|
49
|
-
</script>
|
50
|
-
<%= javascript_include_tag "/javascripts/ie7.js" %>
|
28
|
+
<!--[if lt IE 8]>
|
29
|
+
<style type="text/css">
|
30
|
+
ul.top li.elt {
|
31
|
+
width: auto; !important;
|
32
|
+
background: white !important; }
|
33
|
+
ul.top h1 a, ul.top h2 a {
|
34
|
+
border-right: white;
|
35
|
+
border-left: white; }
|
36
|
+
</style>
|
37
|
+
<script type="text/javascript">
|
38
|
+
//IE7_PNG_SUFFIX = "architecture.png";
|
39
|
+
</script>
|
40
|
+
<script src="http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE8.js" type="text/javascript"></script>
|
51
41
|
<![endif]-->
|
52
42
|
|
53
|
-
<link rel="shortcut icon" href="/images/world.png" type="image/png"/>
|
54
|
-
|
55
43
|
<meta name="description" content="Parlement, a mix between direct and representative democracy, in the shape of a website. A mailing list, forum, chat. Democratic mailing list and forum"/>
|
56
44
|
<meta name="author" content="Emmanuel Charpentier"/>
|
57
45
|
<meta name="subject" content="Parlement, democratic mailing list and forum"/>
|
@@ -66,27 +54,28 @@
|
|
66
54
|
|
67
55
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
68
56
|
|
69
|
-
|
70
|
-
|
71
|
-
var border = RUZEE.ShadedBorder.create({ corner: 8, shadow: 16, border: 2 });
|
72
|
-
}
|
73
|
-
</script>
|
57
|
+
<%= javascript_include_tag "/javascripts/shadedborder" %>
|
58
|
+
<%= javascript_include_tag "/javascripts/application" %>
|
74
59
|
</head>
|
75
60
|
|
76
|
-
<body
|
77
|
-
|
78
|
-
|
61
|
+
<body class="<%= session[:person_id] ? "logged" : "anon" %>">
|
62
|
+
<div id="rounded">
|
63
|
+
<%= @content_for_layout %>
|
79
64
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
</
|
89
|
-
</
|
65
|
+
<p class="version">
|
66
|
+
<a href="<%= url_for :id => '' %>">v<%= PARLEMENT_VERSION %></a>
|
67
|
+
<a href="http://www.pagerank.net/" title="Search Engine Optimization">
|
68
|
+
<img src="http://www.pagerank.net/pagerank.gif" alt="Search Engine Optimization"/>
|
69
|
+
</a>
|
70
|
+
<a href="http://validator.w3.org/check?uri=referer">
|
71
|
+
<img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Strict"/>
|
72
|
+
</a>
|
73
|
+
</p>
|
74
|
+
</div>
|
75
|
+
<script type="text/javascript">
|
76
|
+
border.render('sidebar');
|
77
|
+
border.render('rounded');
|
78
|
+
</script>
|
90
79
|
</body>
|
91
80
|
</html>
|
92
81
|
|
@@ -48,7 +48,7 @@
|
|
48
48
|
<% for elt in e[0...PAGE_LENGTH] %>
|
49
49
|
<li class="elt">
|
50
50
|
<span class="author"><<%= elt.created_on.strftime('%d/%m %H:%M') %>></span>
|
51
|
-
<%= link_to elt.subject.gsub(/\[.*\]/, ''), :id => elt, :controller => 'elt'
|
51
|
+
<%= link_to elt.subject.gsub(/\[.*\]/, ''), :id => elt, :controller => 'elt' %>
|
52
52
|
(<%= elt.children.size %> sub element(s))
|
53
53
|
<span class="result"><%= sprintf("%+d", elt.result) %></span>
|
54
54
|
<% " "*22 %>
|
data/app/views/person/show.rhtml
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
<% for elt in @person.subscribed_elts.reverse[0...LIST_LENGTH] %>
|
15
15
|
<div class="boxLine">
|
16
16
|
<span class="result"><%= sprintf("%+d", elt.result) %></span>
|
17
|
-
<%= link_to(elt.subject.gsub(/\[.*\]/, ''), :controller => 'elt', :
|
17
|
+
<%= link_to(elt.subject.gsub(/\[.*\]/, ''), :controller => 'elt', :id => elt) %>
|
18
18
|
</div>
|
19
19
|
<% end %>
|
20
20
|
</div>
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/config/boot.rb
CHANGED
@@ -1,45 +1,110 @@
|
|
1
|
-
# Don't change this file
|
1
|
+
# Don't change this file!
|
2
|
+
# Configure your app in config/environment.rb and config/environments/*.rb
|
2
3
|
|
3
|
-
unless defined?(RAILS_ROOT)
|
4
|
-
root_path = File.join(File.dirname(__FILE__), '..')
|
4
|
+
RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
module Rails
|
7
|
+
class << self
|
8
|
+
def boot!
|
9
|
+
unless booted?
|
10
|
+
preinitialize
|
11
|
+
pick_boot.run
|
12
|
+
end
|
13
|
+
end
|
10
14
|
|
11
|
-
|
12
|
-
|
15
|
+
def booted?
|
16
|
+
defined? Rails::Initializer
|
17
|
+
end
|
13
18
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
+
def pick_boot
|
20
|
+
(vendor_rails? ? VendorBoot : GemBoot).new
|
21
|
+
end
|
22
|
+
|
23
|
+
def vendor_rails?
|
24
|
+
File.exist?("#{RAILS_ROOT}/vendor/rails")
|
25
|
+
end
|
19
26
|
|
20
|
-
|
21
|
-
|
22
|
-
|
27
|
+
def preinitialize
|
28
|
+
load(preinitializer_path) if File.exist?(preinitializer_path)
|
29
|
+
end
|
30
|
+
|
31
|
+
def preinitializer_path
|
32
|
+
"#{RAILS_ROOT}/config/preinitializer.rb"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
class Boot
|
37
|
+
def run
|
38
|
+
load_initializer
|
39
|
+
Rails::Initializer.run(:set_load_path)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
class VendorBoot < Boot
|
44
|
+
def load_initializer
|
45
|
+
require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
|
46
|
+
Rails::Initializer.run(:install_gem_spec_stubs)
|
47
|
+
Rails::GemDependency.add_frozen_gem_path
|
48
|
+
end
|
49
|
+
end
|
23
50
|
|
24
|
-
|
25
|
-
|
26
|
-
|
51
|
+
class GemBoot < Boot
|
52
|
+
def load_initializer
|
53
|
+
self.class.load_rubygems
|
54
|
+
load_rails_gem
|
55
|
+
require 'initializer'
|
56
|
+
end
|
27
57
|
|
28
|
-
|
29
|
-
|
30
|
-
|
58
|
+
def load_rails_gem
|
59
|
+
if version = self.class.gem_version
|
60
|
+
gem 'rails', version
|
31
61
|
else
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
62
|
+
gem 'rails'
|
63
|
+
end
|
64
|
+
rescue Gem::LoadError => load_error
|
65
|
+
$stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.)
|
66
|
+
exit 1
|
67
|
+
end
|
68
|
+
|
69
|
+
class << self
|
70
|
+
def rubygems_version
|
71
|
+
Gem::RubyGemsVersion rescue nil
|
72
|
+
end
|
73
|
+
|
74
|
+
def gem_version
|
75
|
+
if defined? RAILS_GEM_VERSION
|
76
|
+
RAILS_GEM_VERSION
|
77
|
+
elsif ENV.include?('RAILS_GEM_VERSION')
|
78
|
+
ENV['RAILS_GEM_VERSION']
|
79
|
+
else
|
80
|
+
parse_gem_version(read_environment_rb)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
def load_rubygems
|
85
|
+
require 'rubygems'
|
86
|
+
min_version = '1.3.1'
|
87
|
+
unless rubygems_version >= min_version
|
88
|
+
$stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.)
|
89
|
+
exit 1
|
90
|
+
end
|
91
|
+
|
92
|
+
rescue LoadError
|
93
|
+
$stderr.puts %Q(Rails requires RubyGems >= #{min_version}. Please install RubyGems and try again: http://rubygems.rubyforge.org)
|
36
94
|
exit 1
|
37
95
|
end
|
38
|
-
|
39
|
-
|
40
|
-
|
96
|
+
|
97
|
+
def parse_gem_version(text)
|
98
|
+
$1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/
|
99
|
+
end
|
100
|
+
|
101
|
+
private
|
102
|
+
def read_environment_rb
|
103
|
+
File.read("#{RAILS_ROOT}/config/environment.rb")
|
104
|
+
end
|
41
105
|
end
|
42
106
|
end
|
43
|
-
|
44
|
-
Rails::Initializer.run(:set_load_path)
|
45
107
|
end
|
108
|
+
|
109
|
+
# All that for this:
|
110
|
+
Rails.boot!
|