[Logilogi-svn] SF.net SVN: logilogi:[1655] trunk/app
Status: Beta
Brought to you by:
wybow
|
From: <wy...@us...> - 2009-12-23 21:22:16
|
Revision: 1655
http://logilogi.svn.sourceforge.net/logilogi/?rev=1655&view=rev
Author: wybow
Date: 2009-12-23 21:22:07 +0000 (Wed, 23 Dec 2009)
Log Message:
-----------
Hid weekly counts, and added vote-counts
Modified Paths:
--------------
trunk/app/controllers/logis_controller.rb
trunk/app/controllers/votes_controller.rb
trunk/app/views/layouts/_lirmm_title_bar.html.erb
trunk/app/views/layouts/_title_bar.html.erb
trunk/app/views/logis/_recent_votes.html.erb
trunk/app/views/main_page/_new_users_or_groups.html.erb
trunk/app/views/main_page/_recent_or_new_logis.html.erb
trunk/app/views/votes/create.js.rjs
Modified: trunk/app/controllers/logis_controller.rb
===================================================================
--- trunk/app/controllers/logis_controller.rb 2009-12-14 17:59:49 UTC (rev 1654)
+++ trunk/app/controllers/logis_controller.rb 2009-12-23 21:22:07 UTC (rev 1655)
@@ -356,7 +356,9 @@
def remarks_and_recent_votes
@remark = Remark.new
- @votes = @logi.rating_for(
+ @votes_count = @logi.rating_for(
+ current_prefs.peer_group).votes.count
+ @positive_votes = @logi.rating_for(
current_prefs.peer_group).votes.positive[0..10]
@remarks = @logi.remarks.find(:all,
:limit => 10, :order => ["created_at DESC"])
Modified: trunk/app/controllers/votes_controller.rb
===================================================================
--- trunk/app/controllers/votes_controller.rb 2009-12-14 17:59:49 UTC (rev 1654)
+++ trunk/app/controllers/votes_controller.rb 2009-12-23 21:22:07 UTC (rev 1655)
@@ -31,7 +31,8 @@
@vote.score = params[:score].to_i
@rating.vote(@vote)
end
- @votes = @rating.votes.positive[0..10]
+ @votes_count = @rating.votes.count
+ @positive_votes = @rating.votes.positive[0..10]
rescue RuntimeError => error
flash.now[:error] = error.to_s
end
Modified: trunk/app/views/layouts/_lirmm_title_bar.html.erb
===================================================================
--- trunk/app/views/layouts/_lirmm_title_bar.html.erb 2009-12-14 17:59:49 UTC (rev 1654)
+++ trunk/app/views/layouts/_lirmm_title_bar.html.erb 2009-12-23 21:22:07 UTC (rev 1655)
@@ -7,7 +7,8 @@
<%= site_link(:text => '[' + l_code.camelcase + ']', :language => l_code) %>
<% end %>
<a href="http://www.logilogi.org/pub/doc/app/">(docs, </a>
- <a href="http://sourceforge.net/projects/logilogi">development)</a>
+ <a href="http://sourceforge.net/projects/logilogi">development, </a>
+ <a href="https://lists.sourceforge.net/lists/listinfo/logilogi-list">mailing-list)</a>
</div>
</div>
<div id="header">
Modified: trunk/app/views/layouts/_title_bar.html.erb
===================================================================
--- trunk/app/views/layouts/_title_bar.html.erb 2009-12-14 17:59:49 UTC (rev 1654)
+++ trunk/app/views/layouts/_title_bar.html.erb 2009-12-23 21:22:07 UTC (rev 1655)
@@ -11,7 +11,8 @@
<% end %>
<% end %>
<a href="http://www.logilogi.org/pub/doc/app/">(docs, </a>
- <a href="http://sourceforge.net/projects/logilogi">development)</a>
+ <a href="http://sourceforge.net/projects/logilogi">development, </a>
+ <a href="https://lists.sourceforge.net/lists/listinfo/logilogi-list">mailing-list)</a>
</div>
</div>
<div id="header">
Modified: trunk/app/views/logis/_recent_votes.html.erb
===================================================================
--- trunk/app/views/logis/_recent_votes.html.erb 2009-12-14 17:59:49 UTC (rev 1654)
+++ trunk/app/views/logis/_recent_votes.html.erb 2009-12-23 21:22:07 UTC (rev 1655)
@@ -1,2 +1,9 @@
-<%= render :partial => 'application/header', :locals => {:title => _("Positive votes"), :id => "voting"} %>
-<%= render :partial => "votes/list", :locals => {:votes => @votes} %>
+<% render :layout => 'application/panel_with_header', :locals => {:title => _("Positive votes"), :id => "voting"} do %>
+ <div class="description">
+ <p><%= @votes_count.to_s + ' votes' +
+ (@positive_votes.size > 0 ? ', ' + @positive_votes.size.to_s +
+ ' are positive' : '') %></p>
+ </div>
+<% end %>
+
+<%= render :partial => "votes/list", :locals => {:votes => @positive_votes} %>
Modified: trunk/app/views/main_page/_new_users_or_groups.html.erb
===================================================================
--- trunk/app/views/main_page/_new_users_or_groups.html.erb 2009-12-14 17:59:49 UTC (rev 1654)
+++ trunk/app/views/main_page/_new_users_or_groups.html.erb 2009-12-23 21:22:07 UTC (rev 1655)
@@ -7,14 +7,14 @@
:description => _("Groups that just have been created")}],
:selected => selected, :id => "newering", :update_selected => true} do %>
<% if selected == "new_users"%>
- <p><%= _('%{nr} users joined last week') % {:nr => @new_users_count} %>.
- <%= link_to _('View all'), users_url() %></p>
+ <p> <!-- <%= _('%{nr} users joined last week') % {:nr => @new_users_count} %>. -->
+ <%= link_to _('View all users'), users_url() %></p>
</div><!-- closes content padding -->
<%= render :partial => 'users/list', :locals => {:users => @new_users} %>
<div><!-- opens a div again -->
<% else %>
- <p><%= _('%{nr} groups created last month') % {:nr => @new_groups_count} %>.
- <%= link_to _('View all'), peer_groups_url() %></p>
+ <p> <!-- <%= _('%{nr} groups created last month') % {:nr => @new_groups_count} %>. -->
+ <%= link_to _('View all groups'), peer_groups_url() %></p>
</p>
<% end %>
<% end %>
Modified: trunk/app/views/main_page/_recent_or_new_logis.html.erb
===================================================================
--- trunk/app/views/main_page/_recent_or_new_logis.html.erb 2009-12-14 17:59:49 UTC (rev 1654)
+++ trunk/app/views/main_page/_recent_or_new_logis.html.erb 2009-12-23 21:22:07 UTC (rev 1655)
@@ -10,13 +10,13 @@
:selected => selected, :id => "recenting", :update_selected => true} do %>
<% if selected == "new_logis" %>
<p>
- <%= _('%{nr} new logis created in the last week') % {:nr => @new_logis_count} %>.
- <%= link_to _('View all'), changes_url(:selected => :new_logis) %>
+ <!-- <%= _('%{nr} new logis created in the last week') % {:nr => @new_logis_count} %>. -->
+ <%= link_to _('View all newly created logis'), changes_url(:selected => :new_logis) %>
</p>
<% else %>
<p>
- <%= _('%{nr} edits in the last week') % {:nr => @recently_changed_logis_count} %>.
- <%= link_to _('View all'), changes_url() %>
+ <!-- <%= _('%{nr} edits in the last week') % {:nr => @recently_changed_logis_count} %>. -->
+ <%= link_to _('View all recent edits'), changes_url() %>
</p>
<% end %>
<% end %>
Modified: trunk/app/views/votes/create.js.rjs
===================================================================
--- trunk/app/views/votes/create.js.rjs 2009-12-14 17:59:49 UTC (rev 1654)
+++ trunk/app/views/votes/create.js.rjs 2009-12-23 21:22:07 UTC (rev 1655)
@@ -1,7 +1,6 @@
page.replace_html 'ratings', :partial => 'votes/show',
:locals => {:vote => @vote, :rating => @rating}
-page.replace_html 'votes', :partial => "logis/recent_votes",
- :locals => {:votes => @votes}
+page.replace_html 'votes', :partial => "logis/recent_votes"
page.replace_html_if_exists 'rating_current',
:partial => "logis/rating_current",
:locals => {:rating => @rating}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|