parlement 0.14 → 0.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (205) hide show
  1. data/CHANGES +41 -1
  2. data/MEMORY +66 -5
  3. data/README +10 -5
  4. data/Rakefile +15 -23
  5. data/app/controllers/account_controller.rb +48 -43
  6. data/app/controllers/{application.rb → application_controller.rb} +15 -12
  7. data/app/controllers/elt_controller.rb +77 -32
  8. data/app/controllers/subscriber_controller.rb +11 -10
  9. data/app/helpers/application_helper.rb +14 -1
  10. data/app/helpers/elt_helper.rb +9 -7
  11. data/app/models/elt.rb +25 -24
  12. data/app/models/mail.rb +44 -47
  13. data/app/models/person_notify.rb +2 -2
  14. data/app/models/user.rb +128 -2
  15. data/app/models/user_notify.rb +15 -15
  16. data/app/views/account/_login.rhtml +39 -39
  17. data/app/views/account/_show.rhtml +22 -30
  18. data/app/views/account/signup.rhtml +2 -2
  19. data/app/views/elt/_choice.rhtml +6 -6
  20. data/app/views/elt/_elt.rhtml +27 -32
  21. data/app/views/elt/choices.rhtml +16 -18
  22. data/app/views/elt/list/_byDate.rhtml +14 -14
  23. data/app/views/elt/list/_byVote.rhtml +15 -15
  24. data/app/views/elt/list/_children.rhtml +48 -40
  25. data/app/views/elt/list/_subscribers.rhtml +1 -1
  26. data/app/views/elt/new.rhtml +22 -21
  27. data/app/views/elt/rss.rxml +4 -11
  28. data/app/views/elt/show.rhtml +65 -61
  29. data/app/views/elt/vote_rss.rxml +4 -11
  30. data/app/views/layouts/top.rhtml +39 -50
  31. data/app/views/person/_listElts.rhtml +1 -1
  32. data/app/views/person/show.rhtml +1 -1
  33. data/{vendor/plugins/login_engine/app → app}/views/user_notify/change_password.rhtml +0 -0
  34. data/{vendor/plugins/login_engine/app → app}/views/user_notify/delete.rhtml +0 -0
  35. data/{vendor/plugins/login_engine/app → app}/views/user_notify/forgot_password.rhtml +0 -0
  36. data/{vendor/plugins/login_engine/app → app}/views/user_notify/pending_delete.rhtml +0 -0
  37. data/{vendor/plugins/login_engine/app → app}/views/user_notify/signup.rhtml +0 -0
  38. data/config/boot.rb +97 -32
  39. data/config/environment.rb +37 -35
  40. data/config/environments/development.rb +2 -3
  41. data/config/environments/production.rb +3 -0
  42. data/config/initializers/string_ruby_1.8.rb +10 -0
  43. data/config/routes.rb +17 -22
  44. data/db/schema.rb +102 -74
  45. data/lib/tasks/rspec.rake +167 -0
  46. data/public/404.html +25 -7
  47. data/public/500.html +26 -7
  48. data/public/dispatch.cgi +0 -0
  49. data/public/dispatch.fcgi +0 -0
  50. data/public/dispatch.rb +0 -0
  51. data/public/images/live_tree_branch_collapsed_icon.gif +0 -0
  52. data/public/images/live_tree_branch_expanded_icon.gif +0 -0
  53. data/public/images/live_tree_leaf_icon.gif +0 -0
  54. data/public/javascripts/application.js +258 -0
  55. data/public/javascripts/controls.js +544 -414
  56. data/public/javascripts/dragdrop.js +229 -198
  57. data/public/javascripts/effects.js +499 -459
  58. data/public/javascripts/prototype.js +2926 -1121
  59. data/public/javascripts/shadedborder.js +68 -50
  60. data/public/stylesheets/default.css +34 -34
  61. data/public/stylesheets/live_tree.css +0 -0
  62. data/public/stylesheets/scaffold.css +6 -6
  63. data/script/about +0 -0
  64. data/script/autospec +6 -0
  65. data/script/benchmarker +0 -0
  66. data/script/breakpointer +0 -0
  67. data/script/console +0 -0
  68. data/script/dbconsole +3 -0
  69. data/script/destroy +0 -0
  70. data/script/generate +0 -0
  71. data/script/plugin +0 -0
  72. data/script/profiler +0 -0
  73. data/script/runner +0 -0
  74. data/script/server +0 -0
  75. data/script/spec +10 -0
  76. data/script/spec_server +9 -0
  77. data/test/unit/attachment_test.rb +4 -4
  78. data/test/unit/choice_test.rb +1 -1
  79. data/test/unit/elt_test.rb +9 -9
  80. data/test/unit/mail_notify_test.rb +2 -2
  81. data/test/unit/mail_test.rb +18 -11
  82. data/test/unit/person_notify_test.rb +1 -1
  83. data/test/unit/person_test.rb +1 -1
  84. data/test/unit/subscriber_test.rb +1 -1
  85. data/test/unit/user_test.rb +81 -0
  86. data/test/unit/visit_test.rb +6 -6
  87. data/vendor/plugins/activerecord_foreign_key_extensions/init.rb +2 -0
  88. data/vendor/plugins/activerecord_foreign_key_extensions/lib/active_record_extensions.rb +182 -0
  89. data/vendor/plugins/activerecord_text_id_extensions/init.rb +2 -0
  90. data/vendor/plugins/activerecord_text_id_extensions/lib/active_record_extensions.rb +24 -0
  91. data/vendor/plugins/acts_as_nested_set/README +15 -0
  92. data/vendor/plugins/acts_as_nested_set/init.rb +1 -0
  93. data/vendor/plugins/acts_as_nested_set/lib/active_record/acts/nested_set.rb +210 -0
  94. data/vendor/plugins/acts_as_nested_set/test/nested_set_test.rb +269 -0
  95. data/vendor/plugins/acts_as_tree/README +26 -0
  96. data/vendor/plugins/acts_as_tree/Rakefile +22 -0
  97. data/vendor/plugins/acts_as_tree/init.rb +1 -0
  98. data/vendor/plugins/acts_as_tree/lib/active_record/acts/tree.rb +96 -0
  99. data/vendor/plugins/{output_compression/CHANGELOG → acts_as_tree/test/abstract_unit.rb} +0 -0
  100. data/vendor/plugins/acts_as_tree/test/acts_as_tree_test.rb +219 -0
  101. data/vendor/plugins/acts_as_tree/test/database.yml +0 -0
  102. data/vendor/plugins/acts_as_tree/test/fixtures/mixin.rb +0 -0
  103. data/vendor/plugins/acts_as_tree/test/fixtures/mixins.yml +0 -0
  104. data/vendor/plugins/acts_as_tree/test/schema.rb +0 -0
  105. data/vendor/plugins/classic_pagination/CHANGELOG +152 -0
  106. data/vendor/plugins/classic_pagination/README +18 -0
  107. data/vendor/plugins/{output_compression/rakefile → classic_pagination/Rakefile} +22 -22
  108. data/vendor/plugins/classic_pagination/init.rb +33 -0
  109. data/vendor/plugins/classic_pagination/install.rb +1 -0
  110. data/vendor/plugins/classic_pagination/lib/pagination.rb +405 -0
  111. data/vendor/plugins/classic_pagination/lib/pagination_helper.rb +135 -0
  112. data/vendor/plugins/classic_pagination/test/fixtures/companies.yml +24 -0
  113. data/vendor/plugins/classic_pagination/test/fixtures/company.rb +9 -0
  114. data/vendor/plugins/classic_pagination/test/fixtures/developer.rb +7 -0
  115. data/vendor/plugins/classic_pagination/test/fixtures/developers.yml +21 -0
  116. data/vendor/plugins/classic_pagination/test/fixtures/developers_projects.yml +13 -0
  117. data/vendor/plugins/classic_pagination/test/fixtures/project.rb +3 -0
  118. data/vendor/plugins/classic_pagination/test/fixtures/projects.yml +7 -0
  119. data/vendor/plugins/classic_pagination/test/fixtures/replies.yml +13 -0
  120. data/vendor/plugins/classic_pagination/test/fixtures/reply.rb +5 -0
  121. data/vendor/plugins/classic_pagination/test/fixtures/schema.sql +42 -0
  122. data/vendor/plugins/classic_pagination/test/fixtures/topic.rb +3 -0
  123. data/vendor/plugins/classic_pagination/test/fixtures/topics.yml +22 -0
  124. data/vendor/plugins/classic_pagination/test/helper.rb +117 -0
  125. data/vendor/plugins/classic_pagination/test/pagination_helper_test.rb +38 -0
  126. data/vendor/plugins/classic_pagination/test/pagination_test.rb +177 -0
  127. data/vendor/plugins/file_column/lib/file_column.rb +1 -1
  128. data/vendor/plugins/file_column/test/file_column_test.rb +0 -0
  129. metadata +151 -197
  130. data/app/helpers/live_tree.rb +0 -238
  131. data/app/views/elt/_form.rhtml +0 -31
  132. data/app/views/elt/show_tree.rhtml +0 -8
  133. data/config/environments/user_environment.rb +0 -1
  134. data/db/ROOT/Titemagli.txt +0 -3
  135. data/db/ROOT/titemagli.txt +0 -9
  136. data/public/javascripts/behaviour.js +0 -254
  137. data/public/javascripts/ie7-load.htc +0 -1
  138. data/public/javascripts/ie7.js +0 -6
  139. data/public/javascripts/live_tree.js +0 -749
  140. data/public/javascripts/mybehaviour.js +0 -225
  141. data/public/javascripts/scriptaculous.js +0 -47
  142. data/public/javascripts/slider.js +0 -283
  143. data/public/stylesheets/blue.css +0 -471
  144. data/vendor/plugins/engines/CHANGELOG +0 -241
  145. data/vendor/plugins/engines/MIT-LICENSE +0 -21
  146. data/vendor/plugins/engines/README +0 -64
  147. data/vendor/plugins/engines/Rakefile +0 -32
  148. data/vendor/plugins/engines/UPGRADING +0 -93
  149. data/vendor/plugins/engines/about.yml +0 -7
  150. data/vendor/plugins/engines/generators/plugin_migration/USAGE +0 -45
  151. data/vendor/plugins/engines/generators/plugin_migration/plugin_migration_generator.rb +0 -79
  152. data/vendor/plugins/engines/generators/plugin_migration/templates/plugin_migration.erb +0 -13
  153. data/vendor/plugins/engines/init.rb +0 -40
  154. data/vendor/plugins/engines/install.rb +0 -32
  155. data/vendor/plugins/engines/lib/engines.rb +0 -323
  156. data/vendor/plugins/engines/lib/engines/deprecated_config_support.rb +0 -135
  157. data/vendor/plugins/engines/lib/engines/plugin.rb +0 -214
  158. data/vendor/plugins/engines/lib/engines/plugin_list.rb +0 -31
  159. data/vendor/plugins/engines/lib/engines/plugin_migrator.rb +0 -60
  160. data/vendor/plugins/engines/lib/engines/rails_extensions.rb +0 -6
  161. data/vendor/plugins/engines/lib/engines/rails_extensions/active_record.rb +0 -19
  162. data/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb +0 -143
  163. data/vendor/plugins/engines/lib/engines/rails_extensions/migrations.rb +0 -155
  164. data/vendor/plugins/engines/lib/engines/rails_extensions/public_asset_helpers.rb +0 -116
  165. data/vendor/plugins/engines/lib/engines/rails_extensions/rails.rb +0 -20
  166. data/vendor/plugins/engines/lib/engines/rails_extensions/rails_initializer.rb +0 -86
  167. data/vendor/plugins/engines/lib/engines/rails_extensions/routing.rb +0 -77
  168. data/vendor/plugins/engines/lib/engines/rails_extensions/templates.rb +0 -140
  169. data/vendor/plugins/engines/lib/engines/testing.rb +0 -87
  170. data/vendor/plugins/engines/tasks/engines.rake +0 -149
  171. data/vendor/plugins/login_engine/CHANGELOG +0 -22
  172. data/vendor/plugins/login_engine/README +0 -344
  173. data/vendor/plugins/login_engine/app/controllers/user_controller.rb +0 -262
  174. data/vendor/plugins/login_engine/app/helpers/user_helper.rb +0 -88
  175. data/vendor/plugins/login_engine/app/models/user.rb +0 -7
  176. data/vendor/plugins/login_engine/app/models/user_notify.rb +0 -75
  177. data/vendor/plugins/login_engine/app/views/user/_edit.rhtml +0 -11
  178. data/vendor/plugins/login_engine/app/views/user/_password.rhtml +0 -9
  179. data/vendor/plugins/login_engine/app/views/user/change_password.rhtml +0 -17
  180. data/vendor/plugins/login_engine/app/views/user/edit.rhtml +0 -23
  181. data/vendor/plugins/login_engine/app/views/user/forgot_password.rhtml +0 -18
  182. data/vendor/plugins/login_engine/app/views/user/home.rhtml +0 -7
  183. data/vendor/plugins/login_engine/app/views/user/login.rhtml +0 -17
  184. data/vendor/plugins/login_engine/app/views/user/logout.rhtml +0 -8
  185. data/vendor/plugins/login_engine/app/views/user/signup.rhtml +0 -17
  186. data/vendor/plugins/login_engine/db/migrate/001_initial_schema.rb +0 -25
  187. data/vendor/plugins/login_engine/init_engine.rb +0 -11
  188. data/vendor/plugins/login_engine/install.rb +0 -4
  189. data/vendor/plugins/login_engine/lib/login_engine.rb +0 -62
  190. data/vendor/plugins/login_engine/lib/login_engine/authenticated_system.rb +0 -113
  191. data/vendor/plugins/login_engine/lib/login_engine/authenticated_user.rb +0 -155
  192. data/vendor/plugins/login_engine/public/stylesheets/login_engine.css +0 -81
  193. data/vendor/plugins/login_engine/test/fixtures/users.yml +0 -41
  194. data/vendor/plugins/login_engine/test/functional/user_controller_test.rb +0 -536
  195. data/vendor/plugins/login_engine/test/mocks/mail.rb +0 -14
  196. data/vendor/plugins/login_engine/test/mocks/time.rb +0 -19
  197. data/vendor/plugins/login_engine/test/test_helper.rb +0 -11
  198. data/vendor/plugins/login_engine/test/unit/user_test.rb +0 -114
  199. data/vendor/plugins/output_compression/MIT-LICENSE +0 -20
  200. data/vendor/plugins/output_compression/README +0 -4
  201. data/vendor/plugins/output_compression/init.rb +0 -1
  202. data/vendor/plugins/output_compression/lib/output_compression.rb +0 -84
  203. data/vendor/plugins/output_compression/test/output_test.rb +0 -11
  204. data/vendor/plugins/output_compression/test/test_controller.rb +0 -3
  205. data/vendor/plugins/output_compression/test/test_helper.rb +0 -14
@@ -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, :action => 'show', :id => @elt)
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
- if url_for(:only_path => false).match(/http:\/\/echarp.dyndns.org/) and @elt.id == 'blog'
17
- xml.link(url_for(:only_path => false, :controller => 'perso',
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
 
@@ -1,21 +1,23 @@
1
1
  <% voters = Choice.count :select => 'person_id', :distinct => true %>
2
2
 
3
- <div id="sidebar" class="sb">
4
- <script type="text/javascript">if (displayBorder) { border.render('sidebar'); }</script>
3
+ <div id="sidebar">
5
4
  <%= render :partial => '/layouts/title' %>
6
5
 
7
- <%= periodically_call_remote(:update => 'spinner', :url => { :action => 'updateView', :id => @elt })%>
8
- <span id="spinner"></span>
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
- <div class="box identity" id="identity">
11
- <%= render :partial => 'account/show', :locals => { :elt => @elt.parent } %>
12
- </div>
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="-">&#x2012;</a>
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
- <div class="box" id="listVisitors">
32
- <%= render :partial => '/elt/list/visitors' %>
33
- </div>
34
-
35
- <div class="box" id="listSubscribers">
36
- <%= render :partial => '/elt/list/subscribers' %>
37
- </div>
38
-
39
- <div class="box" id="listByVote">
40
- <%= render :partial => '/elt/list/byVote' %>
41
- </div>
42
-
43
- <div class="box" id="listByDate">
44
- <%= render :partial => '/elt/list/byDate' %>
45
- </div>
46
-
47
- <div class="box">
48
- <h3 class="boxTitle"><%= _('Links') %></h3>
49
- <h4><%= _('Personal') %></h4>
50
- <div class="boxLine"><a href="http://www.alivrouvert.com">
51
- À Livr&#8217; Ouvert</a></div>
52
- <div class="boxLine"><a href="http://www.baratissus.com">
53
- Le bar à tissus</a></div>
54
-
55
- <div class="boxLine"><a href="http://echarp.org/blog">
56
- echarp's blog</a></div>
57
- <div class="boxLine"><a href="http://www-inf.int-evry.fr/~olberger/weblog/">
58
- Olivier's</a></div>
59
- <div class="boxLine"><a href="http://www.couchet.org/blog/">
60
- mad&#8217;s</a></div>
61
- <div class="boxLine"><a href="http://www.grassouille.org/blog/">
62
- benj&#8217;s</a></div>
63
-
64
- <h4><%= _('Democracy') %></h4>
65
- <div class="boxLine"><a href="http://worldblu.com">
66
- World BLU</a></div>
67
- <div class="boxLine"><a href="http://www.tdge.org">
68
- world Parliament Experiment</a></div>
69
- <div class="boxLine"><a href="http://groups.google.com/group/worldcit">
70
- The Community of World Citizens</a></div>
71
- <div class="boxLine"><a href="http://world-wide.democracy.net">
72
- Worldwide Direct Democracy Movement</a></div>
73
- </div>
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&#8217; 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&#8217;s</a></div>
67
+ <div class="boxLine"><a href="http://www.grassouille.org/blog/">
68
+ benj&#8217;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
- <h3 class="boxTitle"><%= _('Search') %></h3>
80
+ <h3 class="boxTitle"><%= _('Search') %></h3>
77
81
  <form action="http://google.com/search">
78
- <div>
79
- <input type="hidden" name="q"
80
- value="site:<%= ActionMailer::Base.smtp_settings[:domain] %>" />
81
- <input type="text" name="q" />
82
- <%= submit_tag 'OK' %>
83
- </div>
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', :layout => 'top',
148
- :locals => { :elt => @elt, :eltTop => true } %>
153
+ <%= render :partial => 'elt', :locals => { :elt => @elt, :eltTop => true } %>
149
154
  </ul>
150
-
@@ -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, :action => 'show', :id => @elt)
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
- if url_for(:only_path => false).match(/http:\/\/echarp.dyndns.org/) and @elt.id == 'blog'
24
- xml.link(url_for(:only_path => false, :controller => 'perso',
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
 
@@ -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
- <%= javascript_include_tag "/javascripts/behaviour" %>
26
- <%= javascript_include_tag "/javascripts/mybehaviour" %>
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
- <script type="text/javascript">
30
- var displayBorder = true;
31
- </script>
32
- <!--[if lt IE 7]>
33
- <style type="text/css">
34
- body { background: white; }
35
- #sidebar { background: #ddf; }
36
- /* Crazy, without that, the "test" or "blog" elements kill ie6 */
37
- a.knobOpened { position: relative !important; }
38
- ul.top li.elt {
39
- width: auto; !important;
40
- background: none !important; }
41
- ul.top h1 a, ul.top h2 a {
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
- <script type="text/javascript">
70
- if (displayBorder) {
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 id="body" class="<%= session[:person] ? "logged" : "anon" %> sb">
77
- <script type="text/javascript">if (displayBorder) { border.render('body'); }</script>
78
- <%= @content_for_layout %>
61
+ <body class="<%= session[:person_id] ? "logged" : "anon" %>">
62
+ <div id="rounded">
63
+ <%= @content_for_layout %>
79
64
 
80
- <p class="version">
81
- <a href="<%= url_for :controller => 'elt', :action => 'show', :id => '' %>">
82
- v<%= PARLEMENT_VERSION %></a>
83
- <a href="http://www.pagerank.net/" title="Search Engine Optimization">
84
- <img src="http://www.pagerank.net/pagerank.gif" alt="Search Engine Optimization"/>
85
- </a>
86
- <a href="http://validator.w3.org/check?uri=referer">
87
- <img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Strict"/>
88
- </a>
89
- </p>
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">&lt;<%= elt.created_on.strftime('%d/%m %H:%M') %>&gt;</span>
51
- <%= link_to elt.subject.gsub(/\[.*\]/, ''), :id => elt, :controller => 'elt', :action => 'show' %>
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
  <% "&#160;"*22 %>
@@ -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', :action => 'show', :id => elt) %>
17
+ <%= link_to(elt.subject.gsub(/\[.*\]/, ''), :controller => 'elt', :id => elt) %>
18
18
  </div>
19
19
  <% end %>
20
20
  </div>
@@ -1,45 +1,110 @@
1
- # Don't change this file. Configuration is done in config/environment.rb and config/environments/*.rb
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
- unless RUBY_PLATFORM =~ /(:?mswin|mingw)/
7
- require 'pathname'
8
- root_path = Pathname.new(root_path).cleanpath(true).to_s
9
- end
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
- RAILS_ROOT = root_path
12
- end
15
+ def booted?
16
+ defined? Rails::Initializer
17
+ end
13
18
 
14
- unless defined?(Rails::Initializer)
15
- if File.directory?("#{RAILS_ROOT}/vendor/rails")
16
- require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
17
- else
18
- require 'rubygems'
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
- environment_without_comments = IO.readlines(File.dirname(__FILE__) + '/environment.rb').reject { |l| l =~ /^#/ }.join
21
- environment_without_comments =~ /[^#]RAILS_GEM_VERSION = '([\d.]+)'/
22
- rails_gem_version = $1
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
- if version = defined?(RAILS_GEM_VERSION) ? RAILS_GEM_VERSION : rails_gem_version
25
- # Asking for 1.1.6 will give you 1.1.6.5206, if available -- makes it easier to use beta gems
26
- rails_gem = Gem.cache.search('rails', "~>#{version}.0").sort_by { |g| g.version.version }.last
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
- if rails_gem
29
- gem "rails", "=#{rails_gem.version.version}"
30
- require rails_gem.full_gem_path + '/lib/initializer'
58
+ def load_rails_gem
59
+ if version = self.class.gem_version
60
+ gem 'rails', version
31
61
  else
32
- STDERR.puts %(Cannot find gem for Rails ~>#{version}.0:
33
- Install the missing gem with 'gem install -v=#{version} rails', or
34
- change environment.rb to define RAILS_GEM_VERSION with your desired version.
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
- else
39
- gem "rails"
40
- require 'initializer'
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!