Compare View
Commits (65)
-
colab >> 1.13.13 colab-deps >> 1.13.7
-
Update how to compile translations during build phase
-
noosfero 1.4.0+spb3 >> 1.5.0+spb1 noosfero-deps 1.4 >> 1.5
-
Packaging noosfero rails4 See merge request !256
-
Signed-off-by: Tallys Martins <tallysmartins@gmail.com>
-
Signed-off-by: Gabriel Silva <gabriel93.silva@gmail.com>
-
Fixes for download block * Fixes url without /social; * Changes download count to SoftwareInfo so it won't be reseted by the download block; * Adaptations on the statistic block to get the count from the software. * Fixes download block title not being shown; * Render not_found page when download link is broken, and do not count when it happens; See merge request !253
-
This reverts commit df7534e3b26c065e271f02ec868ddc06c4fc9a06.
-
Fix institution buttons Reverts commit that limits the creation of institution for common users. See merge request !254
-
Signed-off-by: Macartur Sousa <macartur.sc@gmail.com>
-
Signed-off-by: Macartur Sousa <macartur.sc@gmail.com>
-
- when the community owner edit the software, the checkbox to public software is unmarked incorrectly.
-
Signed-off-by: Macartur Sousa <macartur.sc@gmail.com>
-
colab-deps 1.13.6 colab 1.13.12
-
Fix cyclic destruction when destroying a community, there is a cyclic dependency with SoftwareInfo, that causes each one to try to destroy the other. This MR removes one of the sides of the dependency. See merge request !255
-
Signed-off-by: Gustavo Jaruga Cruz <darksshades@gmail.com> Signed-off-by: Macartur Sousa <macartur.sc@gmail.com>
-
noosfero >> 1.5.0+spb9 colab-deps >> 1.13.9
-
Signed-off-by: Macartur Sousa <macartur.sc@gmail.com>
-
Make config/application.rb as a config file available in /etc/noosfero
-
Set the correct timezone
-
Signed-off-by: Macartur Sousa <macartur.sc@gmail.com>
-
Signed-off-by: Macartur Sousa <macartur.sc@gmail.com>
-
Signed-off-by: Álvaro Fernando <alvarofernandoms@gmail.com> Signed-off-by: Gabriel Silva <gabriel93.silva@gmail.com> Signed-off-by: Marcos Ronaldo <marcos.rpj2@gmail.com>
Showing
60 changed files
Show diff stats
VERSION
config/prod/config.yaml
| 1 | -rpm_repository: https://copr-be.cloud.fedoraproject.org/results/softwarepublico/v4/epel-7-$basearch/ | |
| 2 | -rpm_gpgkey: https://copr-be.cloud.fedoraproject.org/results/softwarepublico/v4/pubkey.gpg | |
| 1 | +rpm_repository: https://copr-be.cloud.fedoraproject.org/results/softwarepublico/v5/epel-7-$basearch/ | |
| 2 | +rpm_gpgkey: https://copr-be.cloud.fedoraproject.org/results/softwarepublico/v5/pubkey.gpg | |
| 3 | 3 | admins: |
| 4 | 4 | - ["Nayanne Araújo", "nayanne.bonifacio@planejamento.gov.br"] |
| 5 | 5 | - ["Marisa Souza dos Santos", "marisa.santos@planejamento.gov.br"] | ... | ... |
cookbooks/colab/recipes/default.rb
cookbooks/colab/templates/gitlab.py.erb
| ... | ... | @@ -13,7 +13,8 @@ verify_ssl = False |
| 13 | 13 | |
| 14 | 14 | middlewares = [ |
| 15 | 15 | 'colab.middlewares.cookie_middleware.CookiePreHandlerMiddleware', |
| 16 | - 'colab.middlewares.cookie_middleware.CookiePostHandlerMiddleware' | |
| 16 | + 'colab.middlewares.cookie_middleware.CookiePostHandlerMiddleware', | |
| 17 | + 'colab_gitlab.middlewares.cookie_middleware.CookiePostHandlerMiddleware' | |
| 17 | 18 | ] |
| 18 | 19 | |
| 19 | 20 | urls = { | ... | ... |
| ... | ... | @@ -0,0 +1,110 @@ |
| 1 | +require File.expand_path('../boot', __FILE__) | |
| 2 | + | |
| 3 | +require 'rails/all' | |
| 4 | +require 'active_support/dependencies' | |
| 5 | + | |
| 6 | +# FIXME this silences the warnings about Rails 2.3-style plugins under | |
| 7 | +# vendor/plugins, which are deprecated. Hiding those warnings makes it easier | |
| 8 | +# to work for now, but we should really look at putting those plugins away. | |
| 9 | +ActiveSupport::Deprecation.silenced = true | |
| 10 | + | |
| 11 | +Bundler.require(:default, :assets, Rails.env) | |
| 12 | + | |
| 13 | +module Noosfero | |
| 14 | + class Application < Rails::Application | |
| 15 | + | |
| 16 | + require 'noosfero/plugin' | |
| 17 | + | |
| 18 | + require 'noosfero/multi_tenancy' | |
| 19 | + config.middleware.use Noosfero::MultiTenancy::Middleware | |
| 20 | + | |
| 21 | + config.action_controller.include_all_helpers = false | |
| 22 | + | |
| 23 | + # Settings in config/environments/* take precedence over those specified here. | |
| 24 | + # Application configuration should go into files in config/initializers | |
| 25 | + # -- all .rb files in that directory are automatically loaded. | |
| 26 | + | |
| 27 | + # Custom directories with classes and modules you want to be autoloadable. | |
| 28 | + config.autoload_paths += %W( #{config.root.join('app', 'sweepers')} ) | |
| 29 | + config.autoload_paths += Dir["#{config.root}/lib"] | |
| 30 | + config.autoload_paths += Dir["#{config.root}/app/controllers/**/"] | |
| 31 | + config.autoload_paths += %W( #{config.root.join('test', 'mocks', Rails.env)} ) | |
| 32 | + | |
| 33 | + # Only load the plugins named here, in the order given (default is alphabetical). | |
| 34 | + # :all can be used as a placeholder for all plugins not explicitly named. | |
| 35 | + # config.plugins = [ :exception_notification, :ssl_requirement, :all ] | |
| 36 | + | |
| 37 | + # Activate observers that should always be running. | |
| 38 | + # Sweepers are observers | |
| 39 | + # don't load the sweepers while loading the database | |
| 40 | + ignore_rake_commands = %w[ | |
| 41 | + db:schema:load | |
| 42 | + gems:install | |
| 43 | + clobber | |
| 44 | + noosfero:translations:compile | |
| 45 | + makemo | |
| 46 | + ] | |
| 47 | + if $PROGRAM_NAME =~ /rake$/ && (ignore_rake_commands.include?(ARGV.first)) | |
| 48 | + Noosfero::Plugin.should_load = false | |
| 49 | + else | |
| 50 | + config.active_record.observers = :article_sweeper, :role_assignment_sweeper, :friendship_sweeper, :category_sweeper, :block_sweeper | |
| 51 | + end | |
| 52 | + | |
| 53 | + # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. | |
| 54 | + # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. | |
| 55 | + config.time_zone = 'Brasilia' | |
| 56 | + | |
| 57 | + # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. | |
| 58 | + # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] | |
| 59 | + config.i18n.default_locale = nil | |
| 60 | + | |
| 61 | + # Configure the default encoding used in templates for Ruby 1.9. | |
| 62 | + config.encoding = "utf-8" | |
| 63 | + | |
| 64 | + # Configure sensitive parameters which will be filtered from the log file. | |
| 65 | + config.filter_parameters += [:password] | |
| 66 | + | |
| 67 | + # Enable escaping HTML in JSON. | |
| 68 | + ActiveSupport::JSON::Encoding.escape_html_entities_in_json = true | |
| 69 | + | |
| 70 | + # Use SQL instead of Active Record's schema dumper when creating the database. | |
| 71 | + # This is necessary if your schema can't be completely dumped by the schema dumper, | |
| 72 | + # like if you have constraints or database-specific column types | |
| 73 | + # config.active_record.schema_format = :sql | |
| 74 | + | |
| 75 | + # Enforce whitelist mode for mass assignment. | |
| 76 | + # This will create an empty whitelist of attributes available for mass-assignment for all models | |
| 77 | + # in your app. As such, your models will need to explicitly whitelist or blacklist accessible | |
| 78 | + # parameters by using an attr_accessible or attr_protected declaration. | |
| 79 | + config.active_record.whitelist_attributes = true | |
| 80 | + | |
| 81 | + # Asset pipeline | |
| 82 | + config.assets.paths = | |
| 83 | + Dir.glob("app/assets/plugins/*/{,stylesheets,javascripts}") + | |
| 84 | + Dir.glob("app/assets/{,stylesheets,javascripts}") + | |
| 85 | + # no precedence over core | |
| 86 | + Dir.glob("app/assets/designs/{icons,themes,user_themes}/*") | |
| 87 | + | |
| 88 | + # disable strong_parameters before migration from protected_attributes | |
| 89 | + config.action_controller.permit_all_parameters = true | |
| 90 | + # Version of your assets, change this if you want to expire all your assets | |
| 91 | + config.assets.version = '1.0' | |
| 92 | + | |
| 93 | + config.sass.preferred_syntax = :scss | |
| 94 | + config.sass.cache = true | |
| 95 | + config.sass.line_comments = false | |
| 96 | + | |
| 97 | + config.action_dispatch.session = { | |
| 98 | + :key => '_noosfero_session', | |
| 99 | + } | |
| 100 | + config.session_store :active_record_store, key: '_noosfero_session' | |
| 101 | + | |
| 102 | + config.paths['db/migrate'].concat Dir.glob("#{Rails.root}/{baseplugins,config/plugins}/*/db/migrate") | |
| 103 | + config.i18n.load_path.concat Dir.glob("#{Rails.root}/{baseplugins,config/plugins}/*/locales/*.{rb,yml}") | |
| 104 | + | |
| 105 | + config.eager_load = true | |
| 106 | + | |
| 107 | + Noosfero::Plugin.setup(config) | |
| 108 | + | |
| 109 | + end | |
| 110 | +end | ... | ... |
cookbooks/noosfero/recipes/default.rb
| ... | ... | @@ -11,7 +11,7 @@ package 'noosfero-deps' do |
| 11 | 11 | end |
| 12 | 12 | |
| 13 | 13 | package 'noosfero' do |
| 14 | - action :upgrade | |
| 14 | + action [:install, :upgrade] | |
| 15 | 15 | notifies :restart, 'service[noosfero]' |
| 16 | 16 | end |
| 17 | 17 | |
| ... | ... | @@ -32,7 +32,7 @@ execute 'noosfero:schema' do |
| 32 | 32 | end |
| 33 | 33 | |
| 34 | 34 | package 'noosfero-spb' do |
| 35 | - action :upgrade | |
| 35 | + action [:install, :upgrade] | |
| 36 | 36 | notifies :restart, 'service[noosfero]' |
| 37 | 37 | end |
| 38 | 38 | |
| ... | ... | @@ -111,6 +111,11 @@ cookbook_file '/etc/noosfero/unicorn.rb' do |
| 111 | 111 | notifies :restart, 'service[noosfero]' |
| 112 | 112 | end |
| 113 | 113 | |
| 114 | +cookbook_file '/etc/noosfero/application.rb' do | |
| 115 | + owner 'root'; group 'root'; mode 0644 | |
| 116 | + notifies :restart, 'service[noosfero]' | |
| 117 | +end | |
| 118 | + | |
| 114 | 119 | cookbook_file '/etc/default/noosfero' do |
| 115 | 120 | owner 'root'; group 'root'; mode 0644 |
| 116 | 121 | source 'noosfero-default' | ... | ... |
cookbooks/postgresql/templates/centos/pg_hba.conf.erb
| ... | ... | @@ -12,7 +12,7 @@ host gitlab gitlab <%= node['peers']['integration'] %>/32 trust |
| 12 | 12 | host noosfero noosfero <%= node['peers']['social'] %>/32 trust |
| 13 | 13 | host noosfero colab <%= node['peers']['integration'] %>/32 trust |
| 14 | 14 | |
| 15 | -host kalibro_processor kalibro_processor <%= node['peers']['mezuro'] %>/32 trust | |
| 16 | -host kalibro_configurations kalibro_configurations <%= node['peers']['mezuro'] %>/32 trust | |
| 17 | -host prezento prezento <%= node['peers']['integration'] %>/32 trust | |
| 15 | +#host kalibro_processor kalibro_processor <%= node['peers']['mezuro'] %>/32 trust | |
| 16 | +#host kalibro_configurations kalibro_configurations <%= node['peers']['mezuro'] %>/32 trust | |
| 17 | +#host prezento prezento <%= node['peers']['integration'] %>/32 trust | |
| 18 | 18 | ... | ... |
| ... | ... | @@ -0,0 +1,37 @@ |
| 1 | +Busca Global | |
| 2 | +========== | |
| 3 | + | |
| 4 | +Esta seção visa documentar o que é indexado pelo Portal do Software Público | |
| 5 | +Brasileiro e se torna acessível via busca global. | |
| 6 | + | |
| 7 | +Segue abaixo uma lista de entidades que podem ser buscadas por ferramenta: | |
| 8 | + | |
| 9 | +Noosfero (Social) | |
| 10 | +------- | |
| 11 | + | |
| 12 | +- Artigo | |
| 13 | +- Comunidade | |
| 14 | +- Comunidade de Software | |
| 15 | +- Comentário | |
| 16 | + | |
| 17 | + | |
| 18 | +Gitlab (Desenvolvimento) | |
| 19 | +------ | |
| 20 | + | |
| 21 | +- Projetos | |
| 22 | +- Merge Request | |
| 23 | +- Issue | |
| 24 | +- Comentário | |
| 25 | + | |
| 26 | + | |
| 27 | +Colab (Integração) | |
| 28 | +----- | |
| 29 | + | |
| 30 | +- Usuário | |
| 31 | + | |
| 32 | + | |
| 33 | +Mailman (Listas de email) | |
| 34 | +----- | |
| 35 | + | |
| 36 | +- Lista de Discussões | |
| 37 | + | ... | ... |
docs/conf.py.in
| ... | ... | @@ -44,16 +44,16 @@ master_doc = 'index' |
| 44 | 44 | |
| 45 | 45 | # General information about the project. |
| 46 | 46 | project = u'softwarepublico' |
| 47 | -copyright = u'2014-2015, Universidade de Brasília - UnB. Documentação licenciada sob a Licença Creative Commons Atribuição-CompartilhaIgual 4.0 Internacional' | |
| 47 | +copyright = u'2014-2016, Universidade de Brasília - UnB. Documentação licenciada sob a Licença Creative Commons Atribuição-CompartilhaIgual 4.0 Internacional' | |
| 48 | 48 | |
| 49 | 49 | # The version info for the project you're documenting, acts as replacement for |
| 50 | 50 | # |version| and |release|, also used in various other places throughout the |
| 51 | 51 | # built documents. |
| 52 | 52 | # |
| 53 | 53 | # The short X.Y version. |
| 54 | -version = '3' | |
| 54 | +version = '5' | |
| 55 | 55 | # The full version, including alpha/beta/rc tags. |
| 56 | -release = '3' | |
| 56 | +release = '2' | |
| 57 | 57 | |
| 58 | 58 | # The language for content autogenerated by Sphinx. Refer to documentation |
| 59 | 59 | # for a list of supported languages. | ... | ... |
docs/index.rst.in
docs/manutencao.rst.in
| ... | ... | @@ -139,17 +139,40 @@ do Nginx `cookbooks/reverse_proxy/templates/reverse_proxy.conf.erb` na variável |
| 139 | 139 | `client_max_upload_size`. O valor deve ser definido como `<valor>m`. Exemplo |
| 140 | 140 | `client_max_body_size = 500m` sendo 500m o maior limite entre as ferramentas. |
| 141 | 141 | |
| 142 | - **Nota** Ferramenta Gitlab | |
| 142 | +Atualizando Certificado Digital | |
| 143 | +--------------- | |
| 144 | + | |
| 145 | +A atualização do certificado digital do Portal é feito através das receitas Chef | |
| 146 | +(especificamente esta: `cookbooks/reverse_proxy/recipes/default.rb`), e os mesmos | |
| 147 | +se tornam disponíveis na máquina `reverseproxy`. Entretanto deve-se estar atento | |
| 148 | +para o nome dos arquivos e o formato dos mesmos. | |
| 149 | + | |
| 150 | +Ao gerar o certificado digital deverão ser gerados dois arquivos: o certificado | |
| 151 | +e a chave. O certificado deve estar no formato x509 e recomenda-se que a chave | |
| 152 | +seja gerada usando o algoritmo de criptografia RSA. Tendo isso, o nome dos arquivos | |
| 153 | +devem seguir o que é especificado na receita, que usa a variável | |
| 154 | +`node['config']['external_hostname']` do arquivo de configuração, sendo essa | |
| 155 | +variável o domínio do ambiente (por exemplo, 'softwarepublico.gov.br'). O nome | |
| 156 | +dos arquivos devem seguir o seguinte padrão: | |
| 157 | + | |
| 158 | ++ Certificado: $external_hostname.crt (nome do domínio com extensão crt) | |
| 159 | ++ Chave: $external_hostname.key (nome do domínio com extensão key) | |
| 160 | + | |
| 161 | +Com os arquivos no formato e nomenclatura corretos basta colocá-los no diretório | |
| 162 | +`cookbooks/reverse_proxy/files/host-reverseproxy/` e convergir o ambiente | |
| 163 | +normalmente. | |
| 164 | + | |
| 165 | +Nota Ferramenta Gitlab | |
| 143 | 166 | ------------ |
| 144 | 167 | |
| 145 | 168 | Atualmente o SPB está utilizando o Gitlab versão 7.6.2 mantido no repositório |
| 146 | -de pacotes RPM `Softwarepublico Copr Fedora`_ . O pacote é criado e mantido | |
| 169 | +de pacotes RPM Softwarepublico `Copr Fedora` . O pacote é criado e mantido | |
| 147 | 170 | pelo SPB, ou seja, a instancia do Gitlab contém as configurações necessárias |
| 148 | 171 | para a integração com as ferramenta e ambiente do SPB. Os pacotes de instação |
| 149 | 172 | providos pelo próprio Gitlab não tem a garantia de funcionamento com o SPB. |
| 150 | 173 | |
| 151 | 174 | Há uma atualização do pacote Gitlab v8.5.0 disponível no projeto *eperimental* no |
| 152 | -mesmo repositório ( `Softwarepublico Copr Fedora`_ ) . O serviço é instanciado | |
| 175 | +mesmo repositório ( Softwarepublico `Copr Fedora` ) . O serviço é instanciado | |
| 153 | 176 | e é possível utiliza-lo em *stand alone*. Entretanto não foi realizado a |
| 154 | 177 | integração e testes do novo pacote com o ambiente e ferramentas do SPB. |
| 155 | 178 | ... | ... |
| ... | ... | @@ -0,0 +1,34 @@ |
| 1 | +Pacotes das Ferramentas | |
| 2 | +========== | |
| 3 | + | |
| 4 | +As ferramentas utilizadas no SPB são mantidas no repositório de pacotes | |
| 5 | +`Copr Fedora`. Cada projeto contém um conjunto de pacotes RPM para instalação | |
| 6 | +das ferramentas seguindo uma versão, exemplo, o projeto v4 contém os pacotes | |
| 7 | +construidos para a versão stable-4.x (versão referente a branch utilizada para | |
| 8 | +o converge). O projeto experimental contém os pacotes em versão de teste e pode | |
| 9 | +apresentar instabilidade. | |
| 10 | + | |
| 11 | +.. _`Copr Fedora`: https://copr.fedorainfracloud.org/coprs/softwarepublico/ | |
| 12 | + | |
| 13 | +Versão | |
| 14 | +------------ | |
| 15 | + | |
| 16 | +Os pacotes são construidos com a utilização dos arquivos specs localizados em | |
| 17 | +``softwarepublico/src/pkg-rpm/<pacote>/*.spec`` (repositório oficial do Softwarepublico) | |
| 18 | +e cada pacote contem a sua versão definida pelo atributo ``Version`` | |
| 19 | +(mais informações sobre pacote RPM `aqui`). | |
| 20 | + | |
| 21 | +Para os pacotes *noosfero-spb*, *colab-spb-theme* e *colab-spb-plugin* tem a versão | |
| 22 | +definida no arquivo VERSION na pasta raíz do repositório oficial do Softwarepublico. | |
| 23 | +A lógica de criação desses pacotes são definidas no arquivo Makefile em | |
| 24 | +``softwarepublico/src/Makefile`` e podem ser atualizados utilizando o comando | |
| 25 | +``make release`` do qual automaticamente realizam o upload do arquivo. | |
| 26 | + | |
| 27 | +**Nota**: o arquivo VERSION foi criado ao final da release 4/início da release 5. | |
| 28 | +A sua primeira versão foi lançada com ``5.0a0``, ou seja, não existe a versão | |
| 29 | +``4.XaY``, portanto os pacotes referentes a v4 e branch stable-4.X contém os | |
| 30 | +pacotes com as tags ``5.0a0`` não tendo correlação direta de versão. | |
| 31 | + | |
| 32 | +.. _`aqui`: https://fedoraproject.org/wiki/How_to_create_an_RPM_package/pt | |
| 33 | + | |
| 34 | + | ... | ... |
nodes.yaml
| ... | ... | @@ -14,15 +14,6 @@ database: |
| 14 | 14 | run_list: |
| 15 | 15 | - role[server] |
| 16 | 16 | - role[database_server] |
| 17 | -mezuro: | |
| 18 | - run_list: | |
| 19 | - - role[server] | |
| 20 | - - role[mezuro_server] | |
| 21 | -monitor: | |
| 22 | - run_list: | |
| 23 | - - recipe[basics] | |
| 24 | - - recipe[firewall] | |
| 25 | - - role[monitoring_server] | |
| 26 | 17 | reverseproxy: |
| 27 | 18 | run_list: |
| 28 | 19 | - role[server] | ... | ... |
roles/integration_server.rb
roles/server.rb
| ... | ... | @@ -0,0 +1,73 @@ |
| 1 | +# Building Packages | |
| 2 | + | |
| 3 | +This path and scripts automates the build and update the packages for SPB project. | |
| 4 | +It's can be done manually, but we don't recommend. | |
| 5 | + | |
| 6 | +## Requirements | |
| 7 | + | |
| 8 | +First, this will only works (at least was tested) on a RedHat based system | |
| 9 | +(Fedora, CentOS, etc). Everything you need to know about packing for the system | |
| 10 | +is available [here](https://fedoraproject.org/wiki/How_to_create_an_RPM_package/pt) | |
| 11 | + | |
| 12 | +Dependency packages | |
| 13 | + | |
| 14 | +``` | |
| 15 | +# yum install @development-tools | |
| 16 | +# yum install fedora-packager | |
| 17 | +# yum install copr-cli | |
| 18 | +# yum install git | |
| 19 | +``` | |
| 20 | + | |
| 21 | +You need a account on [Copr Fedora](https://copr.fedorainfracloud.org) and the api token to | |
| 22 | +authenticate when upload. Just follow the instruction on the | |
| 23 | +[API](https://copr.fedorainfracloud.org/api/). | |
| 24 | + | |
| 25 | +You need your GPG key in the machine. If you don't have one follow the | |
| 26 | +instruction [here](https://fedoraproject.org/wiki/Creating_GPG_Keys/pt-br) | |
| 27 | + | |
| 28 | +## Usage | |
| 29 | + | |
| 30 | +### Make Release | |
| 31 | + | |
| 32 | +Make Release are made to build *colab-spb-plugin*, *colab-spb-theme* e | |
| 33 | +*noosfero-spb*. Bump the VERSION file on the root directory and runs | |
| 34 | +into the src/ directory: | |
| 35 | + | |
| 36 | +``` | |
| 37 | +$ make release | |
| 38 | +``` | |
| 39 | + | |
| 40 | +Follow the instructions and done :). | |
| 41 | +Don't forget to push the changes to the repository. | |
| 42 | + | |
| 43 | +### Build Packages | |
| 44 | + | |
| 45 | +To build the others packages. | |
| 46 | + | |
| 47 | +**First**: Build the **tarball** of the | |
| 48 | +core project. Pay attention to how to build this, some projects needs | |
| 49 | +requirements or pre-command before create the **tarball**. | |
| 50 | + | |
| 51 | +In most of the cases you just needs to run into the project repository: | |
| 52 | +``` | |
| 53 | + $ git archive --format=tar.gz --prefix=<pkg-name>-<pkg-version>/ <tag or branch> > <pkg-name>-<pkg-version>.tar.gz | |
| 54 | + or | |
| 55 | + $ make sdist | |
| 56 | +``` | |
| 57 | + | |
| 58 | +**Second**: Copy the **tarball** into the pkg-rpm/<project>/ | |
| 59 | + | |
| 60 | +**Third**: Runs into the src/pkg-rpm/: | |
| 61 | +``` | |
| 62 | + $ make <project>-build | |
| 63 | + and | |
| 64 | + $ make <project>-upload | |
| 65 | +``` | |
| 66 | + | |
| 67 | +The first will build the package and the second will upload to | |
| 68 | +the copr repository using copr-cli. | |
| 69 | + | |
| 70 | +**Note**: the copr repository is defined into *src/pkg-rpm/Makefile*. | |
| 71 | + | |
| 72 | +**Important**: Make sure that you have all the build dependencies installed. | |
| 73 | +Just check the .spec file to verify which are. | ... | ... |
src/colab-spb-plugin/VERSION
src/colab-spb-plugin/src/colab_spb/models.py
| ... | ... | @@ -5,11 +5,15 @@ from django.db import models |
| 5 | 5 | |
| 6 | 6 | |
| 7 | 7 | class CommunityAssociations(models.Model): |
| 8 | - community = models.ForeignKey(noosfero.NoosferoCommunity, default=1) | |
| 9 | - group = models.ForeignKey(gitlab.GitlabGroup, default=1) | |
| 10 | - mail_list = models.ForeignKey(mailman.MailingList, default=1) | |
| 8 | + community = models.ForeignKey(noosfero.NoosferoCommunity, null=True) | |
| 9 | + group = models.ForeignKey(gitlab.GitlabGroup, null=True) | |
| 10 | + mail_list = models.ForeignKey(mailman.MailingList, null=True) | |
| 11 | 11 | |
| 12 | 12 | def __unicode__(self): |
| 13 | + if self.community is None or self.group.name is None \ | |
| 14 | + or self.mail_list.name is None: | |
| 15 | + return u'Invalid CommunityAssociation' | |
| 16 | + | |
| 13 | 17 | return u'Social: {} - Dev: {} - List: {}'.format(self.community.name, |
| 14 | 18 | self.group.name, |
| 15 | 19 | self.mail_list.name) | ... | ... |
src/colab-spb-plugin/src/colab_spb/templates/discussion.html
| ... | ... | @@ -11,7 +11,7 @@ |
| 11 | 11 | </div> |
| 12 | 12 | {% endfor %} |
| 13 | 13 | <div class="text-right"> |
| 14 | - <a href="{% url 'haystack_search' %}?order=latest&list={{ listname }}&type=thread"> | |
| 14 | + <a href="{% url 'haystack_search' %}?order=latest&tag={{ listname }}&type=thread&q=tag:{{ listname }}"> | |
| 15 | 15 | {% trans "see all discussions" %} |
| 16 | 16 | </a> |
| 17 | 17 | </div> |
| ... | ... | @@ -25,7 +25,7 @@ |
| 25 | 25 | </div> |
| 26 | 26 | {% endfor %} |
| 27 | 27 | <div class="text-right"> |
| 28 | - <a href="{% url 'haystack_search' %}?list={{ listname }}&type=thread"> | |
| 28 | + <a href="{% url 'haystack_search' %}?tag={{ listname }}&type=thread&q=tag:{{ listname }}"> | |
| 29 | 29 | {% trans "see all discussions" %} |
| 30 | 30 | </a> |
| 31 | 31 | </div> | ... | ... |
src/colab-spb-theme-plugin/VERSION
src/colab-spb-theme-plugin/colab_spb_theme/static/css/screen.css
| ... | ... | @@ -787,3 +787,93 @@ body > .alert, |
| 787 | 787 | .container.messages { |
| 788 | 788 | margin-top: 30px; |
| 789 | 789 | } |
| 790 | + | |
| 791 | +/* PROFILE FORMAT */ | |
| 792 | + | |
| 793 | +#main-content > div > h2 { | |
| 794 | + color: #FF0366; | |
| 795 | + font-size: 16px; | |
| 796 | + font-family: "open_sansregular",Arial, Helvetica,sans-serif; | |
| 797 | + font-weight: 300; | |
| 798 | + text-transform: uppercase; | |
| 799 | + margin-bottom: 40px; | |
| 800 | +} | |
| 801 | + | |
| 802 | +div#main-content .col-lg-12 a { | |
| 803 | + margin-bottom: 60px; | |
| 804 | + display: block; | |
| 805 | + color: #2c66ce; | |
| 806 | + text-decoration: underline; | |
| 807 | +} | |
| 808 | + | |
| 809 | +body div#main-content { | |
| 810 | + margin-top: 0; | |
| 811 | + color: #172738; | |
| 812 | + max-width: 960px; | |
| 813 | + padding: 40px 0 60px 0; | |
| 814 | +} | |
| 815 | + | |
| 816 | +#main-content > div > h3 > img { | |
| 817 | + float: left; | |
| 818 | + margin-right: 20px; | |
| 819 | +} | |
| 820 | + | |
| 821 | +#colab_profile-content label.control-label, label { | |
| 822 | + font-size: 12px; | |
| 823 | + font-family: "open_sansregular", Arial, Helvetica, sans-serif; | |
| 824 | +} | |
| 825 | + | |
| 826 | +#profile_content { | |
| 827 | + margin-top: 40px; | |
| 828 | +} | |
| 829 | + | |
| 830 | +#colab_profile-content .panel label { | |
| 831 | + font-size: 12px; | |
| 832 | +} | |
| 833 | + | |
| 834 | +#colab_profile-content .btn.btn-primary, #colab_profile-content .links-group .btn.btn-primary { | |
| 835 | + color: #fff; | |
| 836 | + background-color: #3E67B1; | |
| 837 | + border-color: #3E67B1; | |
| 838 | + font-size: 12px; | |
| 839 | +} | |
| 840 | + | |
| 841 | +#colab_profile-content .btn.btn-lg, #colab_profile-content .links-group .btn.btn-lg { | |
| 842 | + font-size: 12px; | |
| 843 | + font-family: "open_sansregular"; | |
| 844 | + padding: 6px 12px; | |
| 845 | + border-radius: 5px; | |
| 846 | + line-height: 18px; | |
| 847 | +} | |
| 848 | + | |
| 849 | +#colab_profile-content .unstyled-list.emails img { | |
| 850 | + float: left; | |
| 851 | + margin: 0 10px; | |
| 852 | + width: 30px; | |
| 853 | + height: 30px; | |
| 854 | + display: block; | |
| 855 | +} | |
| 856 | + | |
| 857 | +#colab_profile-content .unstyled-list.emails li hr { | |
| 858 | + margin: 10px 0; | |
| 859 | + float: left; | |
| 860 | + width: 100%; | |
| 861 | +} | |
| 862 | + | |
| 863 | +#gitlab_profile-content .container { | |
| 864 | + max-width: 960px; | |
| 865 | +} | |
| 866 | + | |
| 867 | +#gitlab_profile-content .brand-image img { | |
| 868 | + max-width: 350px; | |
| 869 | + display: block; | |
| 870 | + margin: auto; | |
| 871 | +} | |
| 872 | + | |
| 873 | +#gitlab_profile-content .brand_text p.lead { | |
| 874 | + font-size: 12px; | |
| 875 | +} | |
| 876 | + | |
| 877 | +#gitlab_profile-content #user_login { | |
| 878 | + margin-bottom: 10px; | |
| 879 | +} | ... | ... |
src/colab-spb-theme-plugin/colab_spb_theme/templates/header_sisp.html
| ... | ... | @@ -65,7 +65,7 @@ |
| 65 | 65 | <div id="logo"> |
| 66 | 66 | <a id="portal-logo" title="" href="/"> |
| 67 | 67 | <h1 id="portal-title" class="corto">Catálogo do SISP</h1> |
| 68 | - <span id="portal-description">MINISTÉRIO DO PLANEJAMENTO, ORÇAMENTO E GESTÃO</span> | |
| 68 | + <span id="portal-description">MINISTÉRIO DO PLANEJAMENTO, DESENVOLVIMENTO E GESTÃO</span> | |
| 69 | 69 | </a> |
| 70 | 70 | </div> |
| 71 | 71 | <div id="social-icons"> | ... | ... |
src/colab-spb-theme-plugin/colab_spb_theme/templates/header_spb.html
| ... | ... | @@ -91,7 +91,7 @@ |
| 91 | 91 | <a id="portal-logo" title="" href="/"> |
| 92 | 92 | <span id="portal-title-1">Portal do</span> |
| 93 | 93 | <h1 id="portal-title" class="corto">Software Público Brasileiro</h1> |
| 94 | - <span id="portal-description">MINISTÉRIO DO PLANEJAMENTO, ORÇAMENTO E GESTÃO</span> | |
| 94 | + <span id="portal-description">MINISTÉRIO DO PLANEJAMENTO, DESENVOLVIMENTO E GESTÃO</span> | |
| 95 | 95 | </a> |
| 96 | 96 | </div> |
| 97 | 97 | <div id="portal-searchbox"> | ... | ... |
src/noosfero-spb/VERSION
src/noosfero-spb/gov_user/controllers/gov_user_plugin_controller.rb
| ... | ... | @@ -5,8 +5,6 @@ class GovUserPluginController < ApplicationController |
| 5 | 5 | :governmental_sphere, :governmental_power, :juridical_nature, :sisp |
| 6 | 6 | ] |
| 7 | 7 | |
| 8 | - protect "create_institution_admin", :environment, :except => [:get_institutions] | |
| 9 | - | |
| 10 | 8 | def hide_registration_incomplete_percentage |
| 11 | 9 | response = false |
| 12 | 10 | |
| ... | ... | @@ -116,7 +114,7 @@ class GovUserPluginController < ApplicationController |
| 116 | 114 | params[:community] ||= {} |
| 117 | 115 | params[:institutions] ||= {} |
| 118 | 116 | |
| 119 | - @show_sisp_field = user.is_admin? | |
| 117 | + @show_admin_fields = user.is_admin? | |
| 120 | 118 | @governmental_sphere = get_governmental_spheres() |
| 121 | 119 | @governmental_power = get_governmental_powers() |
| 122 | 120 | @juridical_nature = get_juridical_natures() | ... | ... |
src/noosfero-spb/gov_user/controllers/gov_user_plugin_myprofile_controller.rb
| ... | ... | @@ -7,7 +7,7 @@ class GovUserPluginMyprofileController < MyProfileController |
| 7 | 7 | end |
| 8 | 8 | |
| 9 | 9 | def edit_institution |
| 10 | - @show_sisp_field = user.is_admin? | |
| 10 | + @show_admin_fields = user.is_admin? | |
| 11 | 11 | @state_list = NationalRegion.find( |
| 12 | 12 | :all, |
| 13 | 13 | :conditions => { :national_region_type_id => 2 }, | ... | ... |
src/noosfero-spb/gov_user/db/migrate/20160525181858_change_siorg_column_type.rb
0 → 100644
src/noosfero-spb/gov_user/features/institution_registration.feature
| ... | ... | @@ -47,11 +47,3 @@ Feature: Institution Field |
| 47 | 47 | And I should not see "community_city" |
| 48 | 48 | And I select "Brazil" from "community_country" |
| 49 | 49 | Then I should not see "Gama" |
| 50 | - | |
| 51 | - @selenium | |
| 52 | - Scenario: Ordinary user can not create a new institution | |
| 53 | - Given the following user | |
| 54 | - | login | | |
| 55 | - | ordinary_user | | |
| 56 | - And I am logged in as "ordinary_user" | |
| 57 | - Then I should not see "Create new institution" | ... | ... |
src/noosfero-spb/gov_user/lib/institution.rb
| ... | ... | @@ -3,6 +3,8 @@ |
| 3 | 3 | class Institution < ActiveRecord::Base |
| 4 | 4 | has_many :comments |
| 5 | 5 | |
| 6 | + N_("institution") | |
| 7 | + | |
| 6 | 8 | SEARCH_FILTERS = { |
| 7 | 9 | :order => %w[more_recent more_popular more_active], |
| 8 | 10 | :display => %w[compact] |
| ... | ... | @@ -44,8 +46,18 @@ class Institution < ActiveRecord::Base |
| 44 | 46 | } |
| 45 | 47 | |
| 46 | 48 | validate :validate_country, :validate_state, :validate_city, |
| 47 | - :verify_institution_type | |
| 49 | + :verify_institution_type, :verify_siorg_code | |
| 48 | 50 | |
| 51 | + def verify_siorg_code | |
| 52 | + if (self.siorg_code =~ /^[0-9]+$/).nil? | |
| 53 | + self.errors.add( | |
| 54 | + :siorg_code, | |
| 55 | + _("invalid, only numbers are allowed.") | |
| 56 | + ) | |
| 57 | + return false | |
| 58 | + end | |
| 59 | + true | |
| 60 | + end | |
| 49 | 61 | |
| 50 | 62 | def has_accepted_rating? user_rating |
| 51 | 63 | rating_ids = OrganizationRating.where(institution_id: self.id, organization_id: user_rating.organization_id).map(&:id) | ... | ... |
src/noosfero-spb/gov_user/po/gov_user.pot
| ... | ... | @@ -8,8 +8,8 @@ msgid "" |
| 8 | 8 | msgstr "" |
| 9 | 9 | "Project-Id-Version: PACKAGE VERSION\n" |
| 10 | 10 | "Report-Msgid-Bugs-To: \n" |
| 11 | -"POT-Creation-Date: 2016-05-10 17:07-0300\n" | |
| 12 | -"PO-Revision-Date: 2016-05-10 17:07-0300\n" | |
| 11 | +"POT-Creation-Date: 2016-05-30 14:37-0300\n" | |
| 12 | +"PO-Revision-Date: 2016-05-30 14:37-0300\n" | |
| 13 | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
| 14 | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" |
| 15 | 15 | "Language: \n" |
| ... | ... | @@ -18,31 +18,31 @@ msgstr "" |
| 18 | 18 | "Content-Transfer-Encoding: 8bit\n" |
| 19 | 19 | "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" |
| 20 | 20 | |
| 21 | -#: ../controllers/gov_user_plugin_controller.rb:142 | |
| 21 | +#: ../controllers/gov_user_plugin_controller.rb:140 | |
| 22 | 22 | #: ../views/gov_user_plugin_myprofile/edit_institution.html.erb:87 |
| 23 | 23 | msgid "Select a Governmental Sphere" |
| 24 | 24 | msgstr "" |
| 25 | 25 | |
| 26 | -#: ../controllers/gov_user_plugin_controller.rb:147 | |
| 26 | +#: ../controllers/gov_user_plugin_controller.rb:145 | |
| 27 | 27 | #: ../views/gov_user_plugin_myprofile/edit_institution.html.erb:98 |
| 28 | 28 | msgid "Select a Governmental Power" |
| 29 | 29 | msgstr "" |
| 30 | 30 | |
| 31 | -#: ../controllers/gov_user_plugin_controller.rb:152 | |
| 31 | +#: ../controllers/gov_user_plugin_controller.rb:150 | |
| 32 | 32 | #: ../views/gov_user_plugin_myprofile/edit_institution.html.erb:109 |
| 33 | 33 | msgid "Select a Juridical Nature" |
| 34 | 34 | msgstr "" |
| 35 | 35 | |
| 36 | -#: ../controllers/gov_user_plugin_controller.rb:186 | |
| 36 | +#: ../controllers/gov_user_plugin_controller.rb:184 | |
| 37 | 37 | #: ../controllers/gov_user_plugin_myprofile_controller.rb:30 |
| 38 | 38 | msgid "Could not find Governmental Power or Governmental Sphere" |
| 39 | 39 | msgstr "" |
| 40 | 40 | |
| 41 | -#: ../controllers/gov_user_plugin_controller.rb:232 | |
| 41 | +#: ../controllers/gov_user_plugin_controller.rb:230 | |
| 42 | 42 | msgid "Institution successful created!" |
| 43 | 43 | msgstr "" |
| 44 | 44 | |
| 45 | -#: ../controllers/gov_user_plugin_controller.rb:237 | |
| 45 | +#: ../controllers/gov_user_plugin_controller.rb:235 | |
| 46 | 46 | msgid "Institution could not be created!" |
| 47 | 47 | msgstr "" |
| 48 | 48 | |
| ... | ... | @@ -80,15 +80,23 @@ msgstr "" |
| 80 | 80 | msgid "Institution" |
| 81 | 81 | msgstr "" |
| 82 | 82 | |
| 83 | -#: ../lib/institution.rb:66 | |
| 83 | +#: ../lib/institution.rb:6 | |
| 84 | +msgid "institution" | |
| 85 | +msgstr "" | |
| 86 | + | |
| 87 | +#: ../lib/institution.rb:55 | |
| 88 | +msgid "invalid, only numbers are allowed." | |
| 89 | +msgstr "" | |
| 90 | + | |
| 91 | +#: ../lib/institution.rb:78 | |
| 84 | 92 | msgid "invalid, only public and private institutions are allowed." |
| 85 | 93 | msgstr "" |
| 86 | 94 | |
| 87 | -#: ../lib/institution.rb:78 ../lib/institution.rb:89 ../lib/institution.rb:105 | |
| 95 | +#: ../lib/institution.rb:90 ../lib/institution.rb:101 ../lib/institution.rb:117 | |
| 88 | 96 | msgid "can't be blank" |
| 89 | 97 | msgstr "" |
| 90 | 98 | |
| 91 | -#: ../lib/institution.rb:92 | |
| 99 | +#: ../lib/institution.rb:104 | |
| 92 | 100 | msgid "invalid state" |
| 93 | 101 | msgstr "" |
| 94 | 102 | |
| ... | ... | @@ -151,105 +159,109 @@ msgstr "" |
| 151 | 159 | msgid "Private Institution" |
| 152 | 160 | msgstr "" |
| 153 | 161 | |
| 154 | -#: ../views/gov_user_plugin/_institution.html.erb:48 | |
| 162 | +#: ../views/gov_user_plugin/_institution.html.erb:46 | |
| 155 | 163 | #: ../views/gov_user_plugin_myprofile/edit_institution.html.erb:45 |
| 156 | 164 | msgid "Corporate Name" |
| 157 | 165 | msgstr "" |
| 158 | 166 | |
| 159 | -#: ../views/gov_user_plugin/_institution.html.erb:53 | |
| 167 | +#: ../views/gov_user_plugin/_institution.html.erb:51 | |
| 160 | 168 | msgid "Institution name already exists" |
| 161 | 169 | msgstr "" |
| 162 | 170 | |
| 171 | +#: ../views/gov_user_plugin/_institution.html.erb:56 | |
| 172 | +#: ../views/gov_user_plugin/_institution.html.erb:58 | |
| 173 | +#: ../views/gov_user_plugin_myprofile/edit_institution.html.erb:75 | |
| 174 | +#: ../views/gov_user_plugin_myprofile/edit_institution.html.erb:77 | |
| 175 | +msgid "Acronym" | |
| 176 | +msgstr "" | |
| 177 | + | |
| 163 | 178 | #: ../views/gov_user_plugin/_institution.html.erb:57 |
| 164 | -#: ../views/gov_user_plugin/_institution.html.erb:105 | |
| 179 | +#: ../views/gov_user_plugin/_institution.html.erb:67 | |
| 165 | 180 | #: ../views/gov_user_plugin_myprofile/edit_institution.html.erb:48 |
| 166 | 181 | #: ../views/gov_user_plugin_myprofile/edit_institution.html.erb:76 |
| 167 | 182 | msgid "Fantasy name" |
| 168 | 183 | msgstr "" |
| 169 | 184 | |
| 170 | -#: ../views/gov_user_plugin/_institution.html.erb:65 | |
| 185 | +#: ../views/gov_user_plugin/_institution.html.erb:76 | |
| 171 | 186 | #: ../views/gov_user_plugin_myprofile/edit_institution.html.erb:54 |
| 172 | 187 | msgid "Country" |
| 173 | 188 | msgstr "" |
| 174 | 189 | |
| 175 | -#: ../views/gov_user_plugin/_institution.html.erb:69 | |
| 190 | +#: ../views/gov_user_plugin/_institution.html.erb:80 | |
| 176 | 191 | #: ../views/gov_user_plugin_myprofile/edit_institution.html.erb:54 |
| 177 | 192 | msgid "Select a country" |
| 178 | 193 | msgstr "" |
| 179 | 194 | |
| 180 | -#: ../views/gov_user_plugin/_institution.html.erb:74 | |
| 195 | +#: ../views/gov_user_plugin/_institution.html.erb:85 | |
| 181 | 196 | #: ../views/gov_user_plugin_myprofile/edit_institution.html.erb:58 |
| 182 | 197 | msgid "State" |
| 183 | 198 | msgstr "" |
| 184 | 199 | |
| 185 | -#: ../views/gov_user_plugin/_institution.html.erb:78 | |
| 200 | +#: ../views/gov_user_plugin/_institution.html.erb:89 | |
| 186 | 201 | #: ../views/gov_user_plugin_myprofile/edit_institution.html.erb:58 |
| 187 | 202 | msgid "Select a state" |
| 188 | 203 | msgstr "" |
| 189 | 204 | |
| 190 | -#: ../views/gov_user_plugin/_institution.html.erb:83 | |
| 205 | +#: ../views/gov_user_plugin/_institution.html.erb:94 | |
| 191 | 206 | msgid "City" |
| 192 | 207 | msgstr "" |
| 193 | 208 | |
| 194 | -#: ../views/gov_user_plugin/_institution.html.erb:95 | |
| 209 | +#: ../views/gov_user_plugin/_institution.html.erb:106 | |
| 195 | 210 | #: ../views/gov_user_plugin_myprofile/edit_institution.html.erb:68 |
| 196 | 211 | msgid "CNPJ" |
| 197 | 212 | msgstr "" |
| 198 | 213 | |
| 199 | -#: ../views/gov_user_plugin/_institution.html.erb:104 | |
| 200 | -#: ../views/gov_user_plugin/_institution.html.erb:106 | |
| 201 | -#: ../views/gov_user_plugin_myprofile/edit_institution.html.erb:75 | |
| 202 | -#: ../views/gov_user_plugin_myprofile/edit_institution.html.erb:77 | |
| 203 | -msgid "Acronym" | |
| 204 | -msgstr "" | |
| 205 | - | |
| 206 | -#: ../views/gov_user_plugin/_institution.html.erb:114 | |
| 214 | +#: ../views/gov_user_plugin/_institution.html.erb:117 | |
| 207 | 215 | msgid "Governmental Sphere" |
| 208 | 216 | msgstr "" |
| 209 | 217 | |
| 210 | -#: ../views/gov_user_plugin/_institution.html.erb:125 | |
| 218 | +#: ../views/gov_user_plugin/_institution.html.erb:128 | |
| 211 | 219 | msgid "Governmental Power" |
| 212 | 220 | msgstr "" |
| 213 | 221 | |
| 214 | -#: ../views/gov_user_plugin/_institution.html.erb:136 | |
| 222 | +#: ../views/gov_user_plugin/_institution.html.erb:139 | |
| 215 | 223 | msgid "Juridical Nature" |
| 216 | 224 | msgstr "" |
| 217 | 225 | |
| 218 | -#: ../views/gov_user_plugin/_institution.html.erb:150 | |
| 219 | -#: ../views/gov_user_plugin_myprofile/edit_institution.html.erb:121 | |
| 226 | +#: ../views/gov_user_plugin/_institution.html.erb:153 | |
| 227 | +#: ../views/gov_user_plugin_myprofile/edit_institution.html.erb:132 | |
| 220 | 228 | msgid "SISP?" |
| 221 | 229 | msgstr "" |
| 222 | 230 | |
| 223 | -#: ../views/gov_user_plugin/_institution.html.erb:155 | |
| 224 | -#: ../views/gov_user_plugin_myprofile/edit_institution.html.erb:126 | |
| 231 | +#: ../views/gov_user_plugin/_institution.html.erb:158 | |
| 232 | +#: ../views/gov_user_plugin_myprofile/edit_institution.html.erb:137 | |
| 225 | 233 | #: ../views/profile/_institution_tab.html.erb:19 |
| 226 | 234 | msgid "Yes" |
| 227 | 235 | msgstr "" |
| 228 | 236 | |
| 229 | -#: ../views/gov_user_plugin/_institution.html.erb:160 | |
| 230 | -#: ../views/gov_user_plugin_myprofile/edit_institution.html.erb:130 | |
| 231 | -#: ../views/gov_user_plugin_myprofile/edit_institution.html.erb:133 | |
| 237 | +#: ../views/gov_user_plugin/_institution.html.erb:163 | |
| 238 | +#: ../views/gov_user_plugin_myprofile/edit_institution.html.erb:141 | |
| 239 | +#: ../views/gov_user_plugin_myprofile/edit_institution.html.erb:144 | |
| 232 | 240 | #: ../views/profile/_institution_tab.html.erb:19 |
| 233 | 241 | msgid "No" |
| 234 | 242 | msgstr "" |
| 235 | 243 | |
| 236 | -#: ../views/gov_user_plugin/_institution.html.erb:170 | |
| 237 | -#: ../views/gov_user_plugin/_institution.html.erb:173 | |
| 238 | -#: ../views/gov_user_plugin_myprofile/edit_institution.html.erb:143 | |
| 244 | +#: ../views/gov_user_plugin/_institution.html.erb:171 | |
| 245 | +msgid "SIORG Code" | |
| 246 | +msgstr "" | |
| 247 | + | |
| 248 | +#: ../views/gov_user_plugin/_institution.html.erb:180 | |
| 249 | +#: ../views/gov_user_plugin/_institution.html.erb:183 | |
| 250 | +#: ../views/gov_user_plugin_myprofile/edit_institution.html.erb:154 | |
| 239 | 251 | msgid "Save" |
| 240 | 252 | msgstr "" |
| 241 | 253 | |
| 242 | -#: ../views/gov_user_plugin/_institution.html.erb:171 | |
| 243 | -#: ../views/gov_user_plugin/_institution.html.erb:174 | |
| 244 | -#: ../views/gov_user_plugin_myprofile/edit_institution.html.erb:144 | |
| 254 | +#: ../views/gov_user_plugin/_institution.html.erb:181 | |
| 255 | +#: ../views/gov_user_plugin/_institution.html.erb:184 | |
| 256 | +#: ../views/gov_user_plugin_myprofile/edit_institution.html.erb:155 | |
| 245 | 257 | msgid "Cancel" |
| 246 | 258 | msgstr "" |
| 247 | 259 | |
| 248 | -#: ../views/gov_user_plugin/_institution.html.erb:175 | |
| 260 | +#: ../views/gov_user_plugin/_institution.html.erb:185 | |
| 249 | 261 | msgid "Could not send the form data to the server" |
| 250 | 262 | msgstr "" |
| 251 | 263 | |
| 252 | -#: ../views/gov_user_plugin/_institution.html.erb:183 | |
| 264 | +#: ../views/gov_user_plugin/_institution.html.erb:193 | |
| 253 | 265 | msgid "Creating institution" |
| 254 | 266 | msgstr "" |
| 255 | 267 | |
| ... | ... | @@ -279,6 +291,10 @@ msgstr "" |
| 279 | 291 | msgid "Juridical Nature:" |
| 280 | 292 | msgstr "" |
| 281 | 293 | |
| 294 | +#: ../views/gov_user_plugin_myprofile/edit_institution.html.erb:119 | |
| 295 | +msgid "SIORG Code:" | |
| 296 | +msgstr "" | |
| 297 | + | |
| 282 | 298 | #: ../views/incomplete_registration.html.erb:3 |
| 283 | 299 | msgid "Complete Profile" |
| 284 | 300 | msgstr "" |
| ... | ... | @@ -305,19 +321,19 @@ msgstr "" |
| 305 | 321 | msgid "No institution found" |
| 306 | 322 | msgstr "" |
| 307 | 323 | |
| 308 | -#: ../views/person_editor_extras.html.erb:32 | |
| 324 | +#: ../views/person_editor_extras.html.erb:30 | |
| 309 | 325 | msgid "Should begin with a capital letter and no special characters" |
| 310 | 326 | msgstr "" |
| 311 | 327 | |
| 312 | -#: ../views/person_editor_extras.html.erb:33 | |
| 328 | +#: ../views/person_editor_extras.html.erb:31 | |
| 313 | 329 | msgid "Email should have the following format: name@host.br" |
| 314 | 330 | msgstr "" |
| 315 | 331 | |
| 316 | -#: ../views/person_editor_extras.html.erb:34 | |
| 332 | +#: ../views/person_editor_extras.html.erb:32 | |
| 317 | 333 | msgid "Site should have a valid format: http://name.hosts" |
| 318 | 334 | msgstr "" |
| 319 | 335 | |
| 320 | -#: ../views/person_editor_extras.html.erb:35 | |
| 336 | +#: ../views/person_editor_extras.html.erb:33 | |
| 321 | 337 | msgid "If you work in a public agency use your government e-Mail" |
| 322 | 338 | msgstr "" |
| 323 | 339 | |
| ... | ... | @@ -369,7 +385,7 @@ msgstr "" |
| 369 | 385 | msgid "No organization or company found" |
| 370 | 386 | msgstr "" |
| 371 | 387 | |
| 372 | -#: ../views/ratings_extra_field.html.erb:9 | |
| 388 | +#: ../views/ratings_extra_field.html.erb:8 | |
| 373 | 389 | msgid "Add" |
| 374 | 390 | msgstr "" |
| 375 | 391 | ... | ... |
src/noosfero-spb/gov_user/po/pt/gov_user.po
| ... | ... | @@ -57,6 +57,12 @@ msgstr "Informações da Instituição" |
| 57 | 57 | msgid "Institution" |
| 58 | 58 | msgstr "Instituição" |
| 59 | 59 | |
| 60 | +msgid "institution" | |
| 61 | +msgstr "instituição" | |
| 62 | + | |
| 63 | +msgid "invalid, only numbers are allowed." | |
| 64 | +msgstr "inválido, apenas números são permitidos." | |
| 65 | + | |
| 60 | 66 | msgid "invalid, only public and private institutions are allowed." |
| 61 | 67 | msgstr "Inválido, somente instituições públicas e privadas são permitidas." |
| 62 | 68 | |
| ... | ... | @@ -117,6 +123,9 @@ msgstr "Razão Social" |
| 117 | 123 | msgid "Institution name already exists" |
| 118 | 124 | msgstr "Nome de Instituição já existe" |
| 119 | 125 | |
| 126 | +msgid "Acronym" | |
| 127 | +msgstr "Sigla" | |
| 128 | + | |
| 120 | 129 | msgid "Fantasy name" |
| 121 | 130 | msgstr "Nome Fantasia" |
| 122 | 131 | |
| ... | ... | @@ -138,9 +147,6 @@ msgstr "Cidade" |
| 138 | 147 | msgid "CNPJ" |
| 139 | 148 | msgstr "CNPJ" |
| 140 | 149 | |
| 141 | -msgid "Acronym" | |
| 142 | -msgstr "Sigla" | |
| 143 | - | |
| 144 | 150 | msgid "Governmental Sphere" |
| 145 | 151 | msgstr "Esfera Governamental:" |
| 146 | 152 | |
| ... | ... | @@ -159,6 +165,9 @@ msgstr "Sim" |
| 159 | 165 | msgid "No" |
| 160 | 166 | msgstr "Não" |
| 161 | 167 | |
| 168 | +msgid "SIORG Code" | |
| 169 | +msgstr "Código SIORG" | |
| 170 | + | |
| 162 | 171 | msgid "Save" |
| 163 | 172 | msgstr "Salvar" |
| 164 | 173 | |
| ... | ... | @@ -192,6 +201,9 @@ msgstr "Poder Governamental:" |
| 192 | 201 | msgid "Juridical Nature:" |
| 193 | 202 | msgstr "Natureza Jurídica:" |
| 194 | 203 | |
| 204 | +msgid "SIORG Code:" | |
| 205 | +msgstr "Código SIORG:" | |
| 206 | + | |
| 195 | 207 | msgid "Complete Profile" |
| 196 | 208 | msgstr "Complete o Perfil" |
| 197 | 209 | ... | ... |
src/noosfero-spb/gov_user/public/views/create-institution.js
| ... | ... | @@ -45,6 +45,7 @@ modulejs.define('CreateInstitution', ['jquery', 'NoosferoRoot', 'SelectElement'] |
| 45 | 45 | |
| 46 | 46 | |
| 47 | 47 | function get_institution_post_data() { |
| 48 | + | |
| 48 | 49 | return { |
| 49 | 50 | cnpj: $("#institutions_cnpj").val(), |
| 50 | 51 | type: $("input[name='institutions[type]']:checked").val(), |
| ... | ... | @@ -52,7 +53,9 @@ modulejs.define('CreateInstitution', ['jquery', 'NoosferoRoot', 'SelectElement'] |
| 52 | 53 | governmental_power: $("#institutions_governmental_power").selected().val(), |
| 53 | 54 | governmental_sphere: $("#institutions_governmental_sphere").selected().val(), |
| 54 | 55 | juridical_nature: $("#institutions_juridical_nature").selected().val(), |
| 55 | - corporate_name: $("#institutions_corporate_name").val() | |
| 56 | + corporate_name: $("#institutions_corporate_name").val(), | |
| 57 | + siorg_code: $("#institutions_siorg_code").val(), | |
| 58 | + sisp: $('input[name="institutions[sisp]"]:checked').val() | |
| 56 | 59 | }; |
| 57 | 60 | } |
| 58 | 61 | ... | ... |
src/noosfero-spb/gov_user/views/gov_user_plugin/_institution.html.erb
| ... | ... | @@ -30,36 +30,47 @@ |
| 30 | 30 | <%= hidden_field_tag "edit_institution_page", false %> |
| 31 | 31 | <%= fields_for :institutions do |inst| %> |
| 32 | 32 | <div class="spb-row no-margin-top"> |
| 33 | - <div class='spb-col spb-col-3'> | |
| 33 | + <div class='spb-col'> | |
| 34 | 34 | <%= labelled_radio_button _('Public Institution'), 'institutions[type]', 'PublicInstitution', true %> |
| 35 | 35 | </div> |
| 36 | 36 | |
| 37 | - <div class="spb-col spb-col-3"> | |
| 37 | + <div class="spb-col"> | |
| 38 | 38 | <%= labelled_radio_button _('Private Institution'), 'institutions[type]', 'PrivateInstitution' %> |
| 39 | 39 | </div> |
| 40 | 40 | |
| 41 | - <div class="spb-col spb-col-3"></div> | |
| 42 | - <div class="spb-col spb-col-3"></div> | |
| 43 | 41 | </div> |
| 44 | 42 | |
| 45 | 43 | <div class="spb-row"> |
| 46 | - <div class="spb-col spb-col-5"> | |
| 44 | + <div class="spb-col spb-col-9"> | |
| 47 | 45 | <label for="community_name" class="formlabel"> |
| 48 | 46 | <%= _("Corporate Name") %><!-- razão social --> |
| 49 | 47 | <span class="required-field">(*)</span> |
| 50 | 48 | </label> |
| 51 | 49 | |
| 52 | - <%= f.text_field(:name, :class => flash[:error_community_name], :value => params[:community][:name]) %> | |
| 50 | + <%= f.text_field(:name, :class => flash[:error_community_name], :maxlength => 250, :value => params[:community][:name]) %> | |
| 53 | 51 | <%= content_tag :span, _("Institution name already exists"), :id=>"already_exists_text", :class=>"errorExplanation hide-field" %> |
| 54 | 52 | </div> |
| 55 | 53 | |
| 56 | - <div class="spb-col spb-col-6"> | |
| 54 | + <div class="public-institutions-fields"> | |
| 55 | + <div class="spb-col spb-col-3"> | |
| 56 | + <%= hidden_field_tag "acronym_translate", _("Acronym") %> | |
| 57 | + <%= hidden_field_tag "fantasy_name_translate", _("Fantasy name") %> | |
| 58 | + <%= inst.label("acronym" ,_("Acronym"), :class=>"formlabel", id: "institution_acronym_label") %> | |
| 59 | + <%= inst.text_field(:acronym, :value => params[:institutions][:acronym], :maxlength => 12) %> | |
| 60 | + </div> | |
| 61 | + </div> | |
| 62 | + | |
| 63 | + </div> | |
| 64 | + | |
| 65 | + <div class="spb-row"> | |
| 66 | + <div class="spb-col spb-col-12"> | |
| 57 | 67 | <%= inst.label "corporate_name", _("Fantasy name"), :class=>"formlabel" %><!-- Nome fantasia --> |
| 58 | - <%= inst.text_field(:corporate_name, :value => params[:institutions][:corporate_name], :size => 55) %> | |
| 68 | + <%= inst.text_field(:corporate_name, :value => params[:institutions][:corporate_name], :size => 55, :maxlength => 250) %> | |
| 59 | 69 | </div> |
| 60 | 70 | </div> |
| 61 | 71 | |
| 62 | 72 | <div class="spb-row"> |
| 73 | + | |
| 63 | 74 | <div class="spb-col spb-col-5"> |
| 64 | 75 | <label for="community_country" class="formlabel"> |
| 65 | 76 | <%= _("Country") %> |
| ... | ... | @@ -84,7 +95,7 @@ |
| 84 | 95 | <span class="required-field">(*)</span> |
| 85 | 96 | </label> |
| 86 | 97 | |
| 87 | - <%= f.text_field(:city, :class => flash[:error_community_city], :value => params[:community][:city]) %> | |
| 98 | + <%= f.text_field(:city, :class => flash[:error_community_city], :value => params[:community][:city], :maxlength => 250) %> | |
| 88 | 99 | </div> |
| 89 | 100 | </div> |
| 90 | 101 | |
| ... | ... | @@ -99,14 +110,6 @@ |
| 99 | 110 | </div> |
| 100 | 111 | </div> |
| 101 | 112 | |
| 102 | - <div class="spb-row"> | |
| 103 | - <div class="spb-col spb-col-12"> | |
| 104 | - <%= hidden_field_tag "acronym_translate", _("Acronym") %> | |
| 105 | - <%= hidden_field_tag "fantasy_name_translate", _("Fantasy name") %> | |
| 106 | - <%= inst.label("acronym" ,_("Acronym"), :class=>"formlabel") %> | |
| 107 | - <%= inst.text_field(:acronym, :value => params[:institutions][:acronym]) %> | |
| 108 | - </div> | |
| 109 | - </div> | |
| 110 | 113 | |
| 111 | 114 | <div class="spb-row public-institutions-fields"> |
| 112 | 115 | <div class="spb-col spb-col-6"> |
| ... | ... | @@ -141,28 +144,35 @@ |
| 141 | 144 | </div> |
| 142 | 145 | </div> |
| 143 | 146 | |
| 144 | - <div class="spb-row public-institutions-fields"> | |
| 145 | - <div class="spc-col spb-col-12 sisp-fields"> | |
| 146 | - <div class="spb-col spb-col-3"> | |
| 147 | - <% if @show_sisp_field %> | |
| 147 | + <% if @show_admin_fields %> | |
| 148 | + <div class="spb-row public-institutions-fields"> | |
| 149 | + <div class="spc-col spb-col-12 sisp-fields"> | |
| 150 | + <div class="spb-col spb-col-3"> | |
| 148 | 151 | |
| 149 | - <div class="spb-col spb-col-12"> | |
| 150 | - <%= _("SISP?") %> | |
| 151 | - </div> | |
| 152 | + <div class="spb-col spb-col-12"> | |
| 153 | + <%= _("SISP?") %> | |
| 154 | + </div> | |
| 152 | 155 | |
| 153 | - <div class="spb-col spb-col-5"> | |
| 154 | - <%= inst.radio_button(:sisp, true, :class => "#{flash[:error_institution_sisp]}" ) %> | |
| 155 | - <%= inst.label :sisp ,_("Yes"), :value => true %> | |
| 156 | - </div> | |
| 156 | + <div class="spb-col spb-col-5"> | |
| 157 | + <%= inst.radio_button(:sisp, true, :class => "#{flash[:error_institution_sisp]}" ) %> | |
| 158 | + <%= inst.label :sisp ,_("Yes"), :value => true %> | |
| 159 | + </div> | |
| 157 | 160 | |
| 158 | - <div class="spb-col spb-col-6"> | |
| 159 | - <%= inst.radio_button(:sisp, false, :checked=>"checked", :class => "#{flash[:error_institution_sisp]}") %> | |
| 160 | - <%= inst.label :sisp ,_("No"), :value => false %> | |
| 161 | + <div class="spb-col spb-col-6"> | |
| 162 | + <%= inst.radio_button(:sisp, false, :checked=>"checked", :class => "#{flash[:error_institution_sisp]}") %> | |
| 163 | + <%= inst.label :sisp ,_("No"), :value => false %> | |
| 164 | + </div> | |
| 161 | 165 | </div> |
| 162 | - <% end %> | |
| 163 | 166 | </div> |
| 164 | 167 | </div> |
| 165 | - </div> | |
| 168 | + | |
| 169 | + <div class="spb-row public-institutions-fields"> | |
| 170 | + <div class="spb-col spb-col-12"> | |
| 171 | + <%= inst.label("siorg_code" ,_("SIORG Code"), :class=>"formlabel") %> | |
| 172 | + <%= inst.text_field(:siorg_code, :value => params[:institutions][:siorg_code]) %> | |
| 173 | + </div> | |
| 174 | + </div> | |
| 175 | + <% end %> | |
| 166 | 176 | |
| 167 | 177 | <div class="spb-row modal-form-actions"> |
| 168 | 178 | <div class="spb-col spb-col-6"> | ... | ... |
src/noosfero-spb/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb
| ... | ... | @@ -112,6 +112,17 @@ |
| 112 | 112 | </div> |
| 113 | 113 | </div> |
| 114 | 114 | |
| 115 | + <div class="spb-row public-institutions-fields"> | |
| 116 | + <div class="spb-col spb-col-6"> | |
| 117 | + <span class='required-field public-institutions-fields'> | |
| 118 | + <div class="formfield type-text"> | |
| 119 | + <%= inst.label("siorg_code" ,_("SIORG Code:"), :class=>"formlabel") %> | |
| 120 | + <%= inst.text_field(:siorg_code, :value => @institution.siorg_code) %> | |
| 121 | + </div> | |
| 122 | + </span> | |
| 123 | + </div> | |
| 124 | + </div> | |
| 125 | + | |
| 115 | 126 | <div class="spc-col spb-col-12 sisp-fields"> |
| 116 | 127 | <div class="spb-row public-institutions-fields"> |
| 117 | 128 | <div class="spb-col spb-col-3"> |
| ... | ... | @@ -120,7 +131,7 @@ |
| 120 | 131 | <div class="spb-col spb-col-12"> |
| 121 | 132 | <%= _("SISP?") %> |
| 122 | 133 | </div> |
| 123 | - <% if @show_sisp_field %> | |
| 134 | + <% if @show_admin_fields %> | |
| 124 | 135 | <div class="spb-col spb-col-4"> |
| 125 | 136 | <%= inst.radio_button(:sisp, true, :checked=>(@institution.sisp ? true : false)) %> |
| 126 | 137 | <%= inst.label("sisp" ,_("Yes")) %> | ... | ... |
src/noosfero-spb/gov_user/views/person_editor_extras.html.erb
| ... | ... | @@ -12,9 +12,7 @@ |
| 12 | 12 | |
| 13 | 13 | <%= content_tag(:div, _("No institution found"), :id=>"institution_empty_ajax_message", :class=>"errorExplanation hide-field") %> |
| 14 | 14 | |
| 15 | - <% if context.profile.user && context.profile.user.person.is_admin? %> | |
| 16 | - <%= InstitutionModalHelper.modal_button %> | |
| 17 | - <% end %> | |
| 15 | + <%= InstitutionModalHelper.modal_button %> | |
| 18 | 16 | |
| 19 | 17 | <%= hidden_field_tag("user[institution_ids][]", "", :class => 'user_institutions') %> |
| 20 | 18 | <%= hidden_field_tag("institution_selected", "") %> | ... | ... |
src/noosfero-spb/gov_user/views/ratings_extra_field.html.erb
| ... | ... | @@ -5,9 +5,7 @@ |
| 5 | 5 | |
| 6 | 6 | <div id="institution_empty_ajax_message" class="errorExplanation hide-field rating-create-institution-container"> |
| 7 | 7 | <span class="institution-not-found"><%= _("No organization or company found") %></span> |
| 8 | - <% if user && user.is_admin? %> | |
| 9 | - <%= InstitutionModalHelper.modal_button(_("Add"), "none") %> | |
| 10 | - <% end %> | |
| 8 | + <%= InstitutionModalHelper.modal_button(_("Add"), "none") %> | |
| 11 | 9 | </div> |
| 12 | 10 | |
| 13 | 11 | <%= hidden_field_tag "organization_rating[institution_id]", "", id: "institution_selected" %> | ... | ... |
src/noosfero-spb/noosfero-spb-theme/css/administration-panel.css
| ... | ... | @@ -352,7 +352,7 @@ |
| 352 | 352 | } |
| 353 | 353 | |
| 354 | 354 | .action-gov_user_plugin-create_institution_admin #community_name { |
| 355 | - width: 200px; | |
| 355 | + width: 372px; | |
| 356 | 356 | } |
| 357 | 357 | |
| 358 | 358 | .action-gov_user_plugin_myprofile-edit_institution #institutions_corporate_name { |
| ... | ... | @@ -360,8 +360,10 @@ |
| 360 | 360 | color: black; |
| 361 | 361 | } |
| 362 | 362 | |
| 363 | +.action-gov_user_plugin_myprofile-edit_institution #institutions_cnpj, | |
| 364 | +.action-gov_user_plugin-create_institution_admin #institutions_cnpj, | |
| 363 | 365 | .action-gov_user_plugin-create_institution_admin #institutions_corporate_name { |
| 364 | - width: 310px; | |
| 366 | + width: 508px; | |
| 365 | 367 | } |
| 366 | 368 | |
| 367 | 369 | .action-gov_user_plugin_myprofile-edit_institution #community_country { |
| ... | ... | @@ -388,15 +390,13 @@ |
| 388 | 390 | } |
| 389 | 391 | |
| 390 | 392 | .action-gov_user_plugin-create_institution_admin #community_city { |
| 391 | - width: 222px; | |
| 393 | + width: 199px; | |
| 392 | 394 | } |
| 393 | 395 | |
| 394 | -.action-gov_user_plugin_myprofile-edit_institution #institutions_cnpj, | |
| 395 | 396 | .action-gov_user_plugin_myprofile-edit_institution #institutions_acronym, |
| 396 | -.action-gov_user_plugin-create_institution_admin #institutions_cnpj, | |
| 397 | 397 | .action-gov_user_plugin-create_institution_admin #institutions_acronym { |
| 398 | 398 | text-indent: 5px; |
| 399 | - width: 530px; | |
| 399 | + width: 111px; | |
| 400 | 400 | } |
| 401 | 401 | |
| 402 | 402 | .action-gov_user_plugin_myprofile-edit_institution .modal-form-actions, |
| ... | ... | @@ -629,6 +629,7 @@ |
| 629 | 629 | margin-left: 0px; |
| 630 | 630 | } |
| 631 | 631 | |
| 632 | +.action-users-send_mail #content .main-content form label, | |
| 632 | 633 | .action-profile_editor-edit #content .main-content #profile-data .formlabel, |
| 633 | 634 | #noosfero_profile-content #content .main-content #profile-data .formlabel, |
| 634 | 635 | .controller-maps.action-maps-edit_location #content .main-content form label, |
| ... | ... | @@ -675,6 +676,7 @@ |
| 675 | 676 | font-size: 13px; |
| 676 | 677 | } |
| 677 | 678 | |
| 679 | +.action-users-send_mail #content .main-content input[type="text"], | |
| 678 | 680 | .action-admin_panel-site_info #content .main-content input[type="text"], |
| 679 | 681 | .action-profile_editor-edit_software_community #content .main-content #profile-data input[type="text"], |
| 680 | 682 | .action-profile_editor-edit #content .main-content #profile-data input[type="text"], |
| ... | ... | @@ -692,6 +694,46 @@ |
| 692 | 694 | color: #585858; |
| 693 | 695 | } |
| 694 | 696 | |
| 697 | +#noosfero_profile-content #content .main-content #profile-data #institutions_siorg_code, | |
| 698 | +.action-profile_editor-edit #content .main-content #profile-data #institutions_siorg_code, | |
| 699 | +.action-gov_user_plugin-create_institution_admin #content .main-content #institutions_siorg_code, | |
| 700 | +.action-organization_ratings_plugin_profile-new_rating #content .main-content #institutions_siorg_code { | |
| 701 | + width: 189px; | |
| 702 | +} | |
| 703 | + | |
| 704 | +.action-users-send_mail #content .main-content{ | |
| 705 | + font-family: Arial; | |
| 706 | +} | |
| 707 | + | |
| 708 | +.action-users-send_mail #content .main-content form label{ | |
| 709 | + font-size: 12px; | |
| 710 | +} | |
| 711 | + | |
| 712 | +.action-users-send_mail #content .main-content input[type="text"] { | |
| 713 | + width: 504px; | |
| 714 | +} | |
| 715 | + | |
| 716 | +.action-users-send_mail #content .main-content .recipients{ | |
| 717 | + margin-top: 30px; | |
| 718 | +} | |
| 719 | + | |
| 720 | +.action-users-send_mail #content .main-content .formlabel { | |
| 721 | + font-weight: 700; | |
| 722 | + font-size: 16px; | |
| 723 | +} | |
| 724 | + | |
| 725 | +.action-users-send_mail #content .main-content .recipients-checkboxes { | |
| 726 | + margin-left: 20px; | |
| 727 | +} | |
| 728 | + | |
| 729 | +.action-users-send_mail #content .main-content #profile_admins{ | |
| 730 | + margin-left: 10px | |
| 731 | +} | |
| 732 | + | |
| 733 | +.action-users-send_mail #content .main-content .recipients-checkboxes input[disabled=""] { | |
| 734 | + opacity: 0.5; | |
| 735 | +} | |
| 736 | + | |
| 695 | 737 | .action-profile_editor-edit_software_community #content .main-content #profile-data .field-with-privacy-selector:hover{ |
| 696 | 738 | background: none; |
| 697 | 739 | } |
| ... | ... | @@ -723,14 +765,21 @@ |
| 723 | 765 | margin-top: 0px; |
| 724 | 766 | } |
| 725 | 767 | |
| 768 | +.action-users-send_mail #content .main-content form div input[type="radio"], | |
| 726 | 769 | .action-profile_editor-edit #content .main-content form div input[type="radio"], |
| 727 | 770 | #noosfero_profile-content #content .main-content form div input[type="radio"], |
| 771 | +.action-users-send_mail #content .main-content form input[type="checkbox"], | |
| 728 | 772 | .action-profile_editor-edit #content .main-content form input[type="checkbox"], |
| 729 | 773 | #noosfero_profile-content #content .main-content form input[type="checkbox"] { |
| 730 | 774 | margin-right: 5px; |
| 731 | 775 | vertical-align: middle; |
| 732 | 776 | } |
| 733 | 777 | |
| 778 | +.action-users-send_mail #content .main-content form div input[type="radio"], | |
| 779 | +.action-users-send_mail #content .main-content form input[type="checkbox"]{ | |
| 780 | + margin-bottom: 5px; | |
| 781 | +} | |
| 782 | + | |
| 734 | 783 | .action-profile_editor-edit #content .main-content #profile-data .field-with-privacy-selector:hover, |
| 735 | 784 | #noosfero_profile-content #content .main-content #profile-data .field-with-privacy-selector:hover { |
| 736 | 785 | background-color: #FFF; |
| ... | ... | @@ -855,6 +904,23 @@ |
| 855 | 904 | margin-right: 10px; |
| 856 | 905 | } |
| 857 | 906 | |
| 907 | +.action-users-send_mail #content .main-content .submit { | |
| 908 | + background-color: #3E67B1; | |
| 909 | + color: #FFF; | |
| 910 | + height: 30px; | |
| 911 | + line-height: 26px; | |
| 912 | + padding: 0 15px 5px 15px; | |
| 913 | + margin: 10px 10px 0 0; | |
| 914 | +} | |
| 915 | + | |
| 916 | +.action-users-send_mail #content .main-content .icon-cancel { | |
| 917 | + margin: 10px 10px 0 0; | |
| 918 | + display: inline-block; | |
| 919 | + line-height: 26px; | |
| 920 | + height: 23px; | |
| 921 | + padding: 0 15px 5px 15px; | |
| 922 | +} | |
| 923 | + | |
| 858 | 924 | .action-profile_editor-edit #delete-profile, |
| 859 | 925 | #noosfero_profile-content #delete-profile { |
| 860 | 926 | margin-top:0px; |
| ... | ... | @@ -1114,7 +1180,7 @@ |
| 1114 | 1180 | color: #172738; |
| 1115 | 1181 | } |
| 1116 | 1182 | |
| 1117 | -#noosfero_profile-content #content .main-content #profile-data #a { | |
| 1183 | +#noosfero_profile-content #content .main-content #profile-data input[type="text"] { | |
| 1118 | 1184 | height: 33px; |
| 1119 | 1185 | } |
| 1120 | 1186 | ... | ... |
src/noosfero-spb/noosfero-spb-theme/css/edition-pages.css
| ... | ... | @@ -326,6 +326,8 @@ |
| 326 | 326 | font-size: 14px; |
| 327 | 327 | } |
| 328 | 328 | |
| 329 | +.action-software_communities_plugin_myprofile-edit_software #content .main-content #especific-info h4, | |
| 330 | +.action-software_communities_plugin_myprofile-edit_software #content .main-content #especific-info form .formlabel, | |
| 329 | 331 | .action-software_communities_plugin_myprofile-edit_software #content .main-content form .formlabel, |
| 330 | 332 | .action-software_communities_plugin_myprofile-edit_software #content .main-content #profile_change_picture_title label, |
| 331 | 333 | .action-software_communities_plugin_myprofile-new_software #content .main-content #profile_change_picture_title label, |
| ... | ... | @@ -421,6 +423,10 @@ font-size: 10px; |
| 421 | 423 | margin-bottom: 20px; |
| 422 | 424 | } |
| 423 | 425 | |
| 426 | +.action-software_communities_plugin_myprofile-edit_software #content .main-content #especific-info h4 { | |
| 427 | + margin-top: 20px; | |
| 428 | +} | |
| 429 | + | |
| 424 | 430 | .action-software_communities_plugin_myprofile-edit_software #content .main-content #basic-info #profile_change_picture div { |
| 425 | 431 | margin: 0px; |
| 426 | 432 | } |
| ... | ... | @@ -477,6 +483,10 @@ font-size: 10px; |
| 477 | 483 | text-decoration: none; |
| 478 | 484 | } |
| 479 | 485 | |
| 486 | +.action-software_communities_plugin_myprofile-edit_software .main-content #especific-info { | |
| 487 | + color: #231f20 | |
| 488 | +} | |
| 489 | + | |
| 480 | 490 | /* new community form*/ |
| 481 | 491 | |
| 482 | 492 | .action-memberships-new_community #content .main-block form input[type="text"] { | ... | ... |
src/noosfero-spb/noosfero-spb-theme/css/modal.css
| ... | ... | @@ -235,13 +235,15 @@ |
| 235 | 235 | .action-profile_editor-edit #content .main-content #profile-data .modal #community_name, |
| 236 | 236 | .modal #community_name { |
| 237 | 237 | height: 16px; |
| 238 | - width: 200px; | |
| 238 | + width: 392px; | |
| 239 | 239 | } |
| 240 | 240 | |
| 241 | +.action-profile_editor-edit #content .main-content #profile-data .modal #institutions_cnpj, | |
| 241 | 242 | .action-profile_editor-edit #content .main-content #profile-data .modal #institutions_corporate_name, |
| 243 | +.modal #institutions_cnpj, | |
| 242 | 244 | .modal #institutions_corporate_name { |
| 243 | 245 | height: 16px; |
| 244 | - width: 285px; | |
| 246 | + width: 533px; | |
| 245 | 247 | } |
| 246 | 248 | |
| 247 | 249 | .action-profile_editor-edit #content .main-content #profile-data .modal #community_country, |
| ... | ... | @@ -257,16 +259,14 @@ |
| 257 | 259 | .action-profile_editor-edit #content .main-content #profile-data .modal #community_city, |
| 258 | 260 | .modal #community_city { |
| 259 | 261 | height: 16px; |
| 260 | - width: 190px; | |
| 262 | + width: 205px; | |
| 261 | 263 | margin-top: 2px; |
| 262 | 264 | } |
| 263 | 265 | |
| 264 | -.action-profile_editor-edit #content .main-content #profile-data .modal #institutions_cnpj, | |
| 265 | 266 | .action-profile_editor-edit #content .main-content #profile-data .modal #institutions_acronym, |
| 266 | -.modal #institutions_cnpj, | |
| 267 | 267 | .modal #institutions_acronym { |
| 268 | 268 | height: 16px; |
| 269 | - width: 530px; | |
| 269 | + width: 111px; | |
| 270 | 270 | } |
| 271 | 271 | |
| 272 | 272 | .action-profile_editor-edit #content .main-content #profile-data .modal a.button.with-text.icon-add, | ... | ... |
src/noosfero-spb/noosfero-spb-theme/css/software-pages.css
| ... | ... | @@ -226,17 +226,18 @@ |
| 226 | 226 | |
| 227 | 227 | #content .box-1 .software-communities-plugin_categories-and-tags-block .block-title{ |
| 228 | 228 | float: left; |
| 229 | - margin: 13px 0px 10px 0; | |
| 230 | - padding: 3px 0px; | |
| 229 | + margin: 13px 0 0 0; | |
| 230 | + padding: 3px 5px; | |
| 231 | 231 | background: none; |
| 232 | 232 | color: #5E82C6; |
| 233 | 233 | font-family: Arial, verdana; |
| 234 | 234 | font-size: 12px; |
| 235 | 235 | font-weight: 300; |
| 236 | + width: 100%; | |
| 236 | 237 | } |
| 237 | 238 | |
| 238 | 239 | #content .box-1 .software-communities-plugin_categories-and-tags-block .category_cloud{ |
| 239 | - margin: 0px; | |
| 240 | + margin: 0px 0px 10px 0px; | |
| 240 | 241 | position: relative; |
| 241 | 242 | top: 9px; |
| 242 | 243 | } | ... | ... |
src/noosfero-spb/software_communities/controllers/software_communities_plugin_myprofile_controller.rb
| ... | ... | @@ -35,7 +35,6 @@ class SoftwareCommunitiesPluginMyprofileController < MyProfileController |
| 35 | 35 | software_info_insert_models.call(@list_operating_systems, 'operating_systems') |
| 36 | 36 | begin |
| 37 | 37 | raise NotAdminException unless can_change_public_software? |
| 38 | - @software_info.public_software = params['software']['public_software'].present? | |
| 39 | 38 | @software_info.update_attributes!(params[:software]) |
| 40 | 39 | |
| 41 | 40 | @community = @software_info.community |
| ... | ... | @@ -66,7 +65,10 @@ class SoftwareCommunitiesPluginMyprofileController < MyProfileController |
| 66 | 65 | @software_info.errors.add(:base, _("You don't have permission to change public software attributes")) |
| 67 | 66 | return false |
| 68 | 67 | end |
| 68 | + else | |
| 69 | + @software_info.public_software = params['software']['public_software'].present? | |
| 69 | 70 | end |
| 71 | + | |
| 70 | 72 | return true |
| 71 | 73 | end |
| 72 | 74 | ... | ... |
src/noosfero-spb/software_communities/controllers/software_communities_plugin_profile_controller.rb
| ... | ... | @@ -11,10 +11,15 @@ class SoftwareCommunitiesPluginProfileController < ProfileController |
| 11 | 11 | def download_file |
| 12 | 12 | download = SoftwareCommunitiesPlugin::Download.where(:id => params[:download_id].to_i).detect{ |b| b.download_block.environment.id == environment.id } |
| 13 | 13 | |
| 14 | - if download | |
| 14 | + if download && (download.link =~ URI::regexp) | |
| 15 | 15 | download.total_downloads += 1 |
| 16 | 16 | download.save |
| 17 | 17 | |
| 18 | + if profile.software? | |
| 19 | + profile.software_info.downloads_count += 1 | |
| 20 | + profile.software_info.save | |
| 21 | + end | |
| 22 | + | |
| 18 | 23 | redirect_to download.link |
| 19 | 24 | else |
| 20 | 25 | session[:notice] = ERROR_MESSAGES[:not_found] | ... | ... |
src/noosfero-spb/software_communities/db/migrate/20160518173644_adds_downloads_count_to_software.rb
0 → 100644
| ... | ... | @@ -0,0 +1,9 @@ |
| 1 | +class AddsDownloadsCountToSoftware < ActiveRecord::Migration | |
| 2 | + def up | |
| 3 | + add_column :software_communities_plugin_software_infos, :downloads_count, :integer, :default => 0 | |
| 4 | + end | |
| 5 | + | |
| 6 | + def down | |
| 7 | + remove_column :software_communities_plugin_software_infos, :downloads_count | |
| 8 | + end | |
| 9 | +end | ... | ... |
src/noosfero-spb/software_communities/db/migrate/20160518174439_migrate_software_downloads_count_from_download_block_to_software.rb
0 → 100644
| ... | ... | @@ -0,0 +1,18 @@ |
| 1 | +class MigrateSoftwareDownloadsCountFromDownloadBlockToSoftware < ActiveRecord::Migration | |
| 2 | + def up | |
| 3 | + SoftwareCommunitiesPlugin::SoftwareInfo.find_each do |software| | |
| 4 | + software.downloads_count = 0 | |
| 5 | + blocks = SoftwareCommunitiesPlugin::DownloadBlock.joins(:box).where("boxes.owner_id = #{software.community_id}") | |
| 6 | + blocks.each do |b| | |
| 7 | + b.downloads.map{ |dl| | |
| 8 | + software.downloads_count += dl[:total_downloads] if dl.has_key? :total_downloads | |
| 9 | + } | |
| 10 | + end | |
| 11 | + software.save | |
| 12 | + end | |
| 13 | + end | |
| 14 | + | |
| 15 | + def down | |
| 16 | + say "This migration can't be reverted" | |
| 17 | + end | |
| 18 | +end | ... | ... |
src/noosfero-spb/software_communities/lib/ext/search_controller.rb
| ... | ... | @@ -155,7 +155,7 @@ class SearchController |
| 155 | 155 | @selected_categories_id = params[:selected_categories_id] |
| 156 | 156 | @selected_categories_id ||= [] |
| 157 | 157 | @selected_categories_id = @selected_categories_id.map(&:to_i) |
| 158 | - @all_selected = params[:software_type] == "all" || params[:software_type].blank? | |
| 158 | + @all_selected = params[:software_type] == "all" | |
| 159 | 159 | @public_software_selected = !@all_selected |
| 160 | 160 | @per_page = prepare_per_page |
| 161 | 161 | end | ... | ... |
src/noosfero-spb/software_communities/lib/software_communities_plugin/software_info.rb
| ... | ... | @@ -78,7 +78,7 @@ class SoftwareCommunitiesPlugin::SoftwareInfo < ActiveRecord::Base |
| 78 | 78 | has_many :operating_system_names, :through => :operating_systems, :class_name => 'SoftwareCommunitiesPlugin::OperatingSystemName' |
| 79 | 79 | has_many :categories, :through => :community |
| 80 | 80 | |
| 81 | - belongs_to :community, :dependent => :destroy | |
| 81 | + belongs_to :community | |
| 82 | 82 | belongs_to :license_info, :class_name => 'SoftwareCommunitiesPlugin::LicenseInfo' |
| 83 | 83 | |
| 84 | 84 | validates_length_of :finality, :maximum => 4000 | ... | ... |
src/noosfero-spb/software_communities/lib/software_communities_plugin/statistic_block.rb
| ... | ... | @@ -14,11 +14,6 @@ class SoftwareCommunitiesPlugin::StatisticBlock < Block |
| 14 | 14 | end |
| 15 | 15 | |
| 16 | 16 | def content(args={}) |
| 17 | - download_blocks = get_profile_download_blocks(self.owner) | |
| 18 | - downloads = download_blocks.map do |download_block| | |
| 19 | - get_downloads_from_block(download_block) | |
| 20 | - end | |
| 21 | - | |
| 22 | 17 | block = self |
| 23 | 18 | statistics = get_software_statistics |
| 24 | 19 | |
| ... | ... | @@ -27,7 +22,6 @@ class SoftwareCommunitiesPlugin::StatisticBlock < Block |
| 27 | 22 | :file => 'blocks/software_statistics', |
| 28 | 23 | :locals => { |
| 29 | 24 | :block => block, |
| 30 | - :total_downloads => downloads.sum, | |
| 31 | 25 | :statistics => statistics |
| 32 | 26 | } |
| 33 | 27 | ) |
| ... | ... | @@ -44,23 +38,17 @@ class SoftwareCommunitiesPlugin::StatisticBlock < Block |
| 44 | 38 | SoftwareCommunitiesPlugin::DownloadBlock.joins(:box).where("boxes.owner_id = ?", profile.id) |
| 45 | 39 | end |
| 46 | 40 | |
| 47 | - def get_downloads_from_block download_block | |
| 48 | - downloads = download_block.download_records.map do |download| | |
| 49 | - download.total_downloads unless download.total_downloads.nil? | |
| 50 | - end | |
| 51 | - downloads.select! {|value| not value.nil? } | |
| 52 | - downloads.sum | |
| 53 | - end | |
| 54 | - | |
| 55 | 41 | def get_software_statistics |
| 56 | 42 | statistics = {} |
| 57 | 43 | software = SoftwareCommunitiesPlugin::SoftwareInfo.find_by_community_id(self.owner.id) |
| 58 | 44 | if software.present? |
| 59 | 45 | statistics[:saved_resources] = software.saved_resources |
| 60 | 46 | statistics[:benefited_people] = software.benefited_people |
| 47 | + statistics[:downloads_count] = software.downloads_count | |
| 61 | 48 | else |
| 62 | 49 | statistics[:saved_resources] = 0 |
| 63 | 50 | statistics[:benefited_people] = 0 |
| 51 | + statistics[:downloads_count] = 0 | |
| 64 | 52 | end |
| 65 | 53 | statistics |
| 66 | 54 | end | ... | ... |
src/noosfero-spb/software_communities/views/blocks/download.html.erb
| 1 | 1 | <% if block.owner.software_info.nil? %> |
| 2 | 2 | <%= _("This community needs a software to use this block") %> |
| 3 | 3 | <% else %> |
| 4 | - <h3 class="block-title"> <%= _("Download") + block.owner.software_info.community.name %> </h3> | |
| 4 | + <h3 class="block-title"> <%= block.title.present? ? block.title : _("Download") +" "+ block.owner.software_info.community.name %> </h3> | |
| 5 | 5 | <ul class="download-list"> |
| 6 | 6 | <% block.download_records.sort_by(&:id).each do |download| %> |
| 7 | 7 | <li id="download-item-<%= download.id %>"> | ... | ... |
src/noosfero-spb/software_communities/views/blocks/software_statistics.html.erb
src/noosfero-spb/software_communities/views/box_organizer/_download_file.html.erb
| 1 | 1 | <li class="file-item"> |
| 2 | 2 | <a onclick="softwareDownload.selectFile(this)"> |
| 3 | 3 | <i class="fa fa-plus"></i><span class="file-name"><%= file.name%></span> - <span class="file-size"><%= number_to_human_size(file.size, precision: 2) %></span> |
| 4 | - <%= hidden_field_tag :file_path, "/#{file.profile.identifier}/#{file.path}", :class => "file-path" %> | |
| 4 | + <%= hidden_field_tag :file_path, url_for(file.url), :class => "file-path" %> | |
| 5 | 5 | </a> |
| 6 | 6 | </li> | ... | ... |
src/noosfero-spb/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb
| ... | ... | @@ -71,27 +71,19 @@ |
| 71 | 71 | <%= render :partial => 'library_fields', :locals => {:object_name => 'community', :profile => @community, :libraries => @list_libraries } %> |
| 72 | 72 | </div> |
| 73 | 73 | |
| 74 | -<br /> | |
| 75 | - | |
| 76 | 74 | <div id='operating_system_fields'> |
| 77 | 75 | <h4> <%= _("Operating Systems") %> </h4> |
| 78 | 76 | |
| 79 | 77 | <%= render :partial => 'operating_system_fields', :locals => {:object_name => 'community', :profile => @community, :operating_systems_fields => @list_operating_systems} %> |
| 80 | 78 | </div> |
| 81 | -<br /> | |
| 82 | - | |
| 83 | -<br /> | |
| 84 | 79 | <div id='programming_languages_fields'> |
| 85 | 80 | <h4> <%= _("Programming languages") %> </h4> |
| 86 | 81 | |
| 87 | 82 | <%= render :partial => 'language_fields', :locals => { :object_name => 'community', :profile => @community, :languages => @list_languages } %> |
| 88 | 83 | </div> |
| 89 | 84 | |
| 90 | -<br /> | |
| 91 | 85 | <div id='database_fields'> |
| 92 | 86 | <h4> <%= _("Databases") %> </h4> |
| 93 | 87 | |
| 94 | 88 | <%= render :partial => 'database_fields', :locals => {:object_name => 'community', :profile => @community, :database => @list_databases } %> |
| 95 | 89 | </div> |
| 96 | - | |
| 97 | -<br> | ... | ... |
src/noosfero-spb/spb_migrations/lib/tasks/import_old_spb_news.rake
| ... | ... | @@ -30,13 +30,20 @@ namespace :spb do |
| 30 | 30 | :name => row["title"] |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | - unless article = Article.find_by(:slug => row["title"].to_slug) | |
| 33 | + article = Article.find_by(:slug => row["title"].to_slug) | |
| 34 | + if article.blank? | |
| 34 | 35 | article = TinyMceArticle.new(attrs) |
| 35 | 36 | article.created_at = date |
| 36 | - article.save! | |
| 37 | 37 | end |
| 38 | - puts "Importing article: #{article.name}..." | |
| 38 | + article.save! | |
| 39 | + | |
| 40 | + puts "#{spb_blog.slug}: Importing article: #{article.name}..." | |
| 39 | 41 | end |
| 42 | + | |
| 43 | + puts "", "Deleting standard blog..." | |
| 44 | + old_blog = spb_profile.articles.find_by :slug => "blog" | |
| 45 | + old_blog.destroy if (old_blog.present? && old_blog.children.count.zero?) | |
| 46 | + | |
| 40 | 47 | end |
| 41 | 48 | |
| 42 | 49 | def error failure_condition, msg="ERROR!!" | ... | ... |
src/pkg-rpm/colab-deps/colab-deps.spec
src/pkg-rpm/colab-spb-plugin/colab-spb-plugin.spec
src/pkg-rpm/colab-spb-theme/colab-spb-theme.spec
src/pkg-rpm/colab/colab.spec
| 1 | 1 | %define name colab |
| 2 | -%define version 1.13.9 | |
| 2 | +%define version 1.13.14 | |
| 3 | 3 | %define buildvenv /var/tmp/%{name}-%{version} |
| 4 | 4 | |
| 5 | 5 | Summary: Collaboration platform for communities |
| 6 | 6 | Name: %{name} |
| 7 | 7 | Version: %{version} |
| 8 | -Release: 2 | |
| 8 | +Release: 1 | |
| 9 | 9 | Source0: %{name}-%{version}.tar.gz |
| 10 | 10 | License: GPLv2 |
| 11 | 11 | Group: Development/Tools |
| ... | ... | @@ -14,8 +14,8 @@ Prefix: %{_prefix} |
| 14 | 14 | Vendor: Sergio Oliveira <sergio@tracy.com.br> |
| 15 | 15 | Url: https://github.com/colab/colab |
| 16 | 16 | BuildArch: noarch |
| 17 | -BuildRequires: colab-deps >= 1.13.5, python-virtualenv | |
| 18 | -Requires: colab-deps >= 1.13.5, solr, mailman-api >= 0.3rc3 | |
| 17 | +BuildRequires: colab-deps >= 1.13.9, python-virtualenv | |
| 18 | +Requires: colab-deps >= 1.13.9, solr, mailman-api >= 0.3rc3 | |
| 19 | 19 | |
| 20 | 20 | %description |
| 21 | 21 | Integrated software development platform. | ... | ... |
src/pkg-rpm/noosfero-deps/noosfero-deps.spec
src/pkg-rpm/noosfero-spb/noosfero-spb.spec
src/pkg-rpm/noosfero/noosfero.spec
| ... | ... | @@ -2,16 +2,16 @@ |
| 2 | 2 | %define cache_dirs javascripts/cache stylesheets/cache |
| 3 | 3 | |
| 4 | 4 | Name: noosfero |
| 5 | -Version: 1.3.6+spb7 | |
| 6 | -Release: 1 | |
| 5 | +Version: 1.5.0+spb9 | |
| 6 | +Release: 3 | |
| 7 | 7 | Summary: Social Networking Platform |
| 8 | 8 | Group: Applications/Publishing |
| 9 | 9 | License: AGPLv3 |
| 10 | 10 | URL: http://noosfero.org |
| 11 | 11 | Source0: %{name}-%{version}.tar.gz |
| 12 | 12 | BuildArch: noarch |
| 13 | -BuildRequires: noosfero-deps >= 1.3-3, gettext, po4a | |
| 14 | -Requires: noosfero-deps, po4a, tango-icon-theme, memcached,crontabs, nodejs | |
| 13 | +BuildRequires: noosfero-deps >= 1.5.1, gettext, po4a | |
| 14 | +Requires: noosfero-deps >= 1.5.1, po4a, tango-icon-theme, memcached,crontabs, nodejs | |
| 15 | 15 | |
| 16 | 16 | %description |
| 17 | 17 | Noosfero is a web platform for social and solidarity economy networks with blog, |
| ... | ... | @@ -28,6 +28,8 @@ ln -sf /usr/lib/noosfero/Gemfile . |
| 28 | 28 | ln -sf /usr/lib/noosfero/Gemfile.lock . |
| 29 | 29 | ln -sf /usr/lib/noosfero/.bundle . |
| 30 | 30 | ln -sfT /usr/lib/noosfero/vendor/bundle vendor/bundle |
| 31 | +mkdir tmp | |
| 32 | +bundle exec rake -f Rakefile.release makemo | |
| 31 | 33 | bundle exec rake -f Rakefile.release noosfero:translations:compile > build.log 2>&1 || (cat build.log; exit 1) |
| 32 | 34 | rm -f build.log Gemfile Gemfile.lock .bundle vendor/bundle |
| 33 | 35 | rm -rf tmp log |
| ... | ... | @@ -64,6 +66,7 @@ EOF |
| 64 | 66 | mkdir -p %{buildroot}/etc/noosfero/plugins |
| 65 | 67 | ln -sf /etc/noosfero/database.yml %{buildroot}/usr/lib/noosfero/config/database.yml |
| 66 | 68 | ln -sf /etc/noosfero/unicorn.rb %{buildroot}/usr/lib/noosfero/config/unicorn.rb |
| 69 | +ln -sf /etc/noosfero/application.rb %{buildroot}/usr/lib/noosfero/config/application.rb | |
| 67 | 70 | |
| 68 | 71 | mkdir -p %{buildroot}/etc/noosfero/plugins |
| 69 | 72 | cp config/plugins/README %{buildroot}/etc/noosfero/plugins |
| ... | ... | @@ -99,9 +102,123 @@ production: |
| 99 | 102 | database: noosfero_production |
| 100 | 103 | username: noosfero |
| 101 | 104 | host: localhost |
| 105 | + | |
| 102 | 106 | port: 5432 |
| 103 | 107 | EOF |
| 104 | 108 | |
| 109 | +cat > %{buildroot}/etc/noosfero/application.rb <<EOF | |
| 110 | +require File.expand_path('../boot', __FILE__) | |
| 111 | + | |
| 112 | +require 'rails/all' | |
| 113 | +require 'active_support/dependencies' | |
| 114 | + | |
| 115 | +# FIXME this silences the warnings about Rails 2.3-style plugins under | |
| 116 | +# vendor/plugins, which are deprecated. Hiding those warnings makes it easier | |
| 117 | +# to work for now, but we should really look at putting those plugins away. | |
| 118 | +ActiveSupport::Deprecation.silenced = true | |
| 119 | + | |
| 120 | +Bundler.require(:default, :assets, Rails.env) | |
| 121 | + | |
| 122 | +module Noosfero | |
| 123 | + class Application < Rails::Application | |
| 124 | + | |
| 125 | + require 'noosfero/plugin' | |
| 126 | + | |
| 127 | + require 'noosfero/multi_tenancy' | |
| 128 | + config.middleware.use Noosfero::MultiTenancy::Middleware | |
| 129 | + | |
| 130 | + config.action_controller.include_all_helpers = false | |
| 131 | + | |
| 132 | + # Settings in config/environments/* take precedence over those specified here. | |
| 133 | + # Application configuration should go into files in config/initializers | |
| 134 | + # -- all .rb files in that directory are automatically loaded. | |
| 135 | + | |
| 136 | + # Custom directories with classes and modules you want to be autoloadable. | |
| 137 | + config.autoload_paths += %W( #{config.root.join('app', 'sweepers')} ) | |
| 138 | + config.autoload_paths += Dir["#{config.root}/lib"] | |
| 139 | + config.autoload_paths += Dir["#{config.root}/app/controllers/**/"] | |
| 140 | + config.autoload_paths += %W( #{config.root.join('test', 'mocks', Rails.env)} ) | |
| 141 | + | |
| 142 | + # Only load the plugins named here, in the order given (default is alphabetical). | |
| 143 | + # :all can be used as a placeholder for all plugins not explicitly named. | |
| 144 | + # config.plugins = [ :exception_notification, :ssl_requirement, :all ] | |
| 145 | + | |
| 146 | + # Activate observers that should always be running. | |
| 147 | + # Sweepers are observers | |
| 148 | + # don't load the sweepers while loading the database | |
| 149 | + ignore_rake_commands = %w[ | |
| 150 | + db:schema:load | |
| 151 | + gems:install | |
| 152 | + clobber | |
| 153 | + noosfero:translations:compile | |
| 154 | + makemo | |
| 155 | + ] | |
| 156 | + if \$PROGRAM_NAME =~ /rake$/ && (ignore_rake_commands.include?(ARGV.first)) | |
| 157 | + Noosfero::Plugin.should_load = false | |
| 158 | + else | |
| 159 | + config.active_record.observers = :article_sweeper, :role_assignment_sweeper, :friendship_sweeper, :category_sweeper, :block_sweeper | |
| 160 | + end | |
| 161 | + | |
| 162 | + # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. | |
| 163 | + # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. | |
| 164 | + # config.time_zone = 'Central Time (US & Canada)' | |
| 165 | + | |
| 166 | + # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. | |
| 167 | + # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] | |
| 168 | + config.i18n.default_locale = nil | |
| 169 | + | |
| 170 | + # Configure the default encoding used in templates for Ruby 1.9. | |
| 171 | + config.encoding = "utf-8" | |
| 172 | + | |
| 173 | + # Configure sensitive parameters which will be filtered from the log file. | |
| 174 | + config.filter_parameters += [:password] | |
| 175 | + | |
| 176 | + # Enable escaping HTML in JSON. | |
| 177 | + ActiveSupport::JSON::Encoding.escape_html_entities_in_json = true | |
| 178 | + | |
| 179 | + # Use SQL instead of Active Record's schema dumper when creating the database. | |
| 180 | + # This is necessary if your schema can't be completely dumped by the schema dumper, | |
| 181 | + # like if you have constraints or database-specific column types | |
| 182 | + # config.active_record.schema_format = :sql | |
| 183 | + | |
| 184 | + # Enforce whitelist mode for mass assignment. | |
| 185 | + # This will create an empty whitelist of attributes available for mass-assignment for all models | |
| 186 | + # in your app. As such, your models will need to explicitly whitelist or blacklist accessible | |
| 187 | + # parameters by using an attr_accessible or attr_protected declaration. | |
| 188 | + config.active_record.whitelist_attributes = true | |
| 189 | + | |
| 190 | + # Asset pipeline | |
| 191 | + config.assets.paths = | |
| 192 | + Dir.glob("app/assets/plugins/*/{,stylesheets,javascripts}") + | |
| 193 | + Dir.glob("app/assets/{,stylesheets,javascripts}") + | |
| 194 | + # no precedence over core | |
| 195 | + Dir.glob("app/assets/designs/{icons,themes,user_themes}/*") | |
| 196 | + | |
| 197 | + # disable strong_parameters before migration from protected_attributes | |
| 198 | + config.action_controller.permit_all_parameters = true | |
| 199 | + # Version of your assets, change this if you want to expire all your assets | |
| 200 | + config.assets.version = '1.0' | |
| 201 | + | |
| 202 | + config.sass.preferred_syntax = :scss | |
| 203 | + config.sass.cache = true | |
| 204 | + config.sass.line_comments = false | |
| 205 | + | |
| 206 | + config.action_dispatch.session = { | |
| 207 | + :key => '_noosfero_session', | |
| 208 | + } | |
| 209 | + config.session_store :active_record_store, key: '_noosfero_session' | |
| 210 | + | |
| 211 | + config.paths['db/migrate'].concat Dir.glob("#{Rails.root}/{baseplugins,config/plugins}/*/db/migrate") | |
| 212 | + config.i18n.load_path.concat Dir.glob("#{Rails.root}/{baseplugins,config/plugins}/*/locales/*.{rb,yml}") | |
| 213 | + | |
| 214 | + config.eager_load = true | |
| 215 | + | |
| 216 | + Noosfero::Plugin.setup(config) | |
| 217 | + | |
| 218 | + end | |
| 219 | +end | |
| 220 | +EOF | |
| 221 | + | |
| 105 | 222 | mkdir -p %{buildroot}/etc/default |
| 106 | 223 | cat > %{buildroot}/etc/default/noosfero <<EOF |
| 107 | 224 | NOOSFERO_DIR="/usr/lib/noosfero" |
| ... | ... | @@ -161,7 +278,7 @@ fi |
| 161 | 278 | |
| 162 | 279 | %preun |
| 163 | 280 | service noosfero stop |
| 164 | -chkconfig --del noosfero | |
| 281 | +systemctl disable noosfero | |
| 165 | 282 | |
| 166 | 283 | %files |
| 167 | 284 | /usr/lib/noosfero |
| ... | ... | @@ -170,4 +287,5 @@ chkconfig --del noosfero |
| 170 | 287 | %config(noreplace) /etc/default/noosfero |
| 171 | 288 | %config(noreplace) /etc/noosfero/database.yml |
| 172 | 289 | %config(noreplace) /etc/noosfero/unicorn.rb |
| 290 | +%config(noreplace) /etc/noosfero/application.rb | |
| 173 | 291 | %doc | ... | ... |