Commit 7732936cd72f94269ea2410d9c80efa705017231

Authored by Rodrigo Souto
2 parents 624abf34 103b7ebe

Merge remote-tracking branch 'origin/master' into stoa-webservice

@@ -4,8 +4,9 @@ Copyright (c) 2007-2009, @@ -4,8 +4,9 @@ Copyright (c) 2007-2009,
4 Cáritas Brasileira <http://www.caritasbrasileira.org/> 4 Cáritas Brasileira <http://www.caritasbrasileira.org/>
5 Copyright (c) 2007-2009, 5 Copyright (c) 2007-2009,
6 Ynternet.org Foundation <http://www.ynternet.org/> 6 Ynternet.org Foundation <http://www.ynternet.org/>
7 -Copyright (c) 2008-2009, 7 +Copyright (c) 2008-2013,
8 Colivre <http://www.colivre.coop.br/> 8 Colivre <http://www.colivre.coop.br/>
  9 +Copyright (c) the Noosfero contributors. See AUTHORS
9 10
10 This program is free software: you can redistribute it and/or modify 11 This program is free software: you can redistribute it and/or modify
11 it under the terms of the GNU Affero General Public License as published by 12 it under the terms of the GNU Affero General Public License as published by
@@ -52,3 +52,12 @@ If you write such script for your own OS, *please* share it with us at the @@ -52,3 +52,12 @@ If you write such script for your own OS, *please* share it with us at the
52 development mailing list so that we can include it in the official repository. 52 development mailing list so that we can include it in the official repository.
53 This way other people using the same OS will have to put less effort to develop 53 This way other people using the same OS will have to put less effort to develop
54 Noosfero. 54 Noosfero.
  55 +
  56 +== Submitting your changes back
  57 +
  58 +For now please read:
  59 +
  60 +- Coding conventions
  61 + http://noosfero.org/Development/CodingConventions
  62 +- Patch guidelines
  63 + http://noosfero.org/Development/PatchGuidelines
HACKING.rails235
@@ -1,13 +0,0 @@ @@ -1,13 +0,0 @@
1 -This is a draft of how to create a environment to Rails 2.3.5 to Noosfero  
2 -development.  
3 -  
4 -Install dependencies:  
5 -  
6 -gem install rails -v 2.3.5  
7 -gem install i18n  
8 -gem install will_paginate -v 2.3.12  
9 -gem install cucumber  
10 -  
11 -Creating initial environment:  
12 -  
13 -rake db:schema:load  
1 -noosfero - a web-based social platform 1 +Noosfero - a web-based social platform
2 ====================================== 2 ======================================
3 3
4 -:: About the project 4 +http://www.noosfero.org/
5 5
6 -Homepage: http://www.noosfero.org/ 6 +Documentation
  7 +-------------
7 8
8 -:: Authors and copyright 9 +The following documentation is available:
9 10
10 -Authors: see file AUTHORS  
11 -Copyright information: see file COPYRIGHT  
12 -Full license text; see file COPYING 11 +File Purpose
  12 +~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  13 +INSTALL install instructions
  14 +INSTALL.awstats install instructions - access statistics service
  15 +INSTALL.chat install instructions - chat service
  16 +INSTALL.email install instructions - email service
  17 +INSTALL.multitenancy install instructions - multiple sites
  18 +INSTALL.varnish install instructions - varnish HTTP caching (recommended)
  19 +HACKING development instruction
  20 +RELEASING instructions for doing releases
  21 +doc/noosfero/* user documentation (available through the app itself)
  22 +
  23 +
  24 +Authors and copyright
  25 +---------------------
  26 +
  27 +Authorship and copyright information is available in the files listed below.
  28 +
  29 +File Purpose
  30 +~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  31 +AUTHORS list of authors (updated at each release)
  32 +COPYRIGHT Copyright statement for the project
  33 +COPYING Full text of the project license
app/helpers/application_helper.rb
@@ -1118,9 +1118,17 @@ module ApplicationHelper @@ -1118,9 +1118,17 @@ module ApplicationHelper
1118 1118
1119 def manage_link(list, kind) 1119 def manage_link(list, kind)
1120 if list.present? 1120 if list.present?
  1121 + link_to_all = nil
  1122 + if list.count > 5
  1123 + list = list.first(5)
  1124 + link_to_all = link_to(content_tag('strong', _('See all')), :controller => 'memberships', :profile => current_user.login)
  1125 + end
1121 link = list.map do |element| 1126 link = list.map do |element|
1122 link_to(content_tag('strong', [_('<span>Manage</span> %s') % element.short_name(25)]), @environment.top_url + "/myprofile/#{element.identifier}", :class => "icon-menu-"+element.class.identification.underscore, :title => [_('Manage %s') % element.short_name]) 1127 link_to(content_tag('strong', [_('<span>Manage</span> %s') % element.short_name(25)]), @environment.top_url + "/myprofile/#{element.identifier}", :class => "icon-menu-"+element.class.identification.underscore, :title => [_('Manage %s') % element.short_name])
1123 end 1128 end
  1129 + if link_to_all
  1130 + link << link_to_all
  1131 + end
1124 render :partial => "shared/manage_link", :locals => {:link => link, :kind => kind.to_s} 1132 render :partial => "shared/manage_link", :locals => {:link => link, :kind => kind.to_s}
1125 end 1133 end
1126 end 1134 end
@@ -1132,7 +1140,7 @@ module ApplicationHelper @@ -1132,7 +1140,7 @@ module ApplicationHelper
1132 1140
1133 def manage_communities 1141 def manage_communities
1134 return if not user 1142 return if not user
1135 - administered_communities = user.communities.select {|c| c.admins.include? user} 1143 + administered_communities = user.communities.more_popular.select {|c| c.admins.include? user}
1136 manage_link(administered_communities, :communities) 1144 manage_link(administered_communities, :communities)
1137 end 1145 end
1138 1146
script/development
1 #!/bin/sh 1 #!/bin/sh
2 2
  3 +set -e
  4 +
3 export RAILS_ENV=development 5 export RAILS_ENV=development
4 6
5 stop() { 7 stop() {
@@ -9,6 +11,7 @@ stop() { @@ -9,6 +11,7 @@ stop() {
9 } 11 }
10 12
11 start() { 13 start() {
  14 + rake db:abort_if_pending_migrations
12 ./script/feed-updater start 15 ./script/feed-updater start
13 ./script/delayed_job start 16 ./script/delayed_job start
14 trap stop INT TERM 17 trap stop INT TERM