parlement 0.8 → 0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. data/CHANGES +22 -0
  2. data/Rakefile +2 -2
  3. data/app/controllers/account_controller.rb +20 -7
  4. data/app/controllers/application.rb +17 -4
  5. data/app/controllers/elt_controller.rb +1 -10
  6. data/app/controllers/person_controller.rb +1 -1
  7. data/app/helpers/elt_helper.rb +14 -0
  8. data/app/models/elt.rb +2 -0
  9. data/app/models/mail.rb +6 -5
  10. data/app/models/person.rb +5 -0
  11. data/app/views/account/_login.rhtml +52 -48
  12. data/app/views/account/_show.rhtml +13 -12
  13. data/app/views/elt/_choice.rhtml +11 -2
  14. data/app/views/elt/_elt.rhtml +38 -50
  15. data/app/views/elt/new.rhtml +8 -8
  16. data/app/views/elt/show.rhtml +21 -12
  17. data/app/views/layouts/top.rhtml +1 -0
  18. data/app/views/person/_listElts.rhtml +47 -26
  19. data/app/views/person/show.rhtml +8 -18
  20. data/config/environment.rb +6 -3
  21. data/db/ROOT/fr.txt +34 -31
  22. data/db/ROOT/parlement/test.txt +6 -4
  23. data/db/development_structure.sql +18 -20
  24. data/public/engine_files/login_engine/stylesheets/login_engine.css +81 -0
  25. data/public/images/ParlementLogo_fr.png +0 -0
  26. data/public/images/comments.gif +0 -0
  27. data/public/images/vote_minus.png +0 -0
  28. data/public/images/vote_plus.png +0 -0
  29. data/public/images/vote_plus_minus.svg +79 -0
  30. data/public/images/write.png +0 -0
  31. data/public/images/write.svg +70 -0
  32. data/public/javascripts/mybehaviour.js +3 -4
  33. data/public/stylesheets/default.css +449 -0
  34. data/public/stylesheets/live_tree.css +62 -0
  35. data/public/stylesheets/scaffold.css +74 -0
  36. data/script/about +3 -0
  37. data/script/benchmarker +19 -0
  38. data/script/breakpointer +3 -0
  39. data/script/console +3 -0
  40. data/script/create_db +7 -0
  41. data/script/destroy +3 -0
  42. data/script/generate +3 -0
  43. data/script/plugin +3 -0
  44. data/script/profiler +34 -0
  45. data/script/runner +3 -0
  46. data/script/server +3 -0
  47. data/test/unit/elt_test.rb +11 -0
  48. data/test/unit/mail_test.rb +29 -0
  49. metadata +27 -40
  50. data/test/fixtures/attachments.yml +0 -13
  51. data/test/fixtures/choices.yml +0 -13
  52. data/test/fixtures/elts.yml +0 -36
  53. data/test/fixtures/img.png +0 -0
  54. data/test/fixtures/mail/avatar +0 -249
  55. data/test/fixtures/mail/mail_ruby +0 -39
  56. data/test/fixtures/mail/mail_rubyChild +0 -30
  57. data/test/fixtures/mail/mail_rubyChild2 +0 -30
  58. data/test/fixtures/mail/mail_rubyWithAttachment +0 -7932
  59. data/test/fixtures/mail/mail_rubyWithSubject +0 -27
  60. data/test/fixtures/mails.yml +0 -13
  61. data/test/fixtures/people.yml +0 -68
  62. data/test/fixtures/subscribers.yml +0 -14
  63. data/test/fixtures/users.yml +0 -41
  64. data/test/functional/account_controller_test.rb +0 -317
  65. data/test/functional/elt_controller_test.rb +0 -87
  66. data/test/functional/person_controller_test.rb +0 -18
  67. data/test/functional/subscriber_controller_test.rb +0 -128
  68. data/test/mocks/test/time.rb +0 -17
  69. data/test/mocks/test/user_notify.rb +0 -16
  70. data/test/test_helper.rb +0 -72
@@ -8,23 +8,6 @@
8
8
  :before => visual_effect(:DropOut, 'eltChoice_'+elt.id.to_s, { :queue => 'end' }),
9
9
  :loaded => visual_effect(:Grow, 'eltChoice_'+elt.id.to_s, { :queue => 'end' })) %>
10
10
 
11
- <% if !elt.new_record? %>
12
- <span class="eltQuickAdd" id="eltQuickAdd_<%= elt.id %>" title="<%= elt.created_on %>">
13
- <%= link_to_remote('<span class="icon">&gt;&gt;</span>',
14
- { :update => 'eltNew_'+elt.id.to_s,
15
- :url => { :controller => 'elt', :action => 'new', :id => elt },
16
- :loading => visual_effect(:SwitchOff, 'eltQuickAdd_'+elt.id.to_s),
17
- :loaded => visual_effect(:BlindDown, 'eltNew_'+elt.id.to_s)+
18
- visual_effect(:BlindDown, 'eltSubsClose_'+elt.id.to_s)+
19
- "Element.scrollTo('eltNew_#{elt.id.to_s}')"},
20
- { :href => url_for(:controller => 'elt', :action => 'new', :id => @elt)}) %>
21
- </span>
22
-
23
- <span class="choice" id="eltChoice_<%= elt.id %>">
24
- <%= render :partial => '/elt/choice', :locals => { :elt => elt } %>
25
- </span>
26
- <% end %>
27
-
28
11
  <% cache :action => 'show', :id => elt.id do %>
29
12
  <% if displayTitle? elt and elt.created_on %>
30
13
  <span class="created_on"><%= elt.created_on.strftime('%d/%m/%y %H:%M') %></span>
@@ -67,14 +50,14 @@
67
50
  <% end %>
68
51
  <% @controller.expire_fragment( :action => 'show', :id => elt.id) if elt.new_record? %>
69
52
 
70
- <!-- For IE -->&#160;
71
-
72
- <!-- The choice end form, here to make sure it looks nice in text browsers -->
73
- <%= end_form_tag %>
53
+ <% unless elt.new_record? %>
54
+ <span class="choice" id="eltChoice_<%= elt.id %>">
55
+ <%= render :partial => '/elt/choice', :locals => { :elt => elt } %>
56
+ </span>
57
+ <% end %>
74
58
 
75
- <div class="eltSubs">
76
- <span <%= 'style="display: none"' if (eltTop or elt.elts_count < 2) %>
77
- class="eltMore" id="eltMore_<%= elt.id %>">
59
+ <span class="eltMore" id="eltMore_<%= elt.id %>"
60
+ <%= 'style="display: none"' if (eltTop or elt.elts_count < 2) %>>
78
61
  <%= link_to_remote(elt.elts_count.to_s+' more',
79
62
  { :update => 'eltSubs_'+elt.id.to_s,
80
63
  :url => { :controller => 'elt', :action => 'list', :id => elt },
@@ -82,6 +65,7 @@
82
65
  visual_effect(:BlindDown, "eltSubs_#{elt.id.to_s}")+
83
66
  visual_effect(:BlindDown, "eltSubsClose_#{elt.id.to_s}") },
84
67
  { :href => url_for(:controller => 'elt', :action => 'show', :id => elt) }) %>
68
+ <!--
85
69
  -
86
70
  <%= link_to_remote('Write <span class="icon">&gt;&gt;</span>',
87
71
  { :update => "eltNew_#{elt.id.to_s}",
@@ -89,34 +73,38 @@
89
73
  :loaded => visual_effect(:BlindDown, "eltNew_#{elt.id.to_s}")+
90
74
  visual_effect(:BlindDown, "eltSubsClose_#{elt.id.to_s}")},
91
75
  { :href => url_for(:controller => 'elt', :action => 'new', :id => elt)}) %>
76
+ -->
92
77
  </span>
78
+ <!-- The choice end form, here to make sure it looks nice in text browsers -->
79
+ <%= end_form_tag %>
93
80
 
94
- <!-- Display automatically one element threads -->
95
- <ul <%= 'style="display: none"' unless (eltTop or elt.elts_count == 1) %>
96
- id="eltSubs_<%= elt.id %>" class="eltSub">
97
- <% if eltTop or elt.elts_count == 1 %>
98
- <%= render :partial => '/elt/list', :locals => { :elt => elt } %>
99
- <% end %>
100
- </ul>
101
-
102
- <ul class="eltNew" id="eltNew_<%= elt.id %>"></ul>
81
+ <ul class="eltNew" id="eltNew_<%= elt.id %>"></ul>
103
82
 
104
- <span <%= 'style="display: none"' unless ((eltTop and elt.elts_count > 0) or elt.elts_count == 1) %>
105
- id="eltSubsClose_<%= elt.id %>" title="<%= elt.created_on %>"
106
- class="eltSubsClose">
107
- <%= link_to_function('<span class="icon">&lt;&lt;</span> Close',
108
- visual_effect(:BlindUp, "eltNew_#{elt.id}")+
109
- visual_effect(:BlindUp, "eltSubsClose_#{elt.id}")+
110
- visual_effect(:BlindUp, "eltSubs_#{elt.id}")+
111
- visual_effect(:BlindDown, "eltMore_#{elt.id}")) %>
112
- -
113
- <%= link_to_remote('Write <span class="icon">&gt;&gt;</span>',
114
- { :update => "eltNew_#{elt.id.to_s}",
115
- :url => { :controller => 'elt', :action => 'new', :id => elt },
116
- :loading => visual_effect(:BlindDown, "eltNew_#{elt.id.to_s}")+
117
- visual_effect(:BlindDown, "eltSubsClose_#{elt.id.to_s}")},
118
- { :href => url_for(:controller => 'elt', :action => 'new', :id => elt)}) %>
119
- </span>
120
- </div>
83
+ <!-- Display automatically one element threads -->
84
+ <ul <%= 'style="display: none"' unless (eltTop or elt.elts_count == 1) %>
85
+ id="eltSubs_<%= elt.id %>" class="eltSub">
86
+ <% if eltTop or elt.elts_count == 1 %>
87
+ <%= render :partial => '/elt/list', :locals => { :elt => elt } %>
88
+ <% end %>
89
+ </ul>
90
+
91
+ <span <%= 'style="display: none"' unless ((eltTop and elt.elts_count > 0) or elt.elts_count == 1) %>
92
+ id="eltSubsClose_<%= elt.id %>" title="<%= elt.created_on %>"
93
+ class="eltSubsClose">
94
+ <%= link_to_function('<span class="icon">&lt;&lt;</span> Close',
95
+ visual_effect(:BlindUp, "eltNew_#{elt.id}")+
96
+ visual_effect(:BlindUp, "eltSubsClose_#{elt.id}")+
97
+ visual_effect(:BlindUp, "eltSubs_#{elt.id}")+
98
+ visual_effect(:BlindDown, "eltMore_#{elt.id}")) %>
99
+ <!--
100
+ -
101
+ <%= link_to_remote('Write <span class="icon">&gt;&gt;</span>',
102
+ { :update => "eltNew_#{elt.id.to_s}",
103
+ :url => { :controller => 'elt', :action => 'new', :id => elt },
104
+ :loading => visual_effect(:BlindDown, "eltNew_#{elt.id.to_s}")+
105
+ visual_effect(:BlindDown, "eltSubsClose_#{elt.id.to_s}")},
106
+ { :href => url_for(:controller => 'elt', :action => 'new', :id => elt)}) %>
107
+ -->
108
+ </span>
121
109
  </li>
122
110
 
@@ -7,7 +7,7 @@
7
7
  <%= form_remote_tag(
8
8
  :update => 'eltSubs_'+@elt.parent_id,
9
9
  :url => { :action => 'create', :id => @elt.parent },
10
- :position => 'bottom',
10
+ :position => 'top',
11
11
  :before => visual_effect(:BlindUp, 'eltNew_'+@elt.parent_id),
12
12
  :loading => "Element.show('eltSubs_#{@elt.parent_id}');
13
13
  Element.show('eltSubsClose_#{@elt.parent_id}')") %>
@@ -29,13 +29,6 @@
29
29
  <%= text_area 'elt', 'body' %>
30
30
 
31
31
  <div class="eltNewButtons">
32
- <%= submit_to_remote('Preview', 'Preview',
33
- :update => "eltNewPreview_"+@elt.parent_id,
34
- :url => { :action => "create", :id => @elt.parent, :submit => "preview" },
35
- :loading => visual_effect(:BlindDown, 'eltNewPreview_'+@elt.parent_id)) %>
36
-
37
- <%= submit_tag 'Propose!' %>
38
-
39
32
  <%= render :partial => '/help',
40
33
  :locals => { :divId => 'body'+@elt.parent_id, :content => '
41
34
  _<em>emphasis</em>_ *<strong>strong</strong>* -<span
@@ -80,6 +73,13 @@
80
73
  </div>
81
74
  <a href="http://hobix.com/textile/quick.html">Textile Reference</a>
82
75
  ' } %>
76
+
77
+ <%= submit_to_remote('Preview', 'preview',
78
+ :update => "eltNewPreview_"+@elt.parent_id,
79
+ :url => { :action => "create", :id => @elt.parent, :submit => "preview" },
80
+ :loading => visual_effect(:BlindDown, 'eltNewPreview_'+@elt.parent_id)) %>
81
+
82
+ <%= submit_tag 'Propose!' %>
83
83
  </div>
84
84
  <%= end_form_tag %>
85
85
 
@@ -1,5 +1,12 @@
1
1
  <% voters = Choice.count :select => 'person_id', :distinct => true %>
2
2
  <div class="sidebar">
3
+ <h3 class="boxTitle">Identity</h3>
4
+ <div class="box" id="identity">
5
+ <div id="author_<%= @elt.id %>">
6
+ <%= render :partial => 'account/show', :locals => { :divId => 'author_'+@elt.id } %>
7
+ </div>
8
+ </div>
9
+
3
10
  <h3 class="boxTitle">Filter</h3>
4
11
  <div class="box">
5
12
  <div>All voters: <span class="result"><%= voters %></span></div>
@@ -7,9 +14,8 @@
7
14
  <a onclick="return decrementFilter()" href="#" accesskey="<">&lt;</a>
8
15
  <select id="filter" name="filter"
9
16
  onchange="setFilter(this.options[this.selectedIndex].value)">
10
- <option value="-<%= voters %>"></option>
11
- <option selected="selected">0</option>
12
- <% (1..voters).each { |v| %> <option><%= v %></option> <% } %>
17
+ <%= options_for_select [["", -voters]] %>
18
+ <%= options_for_select (0..(voters)), 0 %>
13
19
  </select>
14
20
  <a onclick="return incrementFilter()" href="#" accesskey=">">&gt;</a>
15
21
  <%= submit_tag 'Ok' %>
@@ -17,13 +23,6 @@
17
23
  <script>setFilterFromCookie();</script>
18
24
  </div>
19
25
 
20
- <h3 class="boxTitle">Identity</h3>
21
- <div class="box" id="identity">
22
- <div id="author_<%= @elt.id %>">
23
- <%= render :partial => 'account/show', :locals => { :divId => 'author_'+@elt.id } %>
24
- </div>
25
- </div>
26
-
27
26
  <h3 class="boxTitle">Highest posts</h3>
28
27
  <div class="box listByVote">
29
28
  <%= render :partial => '/elt/listByVote' %>
@@ -34,9 +33,9 @@
34
33
  <%= render :partial => '/elt/listByDate' %>
35
34
  </div>
36
35
 
37
- <h3 class="boxTitle">Subscribe</h3>
36
+ <h3 class="boxTitle">Subscribers</h3>
38
37
  <div class="box">
39
- <div id="subscription">
38
+ <div id="subscription" <%= "style='display: none'" unless session[:person] %> >
40
39
  <%= link_to_remote(((@session[:person] and @elt.subscribers.include?(@session[:person])) ? 'Unsubscribe!' : 'Subscribe!'),
41
40
  :update => 'subscription',
42
41
  :url => { :controller => 'subscriber', :action => 'subscribe', :id => @elt },
@@ -55,6 +54,16 @@
55
54
  <% end %>
56
55
  </div>
57
56
  </div>
57
+
58
+ <h3 class="boxTitle">Search</h3>
59
+ <div class="box">
60
+ <form action="http://google.com/search">
61
+ <input type="hidden" name="q"
62
+ value="site:<%= ActionMailer::Base.server_settings[:domain] %>"/>
63
+ <input type="text" name="q"/>
64
+ <%= submit_tag 'OK' %>
65
+ </form>
66
+ </div>
58
67
  </div>
59
68
 
60
69
  <% @flash.each do |key, value| %>
@@ -41,6 +41,7 @@
41
41
  <a href="/people">people</a>
42
42
  <a href="http://rubyforge.org/projects/parlement">forge</a>
43
43
  <a href="http://www.gnu.org/licenses/gpl.html">GPL</a>
44
+ <a id="fr" href="/fr">fr</a>
44
45
  </span>
45
46
  </div>
46
47
 
@@ -1,34 +1,55 @@
1
- <%
2
- e_pages = ActionController::Pagination::Paginator.new(
1
+ <% e_pages = ActionController::Pagination::Paginator.new(
3
2
  self, person.elts.count, PAGE_LENGTH, @params['page'])
4
- e = Elt.find_all("person_id = '#{person.id}'",
5
- 'created_on DESC', e_pages.current.to_sql)
6
- %>
3
+ e = Elt.find_all("person_id = '#{person.id}'",
4
+ 'created_on DESC', e_pages.current.to_sql) %>
7
5
 
8
- <%
9
- # TODO There seems to be a problem with firefox when trying to use a visual_effect
10
- %>
6
+ <% if e_pages.length > 1 %>
7
+ <li class="pager">
8
+ <%= link_to_remote('|&lt;',
9
+ { :update => 'personElts_'+person.id.to_s,
10
+ :url => { :action => 'list', :id => person, :page => e_pages.first },
11
+ :before => visual_effect(:BlindUp, 'personElts_'+person.id.to_s, { :queue => 'end' }),
12
+ :loaded => visual_effect(:BlindDown, 'personElts_'+person.id.to_s, { :queue => 'end' }) },
13
+ { :href => url_for(:controller => 'person', :action => 'show', :id => @person,
14
+ :page => e_pages.first)}) if e_pages.first != e_pages.current %>
11
15
 
12
- <%= link_to_remote('< Previous',
13
- :update => 'personElts_'+person.id.to_s,
14
- :url => { :action => 'list', :id => person, :page => e_pages.current.next },
15
- :complete => visual_effect(:BlindDown, 'personElts_'+person.id.to_s)) if e_pages.current.next %>
16
+ <%= link_to_remote('&lt;',
17
+ { :update => 'personElts_'+person.id.to_s,
18
+ :url => { :action => 'list', :id => person, :page => e_pages.current.previous },
19
+ :before => visual_effect(:BlindUp, 'personElts_'+person.id.to_s, { :queue => 'end' }),
20
+ :loaded => visual_effect(:BlindDown, 'personElts_'+person.id.to_s, { :queue => 'end' }) },
21
+ { :href => url_for(:controller => 'person', :action => 'show', :id => @person,
22
+ :page => e_pages.current.previous )}) if e_pages.current.previous and e_pages.current.previous != e_pages.first %>
16
23
 
17
- <span style="display:<%= e_pages.length > 1 ? '' : 'none'%>" class="pageCount">
18
- (<%= e_pages.length-e_pages.current.to_i+1 %>/<%= e_pages.length %>)
19
- </span>
24
+ <span class="pageCount">
25
+ <%= e_pages.current.to_i %> / <%= e_pages.length %>
26
+ </span>
20
27
 
21
- <%= link_to_remote('Next >',
22
- :update => 'personElts_'+person.id.to_s,
23
- :url => { :action => 'list', :id => person, :page => e_pages.current.previous },
24
- :complete => visual_effect(:BlindDown, 'personElts_'+person.id.to_s)) if e_pages.current.previous %>
28
+ <%= link_to_remote('&gt;',
29
+ { :update => 'personElts_'+person.id.to_s,
30
+ :url => { :action => 'list', :id => person, :page => e_pages.current.next },
31
+ :before => visual_effect(:BlindUp, 'personElts_'+person.id.to_s, { :queue => 'end' }),
32
+ :loaded => visual_effect(:BlindDown, 'personElts_'+person.id.to_s, { :queue => 'end' }) },
33
+ { :href => url_for(:controller => 'person', :action => 'show', :id => @person,
34
+ :page => e_pages.current.next )}) if e_pages.current.next and e_pages.current.next != e_pages.last %>
25
35
 
26
- <% for elt in e.reverse[0...PAGE_LENGTH] %>
27
- <div class="elt">
28
- <span class="result"><%= sprintf("%+d", elt.result) %></span>
29
- <%= elt.created_on.strftime('%d/%m %H:%M') %>
30
- <%= link_to(elt.subject, :controller => 'elt', :action => 'show', :id => elt) %>
31
- (<%= elt.children.size %> sub)
32
- </div>
36
+ <%= link_to_remote('&gt;|',
37
+ { :update => 'personElts_'+person.id.to_s,
38
+ :url => { :action => 'list', :id => person, :page => e_pages.last },
39
+ :before => visual_effect(:BlindUp, 'personElts_'+person.id.to_s, { :queue => 'end' }),
40
+ :loaded => visual_effect(:BlindDown, 'personElts_'+person.id.to_s, { :queue => 'end' }) },
41
+ { :href => url_for(:controller => 'person', :action => 'show', :id => @person,
42
+ :page => e_pages.last)}) if e_pages.last != e_pages.current %>
43
+ </li>
44
+ <% end %>
45
+
46
+ <% for elt in e[0...PAGE_LENGTH] %>
47
+ <li class="elt">
48
+ <span class="author">&lt;<%= elt.created_on.strftime('%d/%m %H:%M') %>&gt;</span>
49
+ <%= link_to elt.subject.gsub(/\[.*\]/, ''), :controller => 'elt', :action => 'show', :id => elt %>
50
+ (<%= elt.children.size %> sub element(s))
51
+ <span class="choice result"><%= sprintf("%+d", elt.result) %></span>
52
+ <% "&#160;"*22 %>
53
+ </li>
33
54
  <% end %>
34
55
 
@@ -1,7 +1,7 @@
1
1
  <div class="sidebar">
2
2
  <div class="boxTitle">Avatar</div>
3
3
  <div class="box" id="identity">
4
- <%= image_tag (@person.image ? url_for_file_column("person", "image") : ""), :id => "avatar", :class => "avatar" %>
4
+ <%= image_tag (@person && @person.image ? @person.image : "/javascripts/blank.gif"), :class => "avatar" %>
5
5
  </div>
6
6
 
7
7
  <% if @person.subscribed_elts.size > 0 %>
@@ -9,31 +9,21 @@
9
9
  <% end %>
10
10
 
11
11
  <div class="box">
12
- <% for elt in @person.subscribed_elts.reverse[0...PAGE_LENGTH] %>
12
+ <% for elt in @person.subscribed_elts.reverse[0...LIST_LENGTH] %>
13
13
  <div class="boxLine">
14
- <span class="result"><%= sprintf("%+d", elt.result) %></span>
15
- <%= link_to(elt.subject, :controller => 'elt', :action => 'show', :id => elt) %>
14
+ <span class="choice result"><%= sprintf("%+d", elt.result) %></span>
15
+ <%= link_to(elt.subject.gsub(/\[.*\]/, ''), :controller => 'elt', :action => 'show', :id => elt) %>
16
16
  </div>
17
17
  <% end %>
18
18
  </div>
19
19
  </div>
20
20
 
21
21
 
22
- <h1><%= @person.name %></h1>
23
-
24
- <p>Created on <%= @person.created_on %></p>
25
-
26
- <p>Posts made by <%= @person.name %></p>
22
+ <p class="created_on"><%= @person.created_on %></p>
27
23
 
28
- <%
29
- # TODO get the count from the parent element call
30
- e_pages = ActionController::Pagination::Paginator.new(
31
- self, @person.elts.count, PAGE_LENGTH, @params['page'])
32
- e = Elt.find_all("person_id = '#{@person.id}'",
33
- 'created_on DESC', e_pages.current.to_sql)
34
- %>
24
+ <h1><%= @person.name %></h1>
35
25
 
36
- <div class="eltSubs" id="personElts_<%= @person.id %>">
26
+ <ul class="eltSubs" id="personElts_<%= @person.id %>">
37
27
  <%= render :partial => '/person/listElts', :locals => { :person => @person } %>
38
- </div>
28
+ </ul>
39
29
 
@@ -64,16 +64,17 @@ require 'rails_file_column'
64
64
  require 'jcode'
65
65
  $KCODE = 'u'
66
66
 
67
- PARLEMENT_VERSION='0.8'
68
-
69
67
  # How many elements are displayed at once in a page
70
- PAGE_LENGTH = 10
68
+ PAGE_LENGTH = 20
71
69
  # How many elements are displayed at once in a sidebar list
72
70
  LIST_LENGTH = 10
73
71
 
74
72
  # What is the name of a quick anonymous poster
75
73
  ANONYMOUS_POSTER = 'anon'
76
74
 
75
+ # Number of elt's paragraphs to show initially
76
+ NB_PARAGRAPH_TO_DISPLAY = 4
77
+
77
78
  require 'environments/user_environment'
78
79
 
79
80
  CONFIG = { :default_language => 'en' }
@@ -105,3 +106,5 @@ Engines.start :login
105
106
 
106
107
  Rubaidh::GoogleAnalytics.tracker_id = 'UA-317241-1'
107
108
 
109
+ PARLEMENT_VERSION='0.9'
110
+
data/db/ROOT/fr.txt CHANGED
@@ -1,48 +1,51 @@
1
1
  fr
2
2
 
3
- !/images/ParlementLogo.png!
3
+ !/images/ParlementLogo_fr.png!
4
4
 
5
5
  Forum, liste de diffusion, blog, page personnelle, salon de discussion,
6
6
  journal.
7
7
 
8
8
  p=. *ET*
9
9
 
10
- Un outil d'écriture collaborative basé sur des principes démoractiques.
10
+ Un outil d'�criture collaborative bas� sur des principes d�mocratiques.
11
11
 
12
- !{float:left;margin-right: 2em;}/attachment/file/architecture.png!
12
+ !{float:left;margin-right: 2em;}/attachment/file/architecture_fr.png!
13
13
 
14
- Avec le _paper_ nous votons:
15
- * un jour
16
- * un lieu
17
- * un sujet
14
+ Avec le _papier_ nous votons:
15
+ * en un lieu
16
+ * sur un sujet
17
+ * sur une journ�e
18
18
 
19
19
  Avec _Internet_ nous pouvons voter:
20
- * n'importe quand
21
- * n'importe
22
- * n'importe quel sujet
20
+ * partout
21
+ * sur tout
22
+ * tout le temps
23
23
 
24
- C'est une révolution, remettant en cause des règles datant de la Grèce antique.
25
- Des règles qui certainement contribuent au sentiment d'émerveillement que l'on
26
- peut ressentir les jours d'élections, mais qui aussi restreignent nos libertés
24
+ C'est une r�volution, remettant en cause des r�gles datant de la Gr�ce antique.
25
+ Des r�gles qui certainement contribuent au sentiment d'�merveillement que l'on
26
+ peut ressentir les jours d'�lections, mais qui aussi restreignent nos libert�s
27
27
  de participation en politique.
28
28
 
29
- Maintenant nous pouvons acquérir trois nouvelles libertés: liberté de temps, de
29
+ Maintenant nous pouvons acqu�rir trois nouvelles libert�s: libert� de temps, de
30
30
  lieu et d'objet. Nous pouvons voter depuis chez nous, au milieu de la nuit ou
31
- sur les petits problèmes donc nous nous préoccupons.
32
-
33
- There are consequences. For example if you can vote anytime, why not also
34
- _change your vote_ if you so wish? If votes are permanent, why have dates and
35
- agendas, except for outside conditions?
36
-
37
- If you can vote on any issue, then why not allow _everybody to propose polls_?
38
- No technical limitation limits that ability, but for our own capacity to follow
39
- all of them. And in fact their number growing, _delegating_ your votes will
40
- become a required feature, allowing you to concentrate on the parts that
41
- interest you the most, while delegating your voice to someone you trust on
42
- other matters.
43
-
44
- If you can vote from anywhere, then you can vote in front of anybody, this
45
- means _vote selling_ is a possibility. It is not anti democratic, it's a
46
- feature. A feature that, yes, could result into an oligarchy, it all depends on
47
- the value of our votes.
31
+ sur les petits probl�mes dont nous nous pr�occupons.
32
+
33
+ Il y a des cons�quences, par exemple si l'on peut voter tout moment, pourquoi
34
+ ne pas aussi _changer votre vote_ si vous le d�sirez? Si les votes sont
35
+ permanents, pourquoi avoir dates et agendas, si ce n'est pour des conditions
36
+ externes?
37
+
38
+ Si vous pouvez voter sur tous les sujets, alors pourquoi ne pas permettre que
39
+ _tout le monde puisse proposer des �lections_? Aucune limitation technique ne
40
+ limite cette possibilit�, part nos propres capacit�s les suivre toutes. Et
41
+ dans les faits, leur nombre grossissant, _d�l�guer_ son vote va devenir une
42
+ fonctionnalit� n�cessaire, vous permettant de vous concentrer sur les parties
43
+ qui vous int�ressent le plus, alors que sur le reste vous d�l�guez votre voix �
44
+ une personne en qui vous avez confiance.
45
+
46
+ Si vous pouvez voter de n'importe o�, alors vous pouvez voter en face de
47
+ quelqu'un d'autre, ce qui veut dire que la _vente de vote_ est une possibilit�.
48
+ Ceci n'est pas anti d�mocratique, c'est une fonctionnalit�. Une fonctionnalit�
49
+ qui, oui, peut r�sulter en une oligarchie, cela d�pend de la valeur de nos
50
+ votes.
48
51