Commit 4215caf4d3b1a01853dec2fff2a123a4d06a8839
1 parent
93bebca6
Exists in
master
and in
79 other branches
Change submodules to folders
Folders moved to noosfero-spb: gov_user noosfero-spb-theme software_communities spb_migrations
Showing
1138 changed files
with
25375 additions
and
25391 deletions
Show diff stats
Too many changes.
To preserve performance only 100 of 1138 files displayed.
src/gov_user/.gitignore
src/gov_user/controllers/gov_user_plugin_controller.rb
| @@ -1,251 +0,0 @@ | @@ -1,251 +0,0 @@ | ||
| 1 | -#aqui deve ter so usuario e instituicao | ||
| 2 | -class GovUserPluginController < ApplicationController | ||
| 3 | - | ||
| 4 | - def hide_registration_incomplete_percentage | ||
| 5 | - response = false | ||
| 6 | - | ||
| 7 | - if request.xhr? && params[:hide] | ||
| 8 | - session[:hide_incomplete_percentage] = true | ||
| 9 | - response = session[:hide_incomplete_percentage] | ||
| 10 | - end | ||
| 11 | - | ||
| 12 | - render :json=>response.to_json | ||
| 13 | - end | ||
| 14 | - | ||
| 15 | - def create_institution | ||
| 16 | - @show_sisp_field = environment.admins.include?(current_user.person) | ||
| 17 | - @state_list = get_state_list() | ||
| 18 | - @governmental_sphere = [[_("Select a Governmental Sphere"), 0]]|GovernmentalSphere.all.map {|s| [s.name, s.id]} | ||
| 19 | - @governmental_power = [[_("Select a Governmental Power"), 0]]|GovernmentalPower.all.map {|g| [g.name, g.id]} | ||
| 20 | - @juridical_nature = [[_("Select a Juridical Nature"), 0]]|JuridicalNature.all.map {|j| [j.name, j.id]} | ||
| 21 | - @state_options = [[_('Select a state'), '-1']] | @state_list.collect {|state| [state.name, state.name]} | ||
| 22 | - | ||
| 23 | - params[:community] ||= {} | ||
| 24 | - params[:institutions] ||= {} | ||
| 25 | - | ||
| 26 | - if request.xhr? | ||
| 27 | - render :layout=>false | ||
| 28 | - else | ||
| 29 | - redirect_to "/" | ||
| 30 | - end | ||
| 31 | - end | ||
| 32 | - | ||
| 33 | - def split_http_referer http_referer | ||
| 34 | - split_list = [] | ||
| 35 | - split_list = http_referer.split("/") | ||
| 36 | - @url_token = split_list.last | ||
| 37 | - return @url_token | ||
| 38 | - end | ||
| 39 | - | ||
| 40 | - def create_institution_admin | ||
| 41 | - @show_sisp_field = environment.admins.include?(current_user.person) | ||
| 42 | - @state_list = get_state_list() | ||
| 43 | - @governmental_sphere = [[_("Select a Governmental Sphere"), 0]]|GovernmentalSphere.all.map {|s| [s.name, s.id]} | ||
| 44 | - @governmental_power = [[_("Select a Governmental Power"), 0]]|GovernmentalPower.all.map {|g| [g.name, g.id]} | ||
| 45 | - @juridical_nature = [[_("Select a Juridical Nature"), 0]]|JuridicalNature.all.map {|j| [j.name, j.id]} | ||
| 46 | - @state_options = [[_('Select a state'), '-1']] | @state_list.collect {|state| [state.name, state.name]} | ||
| 47 | - | ||
| 48 | - @url_token = split_http_referer request.original_url() | ||
| 49 | - | ||
| 50 | - params[:community] ||= {} | ||
| 51 | - params[:institutions] ||= {} | ||
| 52 | - | ||
| 53 | - end | ||
| 54 | - | ||
| 55 | - def new_institution | ||
| 56 | - redirect_to "/" if params[:community].blank? || params[:institutions].blank? | ||
| 57 | - | ||
| 58 | - response_message = {} | ||
| 59 | - | ||
| 60 | - institution_template = Community["institution"] | ||
| 61 | - add_template_in_params institution_template | ||
| 62 | - | ||
| 63 | - @institutions = private_create_institution | ||
| 64 | - add_environment_admins_to_institution @institutions | ||
| 65 | - | ||
| 66 | - response_message = save_institution @institutions | ||
| 67 | - | ||
| 68 | - if request.xhr? #User create institution | ||
| 69 | - render :json => response_message.to_json | ||
| 70 | - else #Admin create institution | ||
| 71 | - session[:notice] = response_message[:message] # consume the notice | ||
| 72 | - | ||
| 73 | - redirect_depending_on_institution_creation response_message | ||
| 74 | - end | ||
| 75 | - end | ||
| 76 | - | ||
| 77 | - def institution_already_exists | ||
| 78 | - redirect_to "/" if !request.xhr? || params[:name].blank? | ||
| 79 | - | ||
| 80 | - already_exists = !Community.where(:name=>params[:name]).empty? | ||
| 81 | - | ||
| 82 | - render :json=>already_exists.to_json | ||
| 83 | - end | ||
| 84 | - | ||
| 85 | - def get_institutions | ||
| 86 | - redirect_to "/" if !request.xhr? || params[:query].blank? | ||
| 87 | - | ||
| 88 | - list = Institution.search_institution(params[:query]).map{ |institution| | ||
| 89 | - {:value=>institution.name, :id=>institution.id} | ||
| 90 | - } | ||
| 91 | - | ||
| 92 | - render :json => list.to_json | ||
| 93 | - end | ||
| 94 | - | ||
| 95 | - def get_brazil_states | ||
| 96 | - redirect_to "/" unless request.xhr? | ||
| 97 | - | ||
| 98 | - state_list = get_state_list() | ||
| 99 | - render :json=>state_list.collect {|state| state.name }.to_json | ||
| 100 | - end | ||
| 101 | - | ||
| 102 | - def get_field_data | ||
| 103 | - condition = !request.xhr? || params[:query].nil? || params[:field].nil? | ||
| 104 | - return render :json=>{} if condition | ||
| 105 | - | ||
| 106 | - model = get_model_by_params_field | ||
| 107 | - | ||
| 108 | - data = model.where("name ILIKE ?", "%#{params[:query]}%").select("id, name") | ||
| 109 | - .collect { |db| | ||
| 110 | - {:id=>db.id, :label=>db.name} | ||
| 111 | - } | ||
| 112 | - | ||
| 113 | - other = [model.select("id, name").last].collect { |db| | ||
| 114 | - {:id=>db.id, :label=>db.name} | ||
| 115 | - } | ||
| 116 | - | ||
| 117 | - # Always has other in the list | ||
| 118 | - data |= other | ||
| 119 | - | ||
| 120 | - render :json=> data | ||
| 121 | - end | ||
| 122 | - | ||
| 123 | - protected | ||
| 124 | - | ||
| 125 | - def get_model_by_params_field | ||
| 126 | - case params[:field] | ||
| 127 | - when "software_language" | ||
| 128 | - return ProgrammingLanguage | ||
| 129 | - else | ||
| 130 | - return DatabaseDescription | ||
| 131 | - end | ||
| 132 | - end | ||
| 133 | - | ||
| 134 | - def get_state_list | ||
| 135 | - NationalRegion.find( | ||
| 136 | - :all, | ||
| 137 | - :conditions=>["national_region_type_id = ?", 2], | ||
| 138 | - :order=>"name" | ||
| 139 | - ) | ||
| 140 | - end | ||
| 141 | - | ||
| 142 | - def set_institution_type | ||
| 143 | - institution_params = params[:institutions].except(:governmental_power, | ||
| 144 | - :governmental_sphere, | ||
| 145 | - :juridical_nature | ||
| 146 | - ) | ||
| 147 | - if params[:institutions][:type] == "PublicInstitution" | ||
| 148 | - PublicInstitution::new institution_params | ||
| 149 | - else | ||
| 150 | - PrivateInstitution::new institution_params | ||
| 151 | - end | ||
| 152 | - end | ||
| 153 | - | ||
| 154 | - def set_public_institution_fields institution | ||
| 155 | - inst_fields = params[:institutions] | ||
| 156 | - | ||
| 157 | - begin | ||
| 158 | - gov_power = GovernmentalPower.find inst_fields[:governmental_power] | ||
| 159 | - gov_sphere = GovernmentalSphere.find inst_fields[:governmental_sphere] | ||
| 160 | - jur_nature = JuridicalNature.find inst_fields[:juridical_nature] | ||
| 161 | - | ||
| 162 | - institution.juridical_nature = jur_nature | ||
| 163 | - institution.governmental_power = gov_power | ||
| 164 | - institution.governmental_sphere = gov_sphere | ||
| 165 | - rescue | ||
| 166 | - institution.errors.add( | ||
| 167 | - :governmental_fields, | ||
| 168 | - _("Could not find Governmental Power or Governmental Sphere") | ||
| 169 | - ) | ||
| 170 | - end | ||
| 171 | - end | ||
| 172 | - | ||
| 173 | - def private_create_institution | ||
| 174 | - community = Community.new(params[:community]) | ||
| 175 | - community.environment = environment | ||
| 176 | - institution = set_institution_type | ||
| 177 | - | ||
| 178 | - institution.name = community[:name] | ||
| 179 | - institution.community = community | ||
| 180 | - | ||
| 181 | - if institution.type == "PublicInstitution" | ||
| 182 | - set_public_institution_fields institution | ||
| 183 | - end | ||
| 184 | - | ||
| 185 | - institution.date_modification = DateTime.now | ||
| 186 | - institution.save | ||
| 187 | - institution | ||
| 188 | - end | ||
| 189 | - | ||
| 190 | - def add_template_in_params institution_template | ||
| 191 | - com_fields = params[:community] | ||
| 192 | - if !institution_template.blank? && institution_template.is_template | ||
| 193 | - com_fields[:template_id]= institution_template.id unless com_fields.blank? | ||
| 194 | - end | ||
| 195 | - end | ||
| 196 | - | ||
| 197 | - def add_environment_admins_to_institution institution | ||
| 198 | - edit_page = params[:edit_institution_page] == false | ||
| 199 | - if environment.admins.include?(current_user.person) && edit_page | ||
| 200 | - environment.admins.each do |adm| | ||
| 201 | - institution.community.add_admin(adm) | ||
| 202 | - end | ||
| 203 | - end | ||
| 204 | - end | ||
| 205 | - | ||
| 206 | - def save_institution institution | ||
| 207 | - inst_errors = institution.errors.messages | ||
| 208 | - com_errors = institution.community.errors.messages | ||
| 209 | - | ||
| 210 | - set_errors institution | ||
| 211 | - | ||
| 212 | - if inst_errors.empty? && com_errors.empty? && institution.valid? && institution.save | ||
| 213 | - { :success => true, | ||
| 214 | - :message => _("Institution successful created!"), | ||
| 215 | - :institution_data => {:name=>institution.name, :id=>institution.id} | ||
| 216 | - } | ||
| 217 | - else | ||
| 218 | - { :success => false, | ||
| 219 | - :message => _("Institution could not be created!"), | ||
| 220 | - :errors => inst_errors.merge(com_errors) | ||
| 221 | - } | ||
| 222 | - end | ||
| 223 | - end | ||
| 224 | - | ||
| 225 | - def redirect_depending_on_institution_creation response_message | ||
| 226 | - if response_message[:success] | ||
| 227 | - redirect_to :controller => "/admin_panel", :action => "index" | ||
| 228 | - else | ||
| 229 | - flash[:errors] = response_message[:errors] | ||
| 230 | - | ||
| 231 | - redirect_to :controller => "gov_user_plugin", :action => "create_institution_admin", :params => params | ||
| 232 | - end | ||
| 233 | - end | ||
| 234 | - | ||
| 235 | - def set_errors institution | ||
| 236 | - institution.valid? if institution | ||
| 237 | - institution.community.valid? if institution.community | ||
| 238 | - | ||
| 239 | - flash[:error_community_name] = institution.community.errors.include?(:name) ? "highlight-error" : "" | ||
| 240 | - flash[:error_community_country] = institution.errors.include?(:country) ? "highlight-error" : "" | ||
| 241 | - flash[:error_community_state] = institution.errors.include?(:state) ? "highlight-error" : "" | ||
| 242 | - flash[:error_community_city] = institution.errors.include?(:city) ? "highlight-error" : "" | ||
| 243 | - flash[:error_institution_corporate_name] = institution.errors.include?(:corporate_name) ? "highlight-error" : "" | ||
| 244 | - flash[:error_institution_cnpj] = institution.errors.include?(:cnpj) ? "highlight-error" : "" | ||
| 245 | - flash[:error_institution_governmental_sphere] = institution.errors.include?(:governmental_sphere) ? "highlight-error" : "" | ||
| 246 | - flash[:error_institution_governmental_power] = institution.errors.include?(:governmental_power) ? "highlight-error" : "" | ||
| 247 | - flash[:error_institution_juridical_nature] = institution.errors.include?(:juridical_nature) ? "highlight-error" : "" | ||
| 248 | - flash[:error_institution_sisp] = institution.errors.include?(:sisp) ? "highlight-error" : "" | ||
| 249 | - end | ||
| 250 | - | ||
| 251 | -end |
src/gov_user/controllers/gov_user_plugin_myprofile_controller.rb
| @@ -1,50 +0,0 @@ | @@ -1,50 +0,0 @@ | ||
| 1 | -class GovUserPluginMyprofileController < MyProfileController | ||
| 2 | - append_view_path File.join(File.dirname(__FILE__) + '/../views') | ||
| 3 | - | ||
| 4 | - def index | ||
| 5 | - end | ||
| 6 | - | ||
| 7 | - def edit_institution | ||
| 8 | - @show_sisp_field = environment.admins.include?(current_user.person) | ||
| 9 | - @state_list = NationalRegion.find( | ||
| 10 | - :all, | ||
| 11 | - :conditions => { :national_region_type_id => 2 }, | ||
| 12 | - :order => 'name' | ||
| 13 | - ) | ||
| 14 | - @institution = @profile.institution | ||
| 15 | - update_institution if request.post? | ||
| 16 | - end | ||
| 17 | - | ||
| 18 | - private | ||
| 19 | - | ||
| 20 | - def update_institution | ||
| 21 | - @institution.community.update_attributes(params[:community]) | ||
| 22 | - @institution.update_attributes(params[:institutions].except(:governmental_power, :governmental_sphere, :juridical_nature)) | ||
| 23 | - if @institution.type == "PublicInstitution" | ||
| 24 | - begin | ||
| 25 | - governmental_updates | ||
| 26 | - rescue | ||
| 27 | - @institution.errors.add(:governmental_fields, | ||
| 28 | - _("Could not find Governmental Power or Governmental Sphere")) | ||
| 29 | - end | ||
| 30 | - end | ||
| 31 | - if @institution.valid? | ||
| 32 | - redirect_to :controller => 'profile_editor', :action => 'index', :profile => profile.identifier | ||
| 33 | - else | ||
| 34 | - flash[:errors] = @institution.errors.full_messages | ||
| 35 | - end | ||
| 36 | - end | ||
| 37 | - | ||
| 38 | - def governmental_updates | ||
| 39 | - gov_power = GovernmentalPower.find params[:institutions][:governmental_power] | ||
| 40 | - gov_sphere = GovernmentalSphere.find params[:institutions][:governmental_sphere] | ||
| 41 | - jur_nature = JuridicalNature.find params[:institutions][:juridical_nature] | ||
| 42 | - | ||
| 43 | - @institution.juridical_nature = jur_nature | ||
| 44 | - @institution.governmental_power = gov_power | ||
| 45 | - @institution.governmental_sphere = gov_sphere | ||
| 46 | - @institution.save | ||
| 47 | - end | ||
| 48 | - | ||
| 49 | - | ||
| 50 | -end |
src/gov_user/db/migrate/20140528193816_add_extra_fields_to_user.rb
| @@ -1,17 +0,0 @@ | @@ -1,17 +0,0 @@ | ||
| 1 | -class AddExtraFieldsToUser < ActiveRecord::Migration | ||
| 2 | - def self.up | ||
| 3 | - change_table :users do |t| | ||
| 4 | - t.string :secondary_email | ||
| 5 | - t.references :institution | ||
| 6 | - t.string :role | ||
| 7 | - end | ||
| 8 | - end | ||
| 9 | - | ||
| 10 | - def self.down | ||
| 11 | - change_table :users do |t| | ||
| 12 | - t.remove :secondary_email | ||
| 13 | - t.remove_references :institution | ||
| 14 | - t.remove :role | ||
| 15 | - end | ||
| 16 | - end | ||
| 17 | -end |
src/gov_user/db/migrate/20140528193835_create_institutions_table.rb
src/gov_user/db/migrate/20140617125143_add_new_fields_institution.rb
| @@ -1,27 +0,0 @@ | @@ -1,27 +0,0 @@ | ||
| 1 | -class AddNewFieldsInstitution < ActiveRecord::Migration | ||
| 2 | - def up | ||
| 3 | - add_column :institutions, :acronym, :string | ||
| 4 | - add_column :institutions, :unit_code, :integer | ||
| 5 | - add_column :institutions, :parent_code, :integer | ||
| 6 | - add_column :institutions, :unit_type, :string | ||
| 7 | - add_column :institutions, :juridical_nature, :string | ||
| 8 | - add_column :institutions, :sub_juridical_nature, :string | ||
| 9 | - add_column :institutions, :normalization_level, :string | ||
| 10 | - add_column :institutions, :version, :string | ||
| 11 | - add_column :institutions, :cnpj, :string | ||
| 12 | - add_column :institutions, :type, :string | ||
| 13 | - end | ||
| 14 | - | ||
| 15 | - def down | ||
| 16 | - remove_column :institutions, :acronym | ||
| 17 | - remove_column :institutions, :unit_code | ||
| 18 | - remove_column :institutions, :parent_code | ||
| 19 | - remove_column :institutions, :unit_type | ||
| 20 | - remove_column :institutions, :juridical_nature | ||
| 21 | - remove_column :institutions, :sub_juridical_nature | ||
| 22 | - remove_column :institutions, :normalization_level | ||
| 23 | - remove_column :institutions, :version | ||
| 24 | - remove_column :institutions, :cnpj | ||
| 25 | - remove_column :institutions, :type | ||
| 26 | - end | ||
| 27 | -end |
src/gov_user/db/migrate/20140617132133_create_governmental_spheres.rb
| @@ -1,19 +0,0 @@ | @@ -1,19 +0,0 @@ | ||
| 1 | -class CreateGovernmentalSpheres < ActiveRecord::Migration | ||
| 2 | - def change | ||
| 3 | - create_table :governmental_spheres do |t| | ||
| 4 | - t.string :name | ||
| 5 | - t.string :acronym | ||
| 6 | - t.integer :unit_code | ||
| 7 | - t.integer :parent_code | ||
| 8 | - t.string :unit_type | ||
| 9 | - t.string :juridical_nature | ||
| 10 | - t.string :sub_juridical_nature | ||
| 11 | - t.string :normalization_level | ||
| 12 | - t.string :version | ||
| 13 | - t.string :cnpj | ||
| 14 | - t.string :type | ||
| 15 | - | ||
| 16 | - t.timestamps | ||
| 17 | - end | ||
| 18 | - end | ||
| 19 | -end |
src/gov_user/db/migrate/20140617132451_create_governmental_powers.rb
src/gov_user/db/migrate/20140617134556_add_references_to_institution.rb
| @@ -1,15 +0,0 @@ | @@ -1,15 +0,0 @@ | ||
| 1 | -class AddReferencesToInstitution < ActiveRecord::Migration | ||
| 2 | - def up | ||
| 3 | - change_table :institutions do |t| | ||
| 4 | - t.references :governmental_power | ||
| 5 | - t.references :governmental_sphere | ||
| 6 | - end | ||
| 7 | - end | ||
| 8 | - | ||
| 9 | - def down | ||
| 10 | - change_table :institutions do |t| | ||
| 11 | - t.remove_references :governmental_power | ||
| 12 | - t.remove_references :governmental_sphere | ||
| 13 | - end | ||
| 14 | - end | ||
| 15 | -end |
src/gov_user/db/migrate/20140630183326_add_relation_between_community_and_institution.rb
| @@ -1,13 +0,0 @@ | @@ -1,13 +0,0 @@ | ||
| 1 | -class AddRelationBetweenCommunityAndInstitution < ActiveRecord::Migration | ||
| 2 | - def up | ||
| 3 | - change_table :institutions do |t| | ||
| 4 | - t.references :community | ||
| 5 | - end | ||
| 6 | - end | ||
| 7 | - | ||
| 8 | - def down | ||
| 9 | - change_table :institutions do |t| | ||
| 10 | - t.remove_references :community | ||
| 11 | - end | ||
| 12 | - end | ||
| 13 | -end |
src/gov_user/db/migrate/20140812143218_remove_field_role_from_user.rb
src/gov_user/db/migrate/20140814125947_add_new_fields_to_public_institution.rb
| @@ -1,11 +0,0 @@ | @@ -1,11 +0,0 @@ | ||
| 1 | -class AddNewFieldsToPublicInstitution < ActiveRecord::Migration | ||
| 2 | - def up | ||
| 3 | - add_column :institutions, :sisp, :boolean, :default => false | ||
| 4 | - remove_column :institutions, :juridical_nature | ||
| 5 | - end | ||
| 6 | - | ||
| 7 | - def down | ||
| 8 | - remove_column :institutions, :sisp | ||
| 9 | - add_column :institutions, :juridical_nature, :string | ||
| 10 | - end | ||
| 11 | -end |
src/gov_user/db/migrate/20140814131606_create_juridical_natures_table.rb
src/gov_user/db/migrate/20140814134827_add_juridical_nature_reference_to_institutions_table.rb
| @@ -1,13 +0,0 @@ | @@ -1,13 +0,0 @@ | ||
| 1 | -class AddJuridicalNatureReferenceToInstitutionsTable < ActiveRecord::Migration | ||
| 2 | - def up | ||
| 3 | - change_table :institutions do |t| | ||
| 4 | - t.references :juridical_nature | ||
| 5 | - end | ||
| 6 | - end | ||
| 7 | - | ||
| 8 | - def down | ||
| 9 | - change_table :institutions do |t| | ||
| 10 | - t.remove_references :juridical_nature | ||
| 11 | - end | ||
| 12 | - end | ||
| 13 | -end |
src/gov_user/db/migrate/20140815194530_register_institution_modification.rb
| @@ -1,13 +0,0 @@ | @@ -1,13 +0,0 @@ | ||
| 1 | -class RegisterInstitutionModification < ActiveRecord::Migration | ||
| 2 | - def up | ||
| 3 | - change_table :institutions do |t| | ||
| 4 | - t.string :date_modification | ||
| 5 | - end | ||
| 6 | - end | ||
| 7 | - | ||
| 8 | - def down | ||
| 9 | - change_table :institutions do |t| | ||
| 10 | - t.remove :date_modification | ||
| 11 | - end | ||
| 12 | - end | ||
| 13 | -end |
src/gov_user/db/migrate/20140818195821_remove_institution_from_user.rb
src/gov_user/db/migrate/20140818200738_create_institution_user_relation_table.rb
src/gov_user/db/migrate/20141103183013_add_corporate_name_to_institution.rb
src/gov_user/db/migrate/20150910135510_add_siorg_code_to_institution.rb
src/gov_user/db/migrate/20150910203559_add_institution_to_organization_rating.rb
| @@ -1,11 +0,0 @@ | @@ -1,11 +0,0 @@ | ||
| 1 | -class AddInstitutionToOrganizationRating < ActiveRecord::Migration | ||
| 2 | - def up | ||
| 3 | - change_table :organization_ratings do |t| | ||
| 4 | - t.belongs_to :institution | ||
| 5 | - end | ||
| 6 | - end | ||
| 7 | - | ||
| 8 | - def down | ||
| 9 | - remove_column :organization_ratings, :institution_id | ||
| 10 | - end | ||
| 11 | -end | ||
| 12 | \ No newline at end of file | 0 | \ No newline at end of file |
src/gov_user/db/seeds.rb
| @@ -1,19 +0,0 @@ | @@ -1,19 +0,0 @@ | ||
| 1 | -# encoding: UTF-8 | ||
| 2 | -powers = ["Executivo", "Legislativo", "Judiciário", "Não se Aplica"] | ||
| 3 | -spheres = ["Federal", "Estadual", "Distrital", "Municipal"] | ||
| 4 | -jur_natures = ["Administração Direta", "Autarquia", "Empresa Pública", "Fundação", | ||
| 5 | - "Orgão Autônomo", "Sociedade", "Sociedade Civil", | ||
| 6 | - "Sociedade de Economia Mista" | ||
| 7 | - ] | ||
| 8 | - | ||
| 9 | -powers.each do |power| | ||
| 10 | - GovernmentalPower.create(:name => power) | ||
| 11 | -end | ||
| 12 | - | ||
| 13 | -spheres.each do |sphere| | ||
| 14 | - GovernmentalSphere.create(:name => sphere) | ||
| 15 | -end | ||
| 16 | - | ||
| 17 | -jur_natures.each do |jur_nature| | ||
| 18 | - JuridicalNature.create(:name => jur_nature) | ||
| 19 | -end |
src/gov_user/features/institution_registration.feature
| @@ -1,32 +0,0 @@ | @@ -1,32 +0,0 @@ | ||
| 1 | -Feature: Institution Field | ||
| 2 | - As a user | ||
| 3 | - I want to sign up resgistring my institution | ||
| 4 | - So others users can use it | ||
| 5 | - | ||
| 6 | - Background: | ||
| 7 | - Given "GovUserPlugin" plugin is enabled | ||
| 8 | - And I am logged in as mpog_admin | ||
| 9 | - And I go to /admin/plugins | ||
| 10 | - And I check "GovUserPlugin" | ||
| 11 | - And I press "Save changes" | ||
| 12 | - And Institutions has initial default values on database | ||
| 13 | - And I am logged in as mpog_admin | ||
| 14 | - | ||
| 15 | - @selenium | ||
| 16 | - Scenario: Show new institution fields when clicked in create new institution | ||
| 17 | - Given I follow "Edit Profile" | ||
| 18 | - When I follow "Create new institution" | ||
| 19 | - And I should see "New Institution" | ||
| 20 | - And I should see "Public Institution" | ||
| 21 | - And I should see "Private Institution" | ||
| 22 | - And I should see "Corporate Name" | ||
| 23 | - And I should see "Name" | ||
| 24 | - And I should see "State" | ||
| 25 | - And I should see "City" | ||
| 26 | - And I should see "Country" | ||
| 27 | - And I should see "CNPJ" | ||
| 28 | - And I should see "Acronym" | ||
| 29 | - And I choose "Public Institution" | ||
| 30 | - Then I should see "Governmental Sphere:" | ||
| 31 | - And I should see "Governmental Power:" | ||
| 32 | - And I should see "Juridical Nature:" |
src/gov_user/features/steps_definitions/gov_user_steps.rb
| @@ -1,90 +0,0 @@ | @@ -1,90 +0,0 @@ | ||
| 1 | -Given /^Institutions has initial default values on database$/ do | ||
| 2 | - GovernmentalPower.create(:name => "Executivo") | ||
| 3 | - GovernmentalPower.create(:name => "Legislativo") | ||
| 4 | - GovernmentalPower.create(:name => "Judiciario") | ||
| 5 | - | ||
| 6 | - GovernmentalSphere.create(:name => "Federal") | ||
| 7 | - | ||
| 8 | - JuridicalNature.create(:name => "Autarquia") | ||
| 9 | - JuridicalNature.create(:name => "Administracao Direta") | ||
| 10 | - JuridicalNature.create(:name => "Empresa Publica") | ||
| 11 | - JuridicalNature.create(:name => "Fundacao") | ||
| 12 | - JuridicalNature.create(:name => "Orgao Autonomo") | ||
| 13 | - JuridicalNature.create(:name => "Sociedade") | ||
| 14 | - JuridicalNature.create(:name => "Sociedade Civil") | ||
| 15 | - JuridicalNature.create(:name => "Sociedade de Economia Mista") | ||
| 16 | - | ||
| 17 | - national_region = NationalRegion.new | ||
| 18 | - national_region.name = "Distrito Federal" | ||
| 19 | - national_region.national_region_code = '35' | ||
| 20 | - national_region.national_region_type_id = NationalRegionType::STATE | ||
| 21 | - national_region.save | ||
| 22 | -end | ||
| 23 | - | ||
| 24 | -Given /^I type in "([^"]*)" in autocomplete list "([^"]*)" and I choose "([^"]*)"$/ do |typed, input_field_selector, should_select| | ||
| 25 | -# Wait the page javascript load | ||
| 26 | -sleep 1 | ||
| 27 | -# Basicaly it, search for the input field, type something, wait for ajax end select an item | ||
| 28 | -page.driver.browser.execute_script %Q{ | ||
| 29 | - var search_query = "#{input_field_selector}.ui-autocomplete-input"; | ||
| 30 | - var input = jQuery(search_query).first(); | ||
| 31 | - | ||
| 32 | - input.trigger('click'); | ||
| 33 | - input.val('#{typed}'); | ||
| 34 | - input.trigger('keydown'); | ||
| 35 | - | ||
| 36 | - window.setTimeout(function(){ | ||
| 37 | - search_query = ".ui-menu-item a:contains('#{should_select}')"; | ||
| 38 | - var typed = jQuery(search_query).first(); | ||
| 39 | - | ||
| 40 | - typed.trigger('mouseenter').trigger('click'); | ||
| 41 | - console.log(jQuery('#license_info_id')); | ||
| 42 | - }, 1000); | ||
| 43 | - } | ||
| 44 | - sleep 1 | ||
| 45 | -end | ||
| 46 | - | ||
| 47 | -Given /^the following public institutions?$/ do |table| | ||
| 48 | - # table is a Cucumber::Ast::Table | ||
| 49 | - table.hashes.each do |item| | ||
| 50 | - community = Community.new | ||
| 51 | - community.name = item[:name] | ||
| 52 | - community.country = item[:country] | ||
| 53 | - community.state = item[:state] | ||
| 54 | - community.city = item[:city] | ||
| 55 | - community.save! | ||
| 56 | - | ||
| 57 | - governmental_power = GovernmentalPower.where(:name => item[:governmental_power]).first | ||
| 58 | - governmental_sphere = GovernmentalSphere.where(:name => item[:governmental_sphere]).first | ||
| 59 | - | ||
| 60 | - juridical_nature = JuridicalNature.create(:name => item[:juridical_nature]) | ||
| 61 | - | ||
| 62 | - institution = PublicInstitution.new(:name => item[:name], :type => "PublicInstitution", :acronym => item[:acronym], :cnpj => item[:cnpj], :juridical_nature => juridical_nature, :governmental_power => governmental_power, :governmental_sphere => governmental_sphere) | ||
| 63 | - institution.community = community | ||
| 64 | - institution.corporate_name = item[:corporate_name] | ||
| 65 | - institution.save! | ||
| 66 | - end | ||
| 67 | -end | ||
| 68 | - | ||
| 69 | -Given /^I sleep for (\d+) seconds$/ do |time| | ||
| 70 | - sleep time.to_i | ||
| 71 | -end | ||
| 72 | - | ||
| 73 | -Given /^I am logged in as mpog_admin$/ do | ||
| 74 | - visit('/account/logout') | ||
| 75 | - | ||
| 76 | - user = User.new(:login => 'admin_user', :password => '123456', :password_confirmation => '123456', :email => 'admin_user@example.com') | ||
| 77 | - person = Person.new :name=>"Mpog Admin", :identifier=>"mpog-admin" | ||
| 78 | - user.person = person | ||
| 79 | - user.save! | ||
| 80 | - | ||
| 81 | - user.activate | ||
| 82 | - e = Environment.default | ||
| 83 | - e.add_admin(user.person) | ||
| 84 | - | ||
| 85 | - visit('/account/login') | ||
| 86 | - fill_in("Username", :with => user.login) | ||
| 87 | - fill_in("Password", :with => '123456') | ||
| 88 | - click_button("Log in") | ||
| 89 | -end | ||
| 90 | - |
src/gov_user/features/user_profile_edition.feature
| @@ -1,77 +0,0 @@ | @@ -1,77 +0,0 @@ | ||
| 1 | -Feature: Institution Field | ||
| 2 | - As a user | ||
| 3 | - I want to update my update my user data | ||
| 4 | - So I can maintain my personal data updated | ||
| 5 | - | ||
| 6 | - Background: | ||
| 7 | - Given "GovUserPlugin" plugin is enabled | ||
| 8 | - And the following users | ||
| 9 | - | login | name | | ||
| 10 | - | joao | Joao Silva | | ||
| 11 | - And I am logged in as admin | ||
| 12 | - And I go to /admin/plugins | ||
| 13 | - And I check "GovUserPlugin" | ||
| 14 | - And I press "Save changes" | ||
| 15 | - And feature "skip_new_user_email_confirmation" is enabled on environment | ||
| 16 | - And I go to /admin/features/manage_fields | ||
| 17 | - And I check "person_fields_country_active" | ||
| 18 | - And I check "person_fields_state_active" | ||
| 19 | - And I check "person_fields_city_active" | ||
| 20 | - And I press "Save changes" | ||
| 21 | - And Institutions has initial default values on database | ||
| 22 | - And the following public institutions | ||
| 23 | - | name | acronym | country | state | city | cnpj | juridical_nature | governmental_power | governmental_sphere | corporate_name | | ||
| 24 | - | Ministerio das Cidades | MC | BR | DF | Gama | 58.745.189/0001-21 | Autarquia | Executivo | Federal | Ministerio das Cidades | | ||
| 25 | - | Governo do DF | GDF | BR | DF | Taguatinga | 12.645.166/0001-44 | Autarquia | Legislativo | Federal | Governo do DF | | ||
| 26 | - | Ministerio do Planejamento | MP | BR | DF | Brasilia | 41.769.591/0001-43 | Autarquia | Judiciario | Federal | Ministerio do Planejamento | | ||
| 27 | - | ||
| 28 | - Scenario: Go to control panel when clicked on 'Complete your profile' link | ||
| 29 | - Given I am logged in as "joao" | ||
| 30 | - And I am on joao's control panel | ||
| 31 | - When I follow "Complete your profile" | ||
| 32 | - Then I should see "Profile settings for " | ||
| 33 | - And I should see "Personal information" | ||
| 34 | - | ||
| 35 | - @selenium | ||
| 36 | - Scenario: Verify text information to use governmental e-mail | ||
| 37 | - Given I am logged in as "joao" | ||
| 38 | - And I am on joao's control panel | ||
| 39 | - When I follow "Edit Profile" | ||
| 40 | - Then I should see "If you work in a public agency use your government e-Mail" | ||
| 41 | - | ||
| 42 | - @selenium | ||
| 43 | - Scenario: Add more then one instituion on profile editor | ||
| 44 | - Given I am logged in as "joao" | ||
| 45 | - And I am on joao's control panel | ||
| 46 | - When I follow "Edit Profile" | ||
| 47 | - And I follow "Add new institution" | ||
| 48 | - And I type in "Minis" in autocomplete list "#input_institution" and I choose "Ministerio do Planejamento" | ||
| 49 | - And I follow "Add new institution" | ||
| 50 | - And I type in "Gover" in autocomplete list "#input_institution" and I choose "Governo do DF" | ||
| 51 | - And I follow "Add new institution" | ||
| 52 | - Then I should see "Ministerio do Planejamento" within ".institutions_added" | ||
| 53 | - And I should see "Governo do DF" within ".institutions_added" | ||
| 54 | - | ||
| 55 | - @selenium | ||
| 56 | - Scenario: Verify if field 'city' is shown when Brazil is selected | ||
| 57 | - Given I am logged in as "joao" | ||
| 58 | - And I am on joao's control panel | ||
| 59 | - When I follow "Edit Profile" | ||
| 60 | - Then I should see "City" | ||
| 61 | - | ||
| 62 | - @selenium | ||
| 63 | - Scenario: Verify if field 'city' does not appear when Brazil is not selected as country | ||
| 64 | - Given I am logged in as "joao" | ||
| 65 | - And I am on joao's control panel | ||
| 66 | - When I follow "Edit Profile" | ||
| 67 | - And I select "United States" from "profile_data_country" | ||
| 68 | - Then I should not see "City" within ".type-text" | ||
| 69 | - | ||
| 70 | - @selenium | ||
| 71 | - Scenario: Show message of institution not found | ||
| 72 | - Given I am logged in as "joao" | ||
| 73 | - And I am on joao's control panel | ||
| 74 | - When I follow "Edit Profile" | ||
| 75 | - And I fill in "input_institution" with "Some Nonexistent Institution" | ||
| 76 | - And I sleep for 1 seconds | ||
| 77 | - Then I should see "No institution found" |
src/gov_user/lib/ext/communities_block.rb
| @@ -1,45 +0,0 @@ | @@ -1,45 +0,0 @@ | ||
| 1 | -require_dependency 'communities_block' | ||
| 2 | - | ||
| 3 | -class CommunitiesBlock | ||
| 4 | - | ||
| 5 | - def profile_list | ||
| 6 | - result = get_visible_profiles | ||
| 7 | - result.slice(0..get_limit-1) | ||
| 8 | - end | ||
| 9 | - | ||
| 10 | - def profile_count | ||
| 11 | - profile_list.count | ||
| 12 | - end | ||
| 13 | - | ||
| 14 | - private | ||
| 15 | - | ||
| 16 | - def get_visible_profiles | ||
| 17 | - visible_profiles = profiles.visible.includes( | ||
| 18 | - [:image,:domains,:preferred_domain,:environment] | ||
| 19 | - ) | ||
| 20 | - | ||
| 21 | - delete_communities = [] | ||
| 22 | - valid_communities_string = Community.get_valid_communities_string | ||
| 23 | - Community.all.each{|community| delete_communities << community.id unless eval(valid_communities_string)} | ||
| 24 | - | ||
| 25 | - visible_profiles = visible_profiles.where(["profiles.id NOT IN (?)", delete_communities]) unless delete_communities.empty? | ||
| 26 | - | ||
| 27 | - if !prioritize_profiles_with_image | ||
| 28 | - return visible_profiles.all( | ||
| 29 | - :limit => get_limit, | ||
| 30 | - :order => 'profiles.updated_at DESC' | ||
| 31 | - ).sort_by {rand} | ||
| 32 | - elsif profiles.visible.with_image.count >= get_limit | ||
| 33 | - return visible_profiles.with_image.all( | ||
| 34 | - :limit => get_limit * 5, | ||
| 35 | - :order => 'profiles.updated_at DESC' | ||
| 36 | - ).sort_by {rand} | ||
| 37 | - else | ||
| 38 | - visible_profiles = visible_profiles.with_image.sort_by {rand} + | ||
| 39 | - visible_profiles.without_image.all( | ||
| 40 | - :limit => get_limit * 5, :order => 'profiles.updated_at DESC' | ||
| 41 | - ).sort_by {rand} | ||
| 42 | - return visible_profiles | ||
| 43 | - end | ||
| 44 | - end | ||
| 45 | -end |
src/gov_user/lib/ext/community.rb
| @@ -1,25 +0,0 @@ | @@ -1,25 +0,0 @@ | ||
| 1 | -require_dependency 'community' | ||
| 2 | - | ||
| 3 | -class Community | ||
| 4 | - has_one :institution, :dependent=>:destroy | ||
| 5 | - | ||
| 6 | - def institution? | ||
| 7 | - return !institution.nil? | ||
| 8 | - end | ||
| 9 | - | ||
| 10 | - def remove_of_community_search_institution? | ||
| 11 | - return institution? | ||
| 12 | - end | ||
| 13 | - | ||
| 14 | - def self.get_valid_communities_string | ||
| 15 | - remove_of_communities_methods = Community.instance_methods.select{|m| m =~ /remove_of_community_search/} | ||
| 16 | - valid_communities_string = "!(" | ||
| 17 | - remove_of_communities_methods.each do |method| | ||
| 18 | - valid_communities_string += "community.send('#{method}') || " | ||
| 19 | - end | ||
| 20 | - valid_communities_string = valid_communities_string[0..-5] | ||
| 21 | - valid_communities_string += ")" | ||
| 22 | - | ||
| 23 | - valid_communities_string | ||
| 24 | - end | ||
| 25 | -end |
src/gov_user/lib/ext/organization_rating.rb
| @@ -1,20 +0,0 @@ | @@ -1,20 +0,0 @@ | ||
| 1 | -require_dependency "organization_rating" | ||
| 2 | - | ||
| 3 | -OrganizationRating.class_eval do | ||
| 4 | - | ||
| 5 | - belongs_to :institution | ||
| 6 | - | ||
| 7 | - attr_accessible :institution, :institution_id | ||
| 8 | - | ||
| 9 | - validate :verify_institution | ||
| 10 | - | ||
| 11 | - private | ||
| 12 | - | ||
| 13 | - def verify_institution | ||
| 14 | - if self.institution != nil | ||
| 15 | - institution = Institution.find_by_id self.institution.id | ||
| 16 | - self.errors.add :institution, _("not found") unless institution | ||
| 17 | - end | ||
| 18 | - end | ||
| 19 | - | ||
| 20 | -end |
src/gov_user/lib/ext/person.rb
| @@ -1,35 +0,0 @@ | @@ -1,35 +0,0 @@ | ||
| 1 | -# encoding: utf-8 | ||
| 2 | - | ||
| 3 | -require_dependency 'person' | ||
| 4 | - | ||
| 5 | -class Person | ||
| 6 | - | ||
| 7 | - settings_items :percentage_incomplete, :type => :string, :default => "" | ||
| 8 | - | ||
| 9 | - attr_accessible :percentage_incomplete | ||
| 10 | - | ||
| 11 | - delegate :login, :to => :user, :prefix => true | ||
| 12 | - | ||
| 13 | - def institution? | ||
| 14 | - false | ||
| 15 | - end | ||
| 16 | - | ||
| 17 | - def secondary_email | ||
| 18 | - self.user.secondary_email unless self.user.nil? | ||
| 19 | - end | ||
| 20 | - | ||
| 21 | - def secondary_email= value | ||
| 22 | - self.user.secondary_email = value unless self.user.nil? | ||
| 23 | - end | ||
| 24 | - | ||
| 25 | - def institutions | ||
| 26 | - institutions = [] | ||
| 27 | - unless self.user.institutions.nil? | ||
| 28 | - self.user.institutions.each do |institution| | ||
| 29 | - institutions << institution.name | ||
| 30 | - end | ||
| 31 | - end | ||
| 32 | - institutions | ||
| 33 | - end | ||
| 34 | - | ||
| 35 | -end |
src/gov_user/lib/ext/search_controller.rb
| @@ -1,42 +0,0 @@ | @@ -1,42 +0,0 @@ | ||
| 1 | -require_dependency 'search_controller' | ||
| 2 | - | ||
| 3 | -class SearchController | ||
| 4 | - | ||
| 5 | - def communities | ||
| 6 | - delete_communities = [] | ||
| 7 | - valid_communities_string = Community.get_valid_communities_string | ||
| 8 | - Community.all.each{|community| delete_communities << community.id unless eval(valid_communities_string)} | ||
| 9 | - | ||
| 10 | - @scope = visible_profiles(Community) | ||
| 11 | - @scope = @scope.where(["id NOT IN (?)", delete_communities]) unless delete_communities.empty? | ||
| 12 | - | ||
| 13 | - full_text_search | ||
| 14 | - end | ||
| 15 | - | ||
| 16 | - def institutions | ||
| 17 | - @titles[:institutions] = _("Institution Catalog") | ||
| 18 | - results = filter_communities_list{|community| community.institution?} | ||
| 19 | - results = results.paginate(:per_page => 24, :page => params[:page]) | ||
| 20 | - @searches[@asset] = {:results => results} | ||
| 21 | - @search = results | ||
| 22 | - end | ||
| 23 | - | ||
| 24 | - def filter_communities_list | ||
| 25 | - unfiltered_list = visible_profiles(Community) | ||
| 26 | - | ||
| 27 | - unless params[:query].nil? | ||
| 28 | - unfiltered_list = unfiltered_list.select do |com| | ||
| 29 | - com.name.downcase =~ /#{params[:query].downcase}/ | ||
| 30 | - end | ||
| 31 | - end | ||
| 32 | - | ||
| 33 | - communities_list = [] | ||
| 34 | - unfiltered_list.each do |profile| | ||
| 35 | - if profile.class == Community && !profile.is_template? && yield(profile) | ||
| 36 | - communities_list << profile | ||
| 37 | - end | ||
| 38 | - end | ||
| 39 | - | ||
| 40 | - communities_list | ||
| 41 | - end | ||
| 42 | -end |
src/gov_user/lib/ext/search_helper.rb
src/gov_user/lib/ext/user.rb
| @@ -1,60 +0,0 @@ | @@ -1,60 +0,0 @@ | ||
| 1 | -require_dependency 'user' | ||
| 2 | - | ||
| 3 | -class User | ||
| 4 | - | ||
| 5 | - GOV_SUFFIX = /^.*@[gov.br|jus.br|leg.br|mp.br]+$/ | ||
| 6 | - | ||
| 7 | - has_and_belongs_to_many :institutions | ||
| 8 | - | ||
| 9 | - validate :email_different_secondary?, :email_has_already_been_used?, | ||
| 10 | - :secondary_email_format | ||
| 11 | - | ||
| 12 | - scope :primary_or_secondary_email_already_used?, lambda { |email| | ||
| 13 | - where("email=? OR secondary_email=?", email, email) | ||
| 14 | - } | ||
| 15 | - | ||
| 16 | - def email_different_secondary? | ||
| 17 | - self.errors.add( | ||
| 18 | - :base, | ||
| 19 | - _("Email must be different from secondary email.") | ||
| 20 | - ) if self.email == self.secondary_email | ||
| 21 | - end | ||
| 22 | - | ||
| 23 | - def email_has_already_been_used? | ||
| 24 | - user_already_saved = User.find(:first, | ||
| 25 | - :conditions => ["email = ?", self.email]) | ||
| 26 | - | ||
| 27 | - if user_already_saved.nil? | ||
| 28 | - primary_email_hasnt_been_used = | ||
| 29 | - User.primary_or_secondary_email_already_used?(self.email).empty? | ||
| 30 | - | ||
| 31 | - if !self.secondary_email.nil? and self.secondary_email.empty? | ||
| 32 | - self.secondary_email = nil | ||
| 33 | - end | ||
| 34 | - | ||
| 35 | - secondary_email_hasnt_been_used = | ||
| 36 | - User.primary_or_secondary_email_already_used?(self.secondary_email). | ||
| 37 | - empty? | ||
| 38 | - | ||
| 39 | - if !primary_email_hasnt_been_used or !secondary_email_hasnt_been_used | ||
| 40 | - self.errors.add(:base, _("E-mail or secondary e-mail already taken.")) | ||
| 41 | - end | ||
| 42 | - end | ||
| 43 | - end | ||
| 44 | - | ||
| 45 | - def secondary_email_format | ||
| 46 | - if !self.secondary_email.nil? and self.secondary_email.length > 0 | ||
| 47 | - test = /\A[^@]+@([^@\.]+\.)+[^@\.]+\z/ | ||
| 48 | - | ||
| 49 | - unless test.match(self.secondary_email) | ||
| 50 | - self.errors.add(:base, _("Invalid secondary email format.")) | ||
| 51 | - end | ||
| 52 | - end | ||
| 53 | - end | ||
| 54 | - | ||
| 55 | - private | ||
| 56 | - | ||
| 57 | - def valid_format?(value, string_format) | ||
| 58 | - !value.nil? && value.length > 0 && !string_format.match(value).nil? | ||
| 59 | - end | ||
| 60 | -end |
src/gov_user/lib/gov_user_plugin.rb
| @@ -1,332 +0,0 @@ | @@ -1,332 +0,0 @@ | ||
| 1 | -class GovUserPlugin < Noosfero::Plugin | ||
| 2 | - include ActionView::Helpers::TagHelper | ||
| 3 | - include ActionView::Helpers::FormTagHelper | ||
| 4 | - include ActionView::Helpers::FormOptionsHelper | ||
| 5 | - include ActionView::Helpers::JavaScriptHelper | ||
| 6 | - include ActionView::Helpers::AssetTagHelper | ||
| 7 | - include FormsHelper | ||
| 8 | - include ActionView::Helpers | ||
| 9 | - include ActionDispatch::Routing | ||
| 10 | - include Rails.application.routes.url_helpers | ||
| 11 | - | ||
| 12 | - def self.plugin_name | ||
| 13 | - "GovUserPlugin" | ||
| 14 | - end | ||
| 15 | - | ||
| 16 | - def self.plugin_description | ||
| 17 | - _("Add features related to Brazilian government.") | ||
| 18 | - end | ||
| 19 | - | ||
| 20 | - def stylesheet? | ||
| 21 | - true | ||
| 22 | - end | ||
| 23 | - | ||
| 24 | - # Hotspot to insert html without an especific hotspot on view. | ||
| 25 | - def body_beginning | ||
| 26 | - return if context.session[:user].nil? or context.session[:hide_incomplete_percentage] == true | ||
| 27 | - | ||
| 28 | - person = context.environment.people.where(:user_id=>context.session[:user]).first | ||
| 29 | - | ||
| 30 | - if context.profile && context.profile.person? and !person.nil? | ||
| 31 | - @person = person | ||
| 32 | - @percentege = calc_percentage_registration(person) | ||
| 33 | - | ||
| 34 | - if @percentege >= 0 and @percentege < 100 | ||
| 35 | - expanded_template('incomplete_registration.html.erb') | ||
| 36 | - end | ||
| 37 | - end | ||
| 38 | - end | ||
| 39 | - | ||
| 40 | - def profile_editor_transaction_extras | ||
| 41 | - single_hash_transactions = { :user => 'user', | ||
| 42 | - :instituton => 'instituton' | ||
| 43 | - } | ||
| 44 | - | ||
| 45 | - single_hash_transactions.each do |model, transaction| | ||
| 46 | - call_model_transaction(model, transaction) | ||
| 47 | - end | ||
| 48 | - end | ||
| 49 | - | ||
| 50 | - def profile_editor_controller_filters | ||
| 51 | - block = proc do | ||
| 52 | - if request.post? && params[:institution] | ||
| 53 | - is_admin = environment.admins.include?(current_user.person) | ||
| 54 | - | ||
| 55 | - unless is_admin | ||
| 56 | - institution = profile.user.institutions | ||
| 57 | - | ||
| 58 | - if !params[:institution].blank? && params[:institution].class == Hash && !params[:institution][:sisp].nil? | ||
| 59 | - if params[:institution][:sisp] != institution.sisp | ||
| 60 | - params[:institution][:sisp] = institution.sisp | ||
| 61 | - end | ||
| 62 | - end | ||
| 63 | - end | ||
| 64 | - end | ||
| 65 | - end | ||
| 66 | - | ||
| 67 | - [{ | ||
| 68 | - :type => 'before_filter', | ||
| 69 | - :method_name => 'validate_institution_sisp_field_access', | ||
| 70 | - :options => { :only => :edit }, | ||
| 71 | - :block => block | ||
| 72 | - }] | ||
| 73 | - end | ||
| 74 | - | ||
| 75 | - def profile_tabs | ||
| 76 | - if context.profile.community? | ||
| 77 | - return profile_tabs_institution if context.profile.institution? | ||
| 78 | - end | ||
| 79 | - end | ||
| 80 | - | ||
| 81 | - def control_panel_buttons | ||
| 82 | - if context.profile.institution? | ||
| 83 | - return institution_info_button | ||
| 84 | - end | ||
| 85 | - end | ||
| 86 | - | ||
| 87 | - def self.extra_blocks | ||
| 88 | - { | ||
| 89 | - InstitutionsBlock => { :type => [Environment, Person] } | ||
| 90 | - } | ||
| 91 | - end | ||
| 92 | - | ||
| 93 | - def custom_user_registration_attributes(user) | ||
| 94 | - return if context.params[:user][:institution_ids].nil? | ||
| 95 | - context.params[:user][:institution_ids].delete('') | ||
| 96 | - | ||
| 97 | - update_user_institutions(user) | ||
| 98 | - | ||
| 99 | - user.institutions.each do |institution| | ||
| 100 | - community = institution.community | ||
| 101 | - community.add_member user.person | ||
| 102 | - end | ||
| 103 | - end | ||
| 104 | - | ||
| 105 | - def profile_editor_extras | ||
| 106 | - profile = context.profile | ||
| 107 | - | ||
| 108 | - if profile.person? | ||
| 109 | - expanded_template('person_editor_extras.html.erb') | ||
| 110 | - end | ||
| 111 | - end | ||
| 112 | - | ||
| 113 | - | ||
| 114 | - def calc_percentage_registration(person) | ||
| 115 | - required_list = profile_required_list | ||
| 116 | - empty_fields = profile_required_empty_list person | ||
| 117 | - count = required_list[:person_fields].count + | ||
| 118 | - required_list[:user_fields].count | ||
| 119 | - percentege = 100 - ((empty_fields.count * 100) / count) | ||
| 120 | - person.percentage_incomplete = percentege | ||
| 121 | - person.save(validate: false) | ||
| 122 | - percentege | ||
| 123 | - end | ||
| 124 | - | ||
| 125 | - def stylesheet? | ||
| 126 | - true | ||
| 127 | - end | ||
| 128 | - | ||
| 129 | - def admin_panel_links | ||
| 130 | - [ | ||
| 131 | - { | ||
| 132 | - :title => _('Create Institution'), | ||
| 133 | - :url => { | ||
| 134 | - :controller => 'gov_user_plugin', | ||
| 135 | - :action => 'create_institution_admin' | ||
| 136 | - } | ||
| 137 | - } | ||
| 138 | - ] | ||
| 139 | - end | ||
| 140 | - | ||
| 141 | - | ||
| 142 | - def js_files | ||
| 143 | - %w( | ||
| 144 | - vendor/modulejs-1.5.0.min.js | ||
| 145 | - vendor/jquery.js | ||
| 146 | - lib/noosfero-root.js | ||
| 147 | - lib/select-element.js | ||
| 148 | - lib/select-field-choices.js | ||
| 149 | - views/complete-registration.js | ||
| 150 | - views/control-panel.js | ||
| 151 | - views/create-institution.js | ||
| 152 | - views/new-community.js | ||
| 153 | - views/user-edit-profile.js | ||
| 154 | - views/gov-user-comments-extra-fields.js | ||
| 155 | - initializer.js | ||
| 156 | - app.js | ||
| 157 | - ) | ||
| 158 | - end | ||
| 159 | - | ||
| 160 | - def admin_panel_links | ||
| 161 | - [ | ||
| 162 | - { | ||
| 163 | - :title => _('Create Institution'), | ||
| 164 | - :url => { | ||
| 165 | - :controller => 'gov_user_plugin', | ||
| 166 | - :action => 'create_institution_admin' | ||
| 167 | - } | ||
| 168 | - } | ||
| 169 | - ] | ||
| 170 | - end | ||
| 171 | - | ||
| 172 | - protected | ||
| 173 | - | ||
| 174 | - def profile_required_list | ||
| 175 | - fields = {} | ||
| 176 | - fields[:person_fields] = %w(cell_phone | ||
| 177 | - contact_phone | ||
| 178 | - comercial_phone | ||
| 179 | - country | ||
| 180 | - city | ||
| 181 | - state | ||
| 182 | - organization_website | ||
| 183 | - image | ||
| 184 | - identifier | ||
| 185 | - name) | ||
| 186 | - | ||
| 187 | - fields[:user_fields] = %w(secondary_email email) | ||
| 188 | - fields | ||
| 189 | - end | ||
| 190 | - | ||
| 191 | - def profile_required_empty_list(person) | ||
| 192 | - empty_fields = [] | ||
| 193 | - required_list = profile_required_list | ||
| 194 | - | ||
| 195 | - required_list[:person_fields].each do |field| | ||
| 196 | - empty_fields << field.sub('_',' ') if person.send(field).blank? | ||
| 197 | - end | ||
| 198 | - required_list[:user_fields].each do |field| | ||
| 199 | - empty_fields << field.sub('_',' ') if person.user.send(field).blank? | ||
| 200 | - end | ||
| 201 | - empty_fields | ||
| 202 | - end | ||
| 203 | - | ||
| 204 | - | ||
| 205 | - protected | ||
| 206 | - | ||
| 207 | - def user_transaction | ||
| 208 | - user_editor_institution_actions | ||
| 209 | - | ||
| 210 | - User.transaction do | ||
| 211 | - context.profile.user.update_attributes!(context.params[:user]) | ||
| 212 | - end | ||
| 213 | - end | ||
| 214 | - | ||
| 215 | - def institution_transaction | ||
| 216 | - institution.date_modification = DateTime.now | ||
| 217 | - institution.save | ||
| 218 | - institution_models = %w(governmental_power governmental_sphere | ||
| 219 | - juridical_nature) | ||
| 220 | - | ||
| 221 | - institution_models.each do |model| | ||
| 222 | - call_institution_transaction(model) | ||
| 223 | - end | ||
| 224 | - | ||
| 225 | - if context.params.has_key?(:institution) | ||
| 226 | - Institution.transaction do | ||
| 227 | - context.profile. | ||
| 228 | - institution. | ||
| 229 | - update_attributes!(context.params[:institution]) | ||
| 230 | - end | ||
| 231 | - end | ||
| 232 | - end | ||
| 233 | - | ||
| 234 | - def organization_ratings_plugin_comments_extra_fields | ||
| 235 | - Proc::new do render :file => 'ratings_extra_field' end | ||
| 236 | - end | ||
| 237 | - | ||
| 238 | - def organization_ratings_plugin_extra_fields_show_data user_rating | ||
| 239 | - gov_user_self = self | ||
| 240 | - | ||
| 241 | - Proc::new { | ||
| 242 | - if logged_in? | ||
| 243 | - is_admin = environment.admins.include?(current_user.person) | ||
| 244 | - is_admin ||= user_rating.organization.admins.include?(current_user.person) | ||
| 245 | - | ||
| 246 | - if is_admin and gov_user_self.context.profile.software? | ||
| 247 | - render :file => 'organization_ratings_extra_fields_show_institution', | ||
| 248 | - :locals => {:user_rating => user_rating} | ||
| 249 | - end | ||
| 250 | - end | ||
| 251 | - } | ||
| 252 | - end | ||
| 253 | - | ||
| 254 | - private | ||
| 255 | - | ||
| 256 | - def call_model_transaction(model,name) | ||
| 257 | - send(name + '_transaction') if context.params.key?(model.to_sym) | ||
| 258 | - end | ||
| 259 | - | ||
| 260 | - def call_institution_transaction(model) | ||
| 261 | - context.profile.institution.send(model + '_id = ', | ||
| 262 | - context.params[model.to_sym]) | ||
| 263 | - context.profile.institution.save! | ||
| 264 | - end | ||
| 265 | - | ||
| 266 | - # Add and remove the user from it's institutions communities | ||
| 267 | - def user_editor_institution_actions | ||
| 268 | - user = context.profile.user | ||
| 269 | - | ||
| 270 | - old_communities = [] | ||
| 271 | - context.profile.user.institutions.each do |institution| | ||
| 272 | - old_communities << institution.community | ||
| 273 | - end | ||
| 274 | - | ||
| 275 | - new_communities = [] | ||
| 276 | - unless context.params[:user][:institution_ids].nil? | ||
| 277 | - context.params[:user][:institution_ids].delete('') | ||
| 278 | - | ||
| 279 | - context.params[:user][:institution_ids].each do |id| | ||
| 280 | - new_communities << Institution.find(id).community | ||
| 281 | - end | ||
| 282 | - end | ||
| 283 | - | ||
| 284 | - manage_user_institutions(user, old_communities, new_communities) | ||
| 285 | - end | ||
| 286 | - | ||
| 287 | - def institution_info_button | ||
| 288 | - { | ||
| 289 | - :title => _('Institution Info'), | ||
| 290 | - :icon => 'edit-profile-group control-panel-instituton-link', | ||
| 291 | - :url => { | ||
| 292 | - :controller => 'gov_user_plugin_myprofile', | ||
| 293 | - :action => 'edit_institution' | ||
| 294 | - } | ||
| 295 | - } | ||
| 296 | - end | ||
| 297 | - | ||
| 298 | - def manage_user_institutions(user, old_communities, new_communities) | ||
| 299 | - leave_communities = (old_communities - new_communities) | ||
| 300 | - enter_communities = (new_communities - old_communities) | ||
| 301 | - | ||
| 302 | - leave_communities.each do |community| | ||
| 303 | - community.remove_member(user.person) | ||
| 304 | - user.institutions.delete(community.institution) | ||
| 305 | - end | ||
| 306 | - | ||
| 307 | - enter_communities.each do |community| | ||
| 308 | - community.add_member(user.person) | ||
| 309 | - user.institutions << community.institution | ||
| 310 | - end | ||
| 311 | - end | ||
| 312 | - | ||
| 313 | - def profile_tabs_institution | ||
| 314 | - { :title => _('Institution'), | ||
| 315 | - :id => 'intitution-fields', | ||
| 316 | - :content => Proc::new do render :partial => 'profile/institution_tab' end, | ||
| 317 | - :start => true | ||
| 318 | - } | ||
| 319 | - end | ||
| 320 | - | ||
| 321 | - def update_user_institutions(user) | ||
| 322 | - context.params[:user][:institution_ids].each do |institution_id| | ||
| 323 | - institution = Institution.find institution_id | ||
| 324 | - user.institutions << institution | ||
| 325 | - | ||
| 326 | - if institution.community.admins.blank? | ||
| 327 | - institution.community.add_admin(user.person) | ||
| 328 | - end | ||
| 329 | - end | ||
| 330 | - user.save unless user.institution_ids.empty? | ||
| 331 | - end | ||
| 332 | -end |
src/gov_user/lib/governmental_power.rb
| @@ -1,13 +0,0 @@ | @@ -1,13 +0,0 @@ | ||
| 1 | -class GovernmentalPower < ActiveRecord::Base | ||
| 2 | - attr_accessible :name | ||
| 3 | - | ||
| 4 | - validates :name, :presence=>true, :uniqueness=>true | ||
| 5 | - has_many :institutions | ||
| 6 | - | ||
| 7 | - def public_institutions | ||
| 8 | - Institution.where( | ||
| 9 | - :type=>"PublicInstitution", | ||
| 10 | - :governmental_power_id=>self.id | ||
| 11 | - ) | ||
| 12 | - end | ||
| 13 | -end |
src/gov_user/lib/governmental_sphere.rb
src/gov_user/lib/institution.rb
| @@ -1,107 +0,0 @@ | @@ -1,107 +0,0 @@ | ||
| 1 | -class Institution < ActiveRecord::Base | ||
| 2 | - has_many :comments | ||
| 3 | - | ||
| 4 | - SEARCH_FILTERS = { | ||
| 5 | - :order => %w[], | ||
| 6 | - :display => %w[compact] | ||
| 7 | - } | ||
| 8 | - | ||
| 9 | - def self.default_search_display | ||
| 10 | - 'compact' | ||
| 11 | - end | ||
| 12 | - | ||
| 13 | - belongs_to :governmental_power | ||
| 14 | - belongs_to :governmental_sphere | ||
| 15 | - belongs_to :juridical_nature | ||
| 16 | - | ||
| 17 | - has_and_belongs_to_many :users | ||
| 18 | - | ||
| 19 | - attr_accessible :name, :acronym, :unit_code, :parent_code, :unit_type, | ||
| 20 | - :sub_juridical_nature, :normalization_level, | ||
| 21 | - :version, :cnpj, :type, :governmental_power, | ||
| 22 | - :governmental_sphere, :sisp, :juridical_nature, | ||
| 23 | - :corporate_name, :siorg_code, :community | ||
| 24 | - | ||
| 25 | - validates :name, :presence=>true, :uniqueness=>true | ||
| 26 | - | ||
| 27 | - before_save :verify_institution_type | ||
| 28 | - | ||
| 29 | - belongs_to :community | ||
| 30 | - | ||
| 31 | - scope :search_institution, lambda{ |value| | ||
| 32 | - where("name ilike ? OR acronym ilike ?", "%#{value}%", "%#{value}%" ) | ||
| 33 | - } | ||
| 34 | - | ||
| 35 | - validate :validate_country, :validate_state, :validate_city, | ||
| 36 | - :verify_institution_type, :validate_format_cnpj | ||
| 37 | - | ||
| 38 | - | ||
| 39 | - protected | ||
| 40 | - | ||
| 41 | - def verify_institution_type | ||
| 42 | - valid_institutions_type = ["PublicInstitution", "PrivateInstitution"] | ||
| 43 | - | ||
| 44 | - unless valid_institutions_type.include? self.type | ||
| 45 | - self.errors.add( | ||
| 46 | - :type, | ||
| 47 | - _("invalid, only public and private institutions are allowed.") | ||
| 48 | - ) | ||
| 49 | - | ||
| 50 | - return false | ||
| 51 | - end | ||
| 52 | - | ||
| 53 | - return true | ||
| 54 | - end | ||
| 55 | - | ||
| 56 | - def validate_country | ||
| 57 | - unless self.community.blank? | ||
| 58 | - if self.community.country.blank? && self.errors[:country].blank? | ||
| 59 | - self.errors.add(:country, _("can't be blank")) | ||
| 60 | - return false | ||
| 61 | - end | ||
| 62 | - end | ||
| 63 | - | ||
| 64 | - return true | ||
| 65 | - end | ||
| 66 | - | ||
| 67 | - def validate_state | ||
| 68 | - unless self.community.blank? | ||
| 69 | - if self.community.country == "BR" && | ||
| 70 | - (self.community.state.blank? || self.community.state == "-1") && | ||
| 71 | - self.errors[:state].blank? | ||
| 72 | - | ||
| 73 | - self.errors.add(:state, _("can't be blank")) | ||
| 74 | - return false | ||
| 75 | - end | ||
| 76 | - end | ||
| 77 | - | ||
| 78 | - return true | ||
| 79 | - end | ||
| 80 | - | ||
| 81 | - def validate_city | ||
| 82 | - unless self.community.blank? | ||
| 83 | - if self.community.country == "BR" && self.community.city.blank? && | ||
| 84 | - self.errors[:city].blank? | ||
| 85 | - | ||
| 86 | - self.errors.add(:city, _("can't be blank")) | ||
| 87 | - return false | ||
| 88 | - end | ||
| 89 | - end | ||
| 90 | - | ||
| 91 | - return true | ||
| 92 | - end | ||
| 93 | - | ||
| 94 | - def validate_format_cnpj | ||
| 95 | - return true if self.community.blank? && self.community.country != "BR" | ||
| 96 | - return true if self.cnpj.blank? | ||
| 97 | - | ||
| 98 | - format = /^\d{2}\.\d{3}\.\d{3}\/\d{4}\-\d{2}$/ | ||
| 99 | - | ||
| 100 | - if !self.cnpj.blank? && format.match(self.cnpj) | ||
| 101 | - return true | ||
| 102 | - else | ||
| 103 | - self.errors.add(:cnpj, _("invalid format")) | ||
| 104 | - return false | ||
| 105 | - end | ||
| 106 | - end | ||
| 107 | -end |
src/gov_user/lib/institutions_block.rb
| @@ -1,71 +0,0 @@ | @@ -1,71 +0,0 @@ | ||
| 1 | -class InstitutionsBlock < CommunitiesBlock | ||
| 2 | - | ||
| 3 | - def self.description | ||
| 4 | - _('Institutions') | ||
| 5 | - end | ||
| 6 | - | ||
| 7 | - def profile_count | ||
| 8 | - profile_list.count | ||
| 9 | - end | ||
| 10 | - | ||
| 11 | - def default_title | ||
| 12 | - n_('{#} institution', '{#} institutions', profile_count) | ||
| 13 | - end | ||
| 14 | - | ||
| 15 | - def help | ||
| 16 | - _('This block displays the institutions in which the user is a member.') | ||
| 17 | - end | ||
| 18 | - | ||
| 19 | - def footer | ||
| 20 | - owner = self.owner | ||
| 21 | - case owner | ||
| 22 | - when Profile | ||
| 23 | - lambda do |context| | ||
| 24 | - link_to s_('institutions|View all'), :profile => owner.identifier, | ||
| 25 | - :controller => 'profile', :action => 'communities', | ||
| 26 | - :type => 'Institution' | ||
| 27 | - end | ||
| 28 | - when Environment | ||
| 29 | - lambda do |context| | ||
| 30 | - link_to s_('institutions|View all'), :controller => 'search', | ||
| 31 | - :action => 'communities', :type => 'Institution' | ||
| 32 | - end | ||
| 33 | - else | ||
| 34 | - '' | ||
| 35 | - end | ||
| 36 | - end | ||
| 37 | - | ||
| 38 | - def profile_list | ||
| 39 | - result = get_visible_profiles | ||
| 40 | - | ||
| 41 | - result = result.select { |p| p.class == Community && p.institution? } | ||
| 42 | - | ||
| 43 | - result.slice(0..get_limit-1) | ||
| 44 | - end | ||
| 45 | - | ||
| 46 | - def profiles | ||
| 47 | - owner.communities | ||
| 48 | - end | ||
| 49 | - | ||
| 50 | - private | ||
| 51 | - | ||
| 52 | - def get_visible_profiles | ||
| 53 | - include_list = [:image,:domains,:preferred_domain,:environment] | ||
| 54 | - visible_profiles = profiles.visible.includes(include_list) | ||
| 55 | - | ||
| 56 | - if !prioritize_profiles_with_image | ||
| 57 | - visible_profiles.all(:limit => get_limit, | ||
| 58 | - :order => 'profiles.updated_at DESC' | ||
| 59 | - ).sort_by{ rand } | ||
| 60 | - elsif profiles.visible.with_image.count >= get_limit | ||
| 61 | - visible_profiles.with_image.all(:limit => get_limit * 5, | ||
| 62 | - :order => 'profiles.updated_at DESC' | ||
| 63 | - ).sort_by{ rand } | ||
| 64 | - else | ||
| 65 | - visible_profiles.with_image.sort_by{ rand } + | ||
| 66 | - visible_profiles.without_image.all(:limit => get_limit * 5, | ||
| 67 | - :order => 'profiles.updated_at DESC' | ||
| 68 | - ).sort_by{ rand } | ||
| 69 | - end | ||
| 70 | - end | ||
| 71 | -end |
src/gov_user/lib/institutions_users.rb
src/gov_user/lib/juridical_nature.rb
| @@ -1,15 +0,0 @@ | @@ -1,15 +0,0 @@ | ||
| 1 | -class JuridicalNature < ActiveRecord::Base | ||
| 2 | - attr_accessible :name | ||
| 3 | - | ||
| 4 | - has_many :institutions | ||
| 5 | - | ||
| 6 | - validates_presence_of :name | ||
| 7 | - validates_uniqueness_of :name | ||
| 8 | - | ||
| 9 | - def public_institutions | ||
| 10 | - Institution.where( | ||
| 11 | - :type=>"PublicInstitution", | ||
| 12 | - :juridical_nature_id=>self.id | ||
| 13 | - ) | ||
| 14 | - end | ||
| 15 | -end |
src/gov_user/lib/private_institution.rb
src/gov_user/lib/public_institution.rb
| @@ -1,13 +0,0 @@ | @@ -1,13 +0,0 @@ | ||
| 1 | -class PublicInstitution < Institution | ||
| 2 | - validates :governmental_power, :governmental_sphere, :juridical_nature, | ||
| 3 | - :presence=>true | ||
| 4 | - | ||
| 5 | - validates :acronym, :allow_blank => true, :allow_nil => true, | ||
| 6 | - :uniqueness=>true | ||
| 7 | - | ||
| 8 | - validates_format_of( | ||
| 9 | - :cnpj, | ||
| 10 | - :with => /^\d{2}\.\d{3}\.\d{3}\/\d{4}\-\d{2}$/, | ||
| 11 | - :allow_nil => true, :allow_blank => true | ||
| 12 | - ) | ||
| 13 | -end |
src/gov_user/po/gov_user.pot
| @@ -1,356 +0,0 @@ | @@ -1,356 +0,0 @@ | ||
| 1 | -# SOME DESCRIPTIVE TITLE. | ||
| 2 | -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER | ||
| 3 | -# This file is distributed under the same license as the PACKAGE package. | ||
| 4 | -# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | ||
| 5 | -# | ||
| 6 | -#, fuzzy | ||
| 7 | -msgid "" | ||
| 8 | -msgstr "" | ||
| 9 | -"Project-Id-Version: 1.2-141-g2924904\n" | ||
| 10 | -"POT-Creation-Date: 2015-09-11 17:06-0000\n" | ||
| 11 | -"PO-Revision-Date: 2015-09-01 20:59-0000\n" | ||
| 12 | -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
| 13 | -"Language-Team: LANGUAGE <LL@li.org>\n" | ||
| 14 | -"Language: \n" | ||
| 15 | -"MIME-Version: 1.0\n" | ||
| 16 | -"Content-Type: text/plain; charset=UTF-8\n" | ||
| 17 | -"Content-Transfer-Encoding: 8bit\n" | ||
| 18 | -"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" | ||
| 19 | - | ||
| 20 | -#: plugins/gov_user/lib/ext/search_controller.rb:17 | ||
| 21 | -msgid "Institution Catalog" | ||
| 22 | -msgstr "" | ||
| 23 | - | ||
| 24 | -#: plugins/gov_user/lib/ext/user.rb:19 | ||
| 25 | -msgid "Email must be different from secondary email." | ||
| 26 | -msgstr "" | ||
| 27 | - | ||
| 28 | -#: plugins/gov_user/lib/ext/user.rb:40 | ||
| 29 | -msgid "E-mail or secondary e-mail already taken." | ||
| 30 | -msgstr "" | ||
| 31 | - | ||
| 32 | -#: plugins/gov_user/lib/ext/user.rb:50 | ||
| 33 | -msgid "Invalid secondary email format." | ||
| 34 | -msgstr "" | ||
| 35 | - | ||
| 36 | -#: plugins/gov_user/lib/ext/organization_rating.rb:16 | ||
| 37 | -msgid "not found" | ||
| 38 | -msgstr "" | ||
| 39 | - | ||
| 40 | -#: plugins/gov_user/lib/gov_user_plugin.rb:17 | ||
| 41 | -msgid "Add features related to Brazilian government." | ||
| 42 | -msgstr "" | ||
| 43 | - | ||
| 44 | -#: plugins/gov_user/lib/gov_user_plugin.rb:132 | ||
| 45 | -#: plugins/gov_user/lib/gov_user_plugin.rb:163 | ||
| 46 | -msgid "Create Institution" | ||
| 47 | -msgstr "" | ||
| 48 | - | ||
| 49 | -#: plugins/gov_user/lib/gov_user_plugin.rb:287 | ||
| 50 | -msgid "Institution Info" | ||
| 51 | -msgstr "" | ||
| 52 | - | ||
| 53 | -#: plugins/gov_user/lib/gov_user_plugin.rb:312 | ||
| 54 | -msgid "Institution" | ||
| 55 | -msgstr "" | ||
| 56 | - | ||
| 57 | -#: plugins/gov_user/lib/institutions_block.rb:4 | ||
| 58 | -#: plugins/gov_user/views/person_editor_extras.html.erb:11 | ||
| 59 | -msgid "Institutions" | ||
| 60 | -msgstr "" | ||
| 61 | - | ||
| 62 | -#: plugins/gov_user/lib/institutions_block.rb:12 | ||
| 63 | -msgid "{#} institution" | ||
| 64 | -msgid_plural "{#} institutions" | ||
| 65 | -msgstr[0] "" | ||
| 66 | -msgstr[1] "" | ||
| 67 | - | ||
| 68 | -#: plugins/gov_user/lib/institutions_block.rb:16 | ||
| 69 | -msgid "This block displays the institutions in which the user is a member." | ||
| 70 | -msgstr "" | ||
| 71 | - | ||
| 72 | -#: plugins/gov_user/lib/institutions_block.rb:24 | ||
| 73 | -#: plugins/gov_user/lib/institutions_block.rb:30 | ||
| 74 | -msgid "institutions|View all" | ||
| 75 | -msgstr "" | ||
| 76 | - | ||
| 77 | -#: plugins/gov_user/lib/institution.rb:47 | ||
| 78 | -msgid "invalid, only public and private institutions are allowed." | ||
| 79 | -msgstr "" | ||
| 80 | - | ||
| 81 | -#: plugins/gov_user/lib/institution.rb:59 | ||
| 82 | -#: plugins/gov_user/lib/institution.rb:73 | ||
| 83 | -#: plugins/gov_user/lib/institution.rb:86 | ||
| 84 | -msgid "can't be blank" | ||
| 85 | -msgstr "" | ||
| 86 | - | ||
| 87 | -#: plugins/gov_user/lib/institution.rb:103 | ||
| 88 | -msgid "invalid format" | ||
| 89 | -msgstr "" | ||
| 90 | - | ||
| 91 | -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:18 | ||
| 92 | -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:43 | ||
| 93 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:83 | ||
| 94 | -msgid "Select a Governmental Sphere" | ||
| 95 | -msgstr "" | ||
| 96 | - | ||
| 97 | -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:19 | ||
| 98 | -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:44 | ||
| 99 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:90 | ||
| 100 | -msgid "Select a Governmental Power" | ||
| 101 | -msgstr "" | ||
| 102 | - | ||
| 103 | -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:20 | ||
| 104 | -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:45 | ||
| 105 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:96 | ||
| 106 | -msgid "Select a Juridical Nature" | ||
| 107 | -msgstr "" | ||
| 108 | - | ||
| 109 | -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:21 | ||
| 110 | -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:46 | ||
| 111 | -msgid "Select a state" | ||
| 112 | -msgstr "" | ||
| 113 | - | ||
| 114 | -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:168 | ||
| 115 | -#: plugins/gov_user/controllers/gov_user_plugin_myprofile_controller.rb:26 | ||
| 116 | -msgid "Could not find Governmental Power or Governmental Sphere" | ||
| 117 | -msgstr "" | ||
| 118 | - | ||
| 119 | -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:214 | ||
| 120 | -msgid "Institution successful created!" | ||
| 121 | -msgstr "" | ||
| 122 | - | ||
| 123 | -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:219 | ||
| 124 | -msgid "Institution could not be created!" | ||
| 125 | -msgstr "" | ||
| 126 | - | ||
| 127 | -#: plugins/gov_user/test/unit/gov_user_person_test.rb:50 | ||
| 128 | -#: plugins/gov_user/test/unit/gov_user_person_test.rb:56 | ||
| 129 | -msgid "Name Should begin with a capital letter and no special characters" | ||
| 130 | -msgstr "" | ||
| 131 | - | ||
| 132 | -#: plugins/gov_user/views/search/institutions.html.erb:3 | ||
| 133 | -msgid "Type words about the %s you're looking for" | ||
| 134 | -msgstr "" | ||
| 135 | - | ||
| 136 | -#: plugins/gov_user/views/ratings_extra_field.html.erb:2 | ||
| 137 | -msgid "Organization name or Enterprise name" | ||
| 138 | -msgstr "" | ||
| 139 | - | ||
| 140 | -#: plugins/gov_user/views/ratings_extra_field.html.erb:6 | ||
| 141 | -#: plugins/gov_user/views/person_editor_extras.html.erb:21 | ||
| 142 | -msgid "No institution found" | ||
| 143 | -msgstr "" | ||
| 144 | - | ||
| 145 | -#: plugins/gov_user/views/incomplete_registration.html.erb:3 | ||
| 146 | -msgid "Complete Profile" | ||
| 147 | -msgstr "" | ||
| 148 | - | ||
| 149 | -#: plugins/gov_user/views/incomplete_registration.html.erb:6 | ||
| 150 | -msgid "Complete your profile" | ||
| 151 | -msgstr "" | ||
| 152 | - | ||
| 153 | -#: plugins/gov_user/views/incomplete_registration.html.erb:7 | ||
| 154 | -msgid "Hide" | ||
| 155 | -msgstr "" | ||
| 156 | - | ||
| 157 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:1 | ||
| 158 | -msgid "Edit Institution" | ||
| 159 | -msgstr "" | ||
| 160 | - | ||
| 161 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:5 | ||
| 162 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:5 | ||
| 163 | -msgid "" | ||
| 164 | -"Note that the creation of communities in this environment is restricted. " | ||
| 165 | -"Your request to create this new community will be sent to %{environment} " | ||
| 166 | -"administrators and will be approved or rejected according to their methods " | ||
| 167 | -"and criteria." | ||
| 168 | -msgstr "" | ||
| 169 | - | ||
| 170 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:11 | ||
| 171 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:11 | ||
| 172 | -msgid "\"Can`t create new Institution: #{flash[:errors].length} errors\"" | ||
| 173 | -msgstr "" | ||
| 174 | - | ||
| 175 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:24 | ||
| 176 | -msgid "All fields with (*) are mandatory" | ||
| 177 | -msgstr "" | ||
| 178 | - | ||
| 179 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:31 | ||
| 180 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:37 | ||
| 181 | -msgid "Public Institution" | ||
| 182 | -msgstr "" | ||
| 183 | - | ||
| 184 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:36 | ||
| 185 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:33 | ||
| 186 | -msgid "Private Institution" | ||
| 187 | -msgstr "" | ||
| 188 | - | ||
| 189 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:43 | ||
| 190 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:44 | ||
| 191 | -msgid "Institution name already exists" | ||
| 192 | -msgstr "" | ||
| 193 | - | ||
| 194 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:47 | ||
| 195 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:48 | ||
| 196 | -msgid "Corporate Name" | ||
| 197 | -msgstr "" | ||
| 198 | - | ||
| 199 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:52 | ||
| 200 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:53 | ||
| 201 | -msgid "Country" | ||
| 202 | -msgstr "" | ||
| 203 | - | ||
| 204 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:56 | ||
| 205 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:57 | ||
| 206 | -msgid "State" | ||
| 207 | -msgstr "" | ||
| 208 | - | ||
| 209 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:66 | ||
| 210 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:66 | ||
| 211 | -msgid "CNPJ" | ||
| 212 | -msgstr "" | ||
| 213 | - | ||
| 214 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:73 | ||
| 215 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:75 | ||
| 216 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:72 | ||
| 217 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:74 | ||
| 218 | -msgid "Acronym" | ||
| 219 | -msgstr "" | ||
| 220 | - | ||
| 221 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:74 | ||
| 222 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:73 | ||
| 223 | -msgid "Fantasy name" | ||
| 224 | -msgstr "" | ||
| 225 | - | ||
| 226 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:82 | ||
| 227 | -#: plugins/gov_user/views/profile/_institution_tab.html.erb:17 | ||
| 228 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:81 | ||
| 229 | -msgid "Governmental Sphere:" | ||
| 230 | -msgstr "" | ||
| 231 | - | ||
| 232 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:89 | ||
| 233 | -#: plugins/gov_user/views/profile/_institution_tab.html.erb:16 | ||
| 234 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:88 | ||
| 235 | -msgid "Governmental Power:" | ||
| 236 | -msgstr "" | ||
| 237 | - | ||
| 238 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:95 | ||
| 239 | -#: plugins/gov_user/views/profile/_institution_tab.html.erb:18 | ||
| 240 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:94 | ||
| 241 | -msgid "Juridical Nature:" | ||
| 242 | -msgstr "" | ||
| 243 | - | ||
| 244 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:102 | ||
| 245 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:101 | ||
| 246 | -msgid "SISP?" | ||
| 247 | -msgstr "" | ||
| 248 | - | ||
| 249 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:104 | ||
| 250 | -#: plugins/gov_user/views/profile/_institution_tab.html.erb:19 | ||
| 251 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:104 | ||
| 252 | -msgid "Yes" | ||
| 253 | -msgstr "" | ||
| 254 | - | ||
| 255 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:106 | ||
| 256 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:109 | ||
| 257 | -#: plugins/gov_user/views/profile/_institution_tab.html.erb:19 | ||
| 258 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:106 | ||
| 259 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:108 | ||
| 260 | -msgid "No" | ||
| 261 | -msgstr "" | ||
| 262 | - | ||
| 263 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:114 | ||
| 264 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:114 | ||
| 265 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:118 | ||
| 266 | -msgid "Save" | ||
| 267 | -msgstr "" | ||
| 268 | - | ||
| 269 | -#: plugins/gov_user/views/person_editor_extras.html.erb:2 | ||
| 270 | -msgid "Secondary e-mail" | ||
| 271 | -msgstr "" | ||
| 272 | - | ||
| 273 | -#: plugins/gov_user/views/person_editor_extras.html.erb:22 | ||
| 274 | -msgid "Add new institution" | ||
| 275 | -msgstr "" | ||
| 276 | - | ||
| 277 | -#: plugins/gov_user/views/person_editor_extras.html.erb:23 | ||
| 278 | -msgid "Create new institution" | ||
| 279 | -msgstr "" | ||
| 280 | - | ||
| 281 | -#: plugins/gov_user/views/person_editor_extras.html.erb:39 | ||
| 282 | -msgid "Should begin with a capital letter and no special characters" | ||
| 283 | -msgstr "" | ||
| 284 | - | ||
| 285 | -#: plugins/gov_user/views/person_editor_extras.html.erb:40 | ||
| 286 | -msgid "Email should have the following format: name@host.br" | ||
| 287 | -msgstr "" | ||
| 288 | - | ||
| 289 | -#: plugins/gov_user/views/person_editor_extras.html.erb:41 | ||
| 290 | -msgid "Site should have a valid format: http://name.hosts" | ||
| 291 | -msgstr "" | ||
| 292 | - | ||
| 293 | -#: plugins/gov_user/views/person_editor_extras.html.erb:42 | ||
| 294 | -msgid "If you work in a public agency use your government e-Mail" | ||
| 295 | -msgstr "" | ||
| 296 | - | ||
| 297 | -#: plugins/gov_user/views/profile/_institution_tab.html.erb:3 | ||
| 298 | -msgid "Institution Information" | ||
| 299 | -msgstr "" | ||
| 300 | - | ||
| 301 | -#: plugins/gov_user/views/profile/_institution_tab.html.erb:6 | ||
| 302 | -msgid "Type:" | ||
| 303 | -msgstr "" | ||
| 304 | - | ||
| 305 | -#: plugins/gov_user/views/profile/_institution_tab.html.erb:7 | ||
| 306 | -msgid "CNPJ:" | ||
| 307 | -msgstr "" | ||
| 308 | - | ||
| 309 | -#: plugins/gov_user/views/profile/_institution_tab.html.erb:8 | ||
| 310 | -msgid "Last modification:" | ||
| 311 | -msgstr "" | ||
| 312 | - | ||
| 313 | -#: plugins/gov_user/views/profile/_institution_tab.html.erb:9 | ||
| 314 | -msgid "Country:" | ||
| 315 | -msgstr "" | ||
| 316 | - | ||
| 317 | -#: plugins/gov_user/views/profile/_institution_tab.html.erb:10 | ||
| 318 | -msgid "State:" | ||
| 319 | -msgstr "" | ||
| 320 | - | ||
| 321 | -#: plugins/gov_user/views/profile/_institution_tab.html.erb:11 | ||
| 322 | -msgid "City:" | ||
| 323 | -msgstr "" | ||
| 324 | - | ||
| 325 | -#: plugins/gov_user/views/profile/_institution_tab.html.erb:13 | ||
| 326 | -msgid "Fantasy Name:" | ||
| 327 | -msgstr "" | ||
| 328 | - | ||
| 329 | -#: plugins/gov_user/views/profile/_institution_tab.html.erb:15 | ||
| 330 | -msgid "Acronym:" | ||
| 331 | -msgstr "" | ||
| 332 | - | ||
| 333 | -#: plugins/gov_user/views/profile/_institution_tab.html.erb:19 | ||
| 334 | -msgid "SISP:" | ||
| 335 | -msgstr "" | ||
| 336 | - | ||
| 337 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:1 | ||
| 338 | -msgid "New Institution" | ||
| 339 | -msgstr "" | ||
| 340 | - | ||
| 341 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:16 | ||
| 342 | -msgid "\"<b>#{key_name.capitalize}</b> #{value.join()}\"" | ||
| 343 | -msgstr "" | ||
| 344 | - | ||
| 345 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:115 | ||
| 346 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:119 | ||
| 347 | -msgid "Cancel" | ||
| 348 | -msgstr "" | ||
| 349 | - | ||
| 350 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:121 | ||
| 351 | -msgid "Could not send the form data to the server" | ||
| 352 | -msgstr "" | ||
| 353 | - | ||
| 354 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:128 | ||
| 355 | -msgid "Creating institution" | ||
| 356 | -msgstr "" |
src/gov_user/po/pt/gov_user.po
| @@ -1,370 +0,0 @@ | @@ -1,370 +0,0 @@ | ||
| 1 | -# SOME DESCRIPTIVE TITLE. | ||
| 2 | -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER | ||
| 3 | -# This file is distributed under the same license as the PACKAGE package. | ||
| 4 | -# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | ||
| 5 | -# | ||
| 6 | -msgid "" | ||
| 7 | -msgstr "" | ||
| 8 | -"Project-Id-Version: 1.2-143-g8dfded9\n" | ||
| 9 | -"POT-Creation-Date: 2015-09-11 17:14-0000\n" | ||
| 10 | -"PO-Revision-Date: 2015-09-01 19:55-0000\n" | ||
| 11 | -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
| 12 | -"Language-Team: LANGUAGE <LL@li.org>\n" | ||
| 13 | -"Language: \n" | ||
| 14 | -"MIME-Version: 1.0\n" | ||
| 15 | -"Content-Type: text/plain; charset=UTF-8\n" | ||
| 16 | -"Content-Transfer-Encoding: 8bit\n" | ||
| 17 | -"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" | ||
| 18 | - | ||
| 19 | -#: plugins/gov_user/test/unit/gov_user_person_test.rb:50 | ||
| 20 | -#: plugins/gov_user/test/unit/gov_user_person_test.rb:56 | ||
| 21 | -msgid "Name Should begin with a capital letter and no special characters" | ||
| 22 | -msgstr "" | ||
| 23 | -"Nome deve iniciar com letrar maiúscula e não deve conter carateres especiais" | ||
| 24 | - | ||
| 25 | -#: plugins/gov_user/controllers/gov_user_plugin_myprofile_controller.rb:26 | ||
| 26 | -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:168 | ||
| 27 | -msgid "Could not find Governmental Power or Governmental Sphere" | ||
| 28 | -msgstr "Não foi possível encontrar o Poder ou Esfera Governamental" | ||
| 29 | - | ||
| 30 | -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:18 | ||
| 31 | -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:43 | ||
| 32 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:83 | ||
| 33 | -msgid "Select a Governmental Sphere" | ||
| 34 | -msgstr "Selecione uma Esfera Governamental" | ||
| 35 | - | ||
| 36 | -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:19 | ||
| 37 | -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:44 | ||
| 38 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:90 | ||
| 39 | -msgid "Select a Governmental Power" | ||
| 40 | -msgstr "Selecione um Poder Governamental" | ||
| 41 | - | ||
| 42 | -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:20 | ||
| 43 | -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:45 | ||
| 44 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:96 | ||
| 45 | -msgid "Select a Juridical Nature" | ||
| 46 | -msgstr "Seleciona uma Natureza Jurídica" | ||
| 47 | - | ||
| 48 | -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:21 | ||
| 49 | -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:46 | ||
| 50 | -msgid "Select a state" | ||
| 51 | -msgstr "Selecione um Estado" | ||
| 52 | - | ||
| 53 | -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:214 | ||
| 54 | -msgid "Institution successful created!" | ||
| 55 | -msgstr "Instituição criada com sucesso!" | ||
| 56 | - | ||
| 57 | -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:219 | ||
| 58 | -msgid "Institution could not be created!" | ||
| 59 | -msgstr "Instituição não pode ser criada!" | ||
| 60 | - | ||
| 61 | -#: plugins/gov_user/lib/gov_user_plugin.rb:17 | ||
| 62 | -msgid "Add features related to Brazilian government." | ||
| 63 | -msgstr "Adicionar funcionlidade relacionada com o governo brasileiro." | ||
| 64 | - | ||
| 65 | -#: plugins/gov_user/lib/gov_user_plugin.rb:132 | ||
| 66 | -#: plugins/gov_user/lib/gov_user_plugin.rb:163 | ||
| 67 | -msgid "Create Institution" | ||
| 68 | -msgstr "Criar Instituição" | ||
| 69 | - | ||
| 70 | -#: plugins/gov_user/lib/gov_user_plugin.rb:287 | ||
| 71 | -msgid "Institution Info" | ||
| 72 | -msgstr "Informações da Instituição" | ||
| 73 | - | ||
| 74 | -#: plugins/gov_user/lib/gov_user_plugin.rb:312 | ||
| 75 | -msgid "Institution" | ||
| 76 | -msgstr "Instituição" | ||
| 77 | - | ||
| 78 | -#: plugins/gov_user/lib/institution.rb:47 | ||
| 79 | -msgid "invalid, only public and private institutions are allowed." | ||
| 80 | -msgstr "Inválido, somente instituições públicas e privadas são permitidas." | ||
| 81 | - | ||
| 82 | -#: plugins/gov_user/lib/institution.rb:59 | ||
| 83 | -#: plugins/gov_user/lib/institution.rb:73 | ||
| 84 | -#: plugins/gov_user/lib/institution.rb:86 | ||
| 85 | -msgid "can't be blank" | ||
| 86 | -msgstr "não pode ficar em branco" | ||
| 87 | - | ||
| 88 | -#: plugins/gov_user/lib/institution.rb:103 | ||
| 89 | -msgid "invalid format" | ||
| 90 | -msgstr "formato inválido" | ||
| 91 | - | ||
| 92 | -#: plugins/gov_user/lib/ext/user.rb:19 | ||
| 93 | -msgid "Email must be different from secondary email." | ||
| 94 | -msgstr "Email deve ser diferente do email secundário" | ||
| 95 | - | ||
| 96 | -#: plugins/gov_user/lib/ext/user.rb:40 | ||
| 97 | -msgid "E-mail or secondary e-mail already taken." | ||
| 98 | -msgstr "Email ou email secundário já estão sendo utilizados." | ||
| 99 | - | ||
| 100 | -#: plugins/gov_user/lib/ext/user.rb:50 | ||
| 101 | -msgid "Invalid secondary email format." | ||
| 102 | -msgstr "Formato inválido do email sencundário" | ||
| 103 | - | ||
| 104 | -#: plugins/gov_user/lib/ext/search_controller.rb:17 | ||
| 105 | -msgid "Institution Catalog" | ||
| 106 | -msgstr "Catálogo de Instituições" | ||
| 107 | - | ||
| 108 | -#: plugins/gov_user/lib/ext/organization_rating.rb:16 | ||
| 109 | -msgid "not found" | ||
| 110 | -msgstr "não encontrada" | ||
| 111 | - | ||
| 112 | -#: plugins/gov_user/lib/institutions_block.rb:4 | ||
| 113 | -#: plugins/gov_user/views/person_editor_extras.html.erb:11 | ||
| 114 | -msgid "Institutions" | ||
| 115 | -msgstr "Instituições" | ||
| 116 | - | ||
| 117 | -#: plugins/gov_user/lib/institutions_block.rb:12 | ||
| 118 | -msgid "{#} institution" | ||
| 119 | -msgid_plural "{#} institutions" | ||
| 120 | -msgstr[0] "{#} instituição" | ||
| 121 | -msgstr[1] "{#} instituições" | ||
| 122 | - | ||
| 123 | -#: plugins/gov_user/lib/institutions_block.rb:16 | ||
| 124 | -msgid "This block displays the institutions in which the user is a member." | ||
| 125 | -msgstr "Esse bloco mostra as instituições em que o usuário faz parte." | ||
| 126 | - | ||
| 127 | -#: plugins/gov_user/lib/institutions_block.rb:24 | ||
| 128 | -#: plugins/gov_user/lib/institutions_block.rb:30 | ||
| 129 | -msgid "institutions|View all" | ||
| 130 | -msgstr "instituições|Ver todas" | ||
| 131 | - | ||
| 132 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:1 | ||
| 133 | -msgid "Edit Institution" | ||
| 134 | -msgstr "Editar Instituição" | ||
| 135 | - | ||
| 136 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:5 | ||
| 137 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:5 | ||
| 138 | -msgid "" | ||
| 139 | -"Note that the creation of communities in this environment is restricted. " | ||
| 140 | -"Your request to create this new community will be sent to %{environment} " | ||
| 141 | -"administrators and will be approved or rejected according to their methods " | ||
| 142 | -"and criteria." | ||
| 143 | -msgstr "" | ||
| 144 | -"Note que a criação de comunidades neste ambiente é restrita. Sua requisição " | ||
| 145 | -"para criar essa nova comunidade será enviada para os administradores " | ||
| 146 | -"%{environment} e será aprovada ou rejeitada de acordo com seus métodos e " | ||
| 147 | -"critérios." | ||
| 148 | - | ||
| 149 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:11 | ||
| 150 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:11 | ||
| 151 | -msgid "\"Can`t create new Institution: #{flash[:errors].length} errors\"" | ||
| 152 | -msgstr "" | ||
| 153 | -"\"Não foi possível criar nova Instituição: #{flash[:errors].length} erros\"" | ||
| 154 | - | ||
| 155 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:24 | ||
| 156 | -msgid "All fields with (*) are mandatory" | ||
| 157 | -msgstr "Todos os campos com (*) são obrigatórios" | ||
| 158 | - | ||
| 159 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:31 | ||
| 160 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:37 | ||
| 161 | -msgid "Public Institution" | ||
| 162 | -msgstr "Instituição Pública" | ||
| 163 | - | ||
| 164 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:36 | ||
| 165 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:33 | ||
| 166 | -msgid "Private Institution" | ||
| 167 | -msgstr "Instituição Privada" | ||
| 168 | - | ||
| 169 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:43 | ||
| 170 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:44 | ||
| 171 | -msgid "Institution name already exists" | ||
| 172 | -msgstr "Nome de Instituição já existe" | ||
| 173 | - | ||
| 174 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:47 | ||
| 175 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:48 | ||
| 176 | -msgid "Corporate Name" | ||
| 177 | -msgstr "Nome da Coorporação" | ||
| 178 | - | ||
| 179 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:52 | ||
| 180 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:53 | ||
| 181 | -msgid "Country" | ||
| 182 | -msgstr "País" | ||
| 183 | - | ||
| 184 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:56 | ||
| 185 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:57 | ||
| 186 | -msgid "State" | ||
| 187 | -msgstr "Estado" | ||
| 188 | - | ||
| 189 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:66 | ||
| 190 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:66 | ||
| 191 | -msgid "CNPJ" | ||
| 192 | -msgstr "CNPJ" | ||
| 193 | - | ||
| 194 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:73 | ||
| 195 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:75 | ||
| 196 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:72 | ||
| 197 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:74 | ||
| 198 | -msgid "Acronym" | ||
| 199 | -msgstr "Sigla" | ||
| 200 | - | ||
| 201 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:74 | ||
| 202 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:73 | ||
| 203 | -msgid "Fantasy name" | ||
| 204 | -msgstr "Nome Fantasia" | ||
| 205 | - | ||
| 206 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:82 | ||
| 207 | -#: plugins/gov_user/views/profile/_institution_tab.html.erb:17 | ||
| 208 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:81 | ||
| 209 | -msgid "Governmental Sphere:" | ||
| 210 | -msgstr "Esfera Governamental:" | ||
| 211 | - | ||
| 212 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:89 | ||
| 213 | -#: plugins/gov_user/views/profile/_institution_tab.html.erb:16 | ||
| 214 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:88 | ||
| 215 | -msgid "Governmental Power:" | ||
| 216 | -msgstr "Poder Governamental:" | ||
| 217 | - | ||
| 218 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:95 | ||
| 219 | -#: plugins/gov_user/views/profile/_institution_tab.html.erb:18 | ||
| 220 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:94 | ||
| 221 | -msgid "Juridical Nature:" | ||
| 222 | -msgstr "Natureza Jurídica:" | ||
| 223 | - | ||
| 224 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:102 | ||
| 225 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:101 | ||
| 226 | -msgid "SISP?" | ||
| 227 | -msgstr "SISP?" | ||
| 228 | - | ||
| 229 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:104 | ||
| 230 | -#: plugins/gov_user/views/profile/_institution_tab.html.erb:19 | ||
| 231 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:104 | ||
| 232 | -msgid "Yes" | ||
| 233 | -msgstr "Sim" | ||
| 234 | - | ||
| 235 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:106 | ||
| 236 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:109 | ||
| 237 | -#: plugins/gov_user/views/profile/_institution_tab.html.erb:19 | ||
| 238 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:106 | ||
| 239 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:108 | ||
| 240 | -msgid "No" | ||
| 241 | -msgstr "Não" | ||
| 242 | - | ||
| 243 | -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:114 | ||
| 244 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:114 | ||
| 245 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:118 | ||
| 246 | -msgid "Save" | ||
| 247 | -msgstr "Salvar" | ||
| 248 | - | ||
| 249 | -#: plugins/gov_user/views/profile/_institution_tab.html.erb:3 | ||
| 250 | -msgid "Institution Information" | ||
| 251 | -msgstr "Informação da Instituição" | ||
| 252 | - | ||
| 253 | -#: plugins/gov_user/views/profile/_institution_tab.html.erb:6 | ||
| 254 | -msgid "Type:" | ||
| 255 | -msgstr "Tipo:" | ||
| 256 | - | ||
| 257 | -#: plugins/gov_user/views/profile/_institution_tab.html.erb:7 | ||
| 258 | -msgid "CNPJ:" | ||
| 259 | -msgstr "CNPJ:" | ||
| 260 | - | ||
| 261 | -#: plugins/gov_user/views/profile/_institution_tab.html.erb:8 | ||
| 262 | -msgid "Last modification:" | ||
| 263 | -msgstr "Última modificação:" | ||
| 264 | - | ||
| 265 | -#: plugins/gov_user/views/profile/_institution_tab.html.erb:9 | ||
| 266 | -msgid "Country:" | ||
| 267 | -msgstr "País:" | ||
| 268 | - | ||
| 269 | -#: plugins/gov_user/views/profile/_institution_tab.html.erb:10 | ||
| 270 | -msgid "State:" | ||
| 271 | -msgstr "Estado:" | ||
| 272 | - | ||
| 273 | -#: plugins/gov_user/views/profile/_institution_tab.html.erb:11 | ||
| 274 | -msgid "City:" | ||
| 275 | -msgstr "Cidade:" | ||
| 276 | - | ||
| 277 | -#: plugins/gov_user/views/profile/_institution_tab.html.erb:13 | ||
| 278 | -msgid "Fantasy Name:" | ||
| 279 | -msgstr "Nome Fantasia:" | ||
| 280 | - | ||
| 281 | -#: plugins/gov_user/views/profile/_institution_tab.html.erb:15 | ||
| 282 | -msgid "Acronym:" | ||
| 283 | -msgstr "Sigla:" | ||
| 284 | - | ||
| 285 | -#: plugins/gov_user/views/profile/_institution_tab.html.erb:19 | ||
| 286 | -msgid "SISP:" | ||
| 287 | -msgstr "SISP:" | ||
| 288 | - | ||
| 289 | -#: plugins/gov_user/views/ratings_extra_field.html.erb:2 | ||
| 290 | -msgid "Organization name or Enterprise name" | ||
| 291 | -msgstr "Nome da organização ou empresa" | ||
| 292 | - | ||
| 293 | -#: plugins/gov_user/views/ratings_extra_field.html.erb:6 | ||
| 294 | -#: plugins/gov_user/views/person_editor_extras.html.erb:21 | ||
| 295 | -msgid "No institution found" | ||
| 296 | -msgstr "Nenhuma instituição encontrada" | ||
| 297 | - | ||
| 298 | -#: plugins/gov_user/views/person_editor_extras.html.erb:2 | ||
| 299 | -msgid "Secondary e-mail" | ||
| 300 | -msgstr "Email secundário" | ||
| 301 | - | ||
| 302 | -#: plugins/gov_user/views/person_editor_extras.html.erb:22 | ||
| 303 | -msgid "Add new institution" | ||
| 304 | -msgstr "Adicionar nova instituição" | ||
| 305 | - | ||
| 306 | -#: plugins/gov_user/views/person_editor_extras.html.erb:23 | ||
| 307 | -msgid "Create new institution" | ||
| 308 | -msgstr "Criar nova instituição" | ||
| 309 | - | ||
| 310 | -#: plugins/gov_user/views/person_editor_extras.html.erb:39 | ||
| 311 | -msgid "Should begin with a capital letter and no special characters" | ||
| 312 | -msgstr "Deve começar com letra maíscula e não conter caracteres especiais" | ||
| 313 | - | ||
| 314 | -#: plugins/gov_user/views/person_editor_extras.html.erb:40 | ||
| 315 | -msgid "Email should have the following format: name@host.br" | ||
| 316 | -msgstr "Email deve ter o seguinte formato: name@host.br" | ||
| 317 | - | ||
| 318 | -#: plugins/gov_user/views/person_editor_extras.html.erb:41 | ||
| 319 | -msgid "Site should have a valid format: http://name.hosts" | ||
| 320 | -msgstr "Site deve ter um formato válido: http://name.hosts" | ||
| 321 | - | ||
| 322 | -#: plugins/gov_user/views/person_editor_extras.html.erb:42 | ||
| 323 | -msgid "If you work in a public agency use your government e-Mail" | ||
| 324 | -msgstr "Se você trabalha em uma agência pública use seu email governamental" | ||
| 325 | - | ||
| 326 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:1 | ||
| 327 | -msgid "New Institution" | ||
| 328 | -msgstr "Nova Instituição" | ||
| 329 | - | ||
| 330 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:16 | ||
| 331 | -msgid "\"<b>#{key_name.capitalize}</b> #{value.join()}\"" | ||
| 332 | -msgstr "\"<b>#{key_name.capitalize}</b> #{value.join()}\"" | ||
| 333 | - | ||
| 334 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:115 | ||
| 335 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:119 | ||
| 336 | -msgid "Cancel" | ||
| 337 | -msgstr "Cancelar" | ||
| 338 | - | ||
| 339 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:121 | ||
| 340 | -msgid "Could not send the form data to the server" | ||
| 341 | -msgstr "Não foi possível enviar os dados do formulário para o servidor" | ||
| 342 | - | ||
| 343 | -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:128 | ||
| 344 | -msgid "Creating institution" | ||
| 345 | -msgstr "Criar instituição" | ||
| 346 | - | ||
| 347 | -#: plugins/gov_user/views/search/institutions.html.erb:3 | ||
| 348 | -msgid "Type words about the %s you're looking for" | ||
| 349 | -msgstr "Escreve palavras sobre o %s que você está procurando" | ||
| 350 | - | ||
| 351 | -#: plugins/gov_user/views/incomplete_registration.html.erb:3 | ||
| 352 | -msgid "Complete Profile" | ||
| 353 | -msgstr "Complete o Perfil" | ||
| 354 | - | ||
| 355 | -#: plugins/gov_user/views/incomplete_registration.html.erb:6 | ||
| 356 | -msgid "Complete your profile" | ||
| 357 | -msgstr "Complete seu perfil" | ||
| 358 | - | ||
| 359 | -#: plugins/gov_user/views/incomplete_registration.html.erb:7 | ||
| 360 | -msgid "Hide" | ||
| 361 | -msgstr "Ocultar" | ||
| 362 | - | ||
| 363 | -#~ msgid "A plugin that does this and that." | ||
| 364 | -#~ msgstr "Um plugin que faz isso e aquilo" | ||
| 365 | - | ||
| 366 | -#~ msgid "The governamental email must be the primary one." | ||
| 367 | -#~ msgstr "O email governamental deve ser o principal" | ||
| 368 | - | ||
| 369 | -#~ msgid "Institution is obligatory if user has a government email." | ||
| 370 | -#~ msgstr "Instituição é obrigatória se o usuário tem email governamental." |
src/gov_user/public/app.js
src/gov_user/public/initializer.js
| @@ -1,33 +0,0 @@ | @@ -1,33 +0,0 @@ | ||
| 1 | -(function() { | ||
| 2 | - 'use strict'; | ||
| 3 | - | ||
| 4 | - var dependencies = [ | ||
| 5 | - 'ControlPanel', | ||
| 6 | - 'CreateInstitution', | ||
| 7 | - 'CompleteRegistration', | ||
| 8 | - 'UserEditProfile', | ||
| 9 | - 'NewCommunity', | ||
| 10 | - 'GovUserCommentsExtraFields' | ||
| 11 | - ]; | ||
| 12 | - | ||
| 13 | - | ||
| 14 | - modulejs.define('Initializer', dependencies, function() { | ||
| 15 | - var __dependencies = arguments; | ||
| 16 | - | ||
| 17 | - | ||
| 18 | - function call_dependency(dependency) { | ||
| 19 | - if( dependency.isCurrentPage() ) { | ||
| 20 | - dependency.init(); | ||
| 21 | - } | ||
| 22 | - } | ||
| 23 | - | ||
| 24 | - | ||
| 25 | - return { | ||
| 26 | - init: function() { | ||
| 27 | - for(var i=0, len = __dependencies.length; i < len; i++) { | ||
| 28 | - call_dependency(__dependencies[i]); | ||
| 29 | - } | ||
| 30 | - } | ||
| 31 | - }; | ||
| 32 | - }); | ||
| 33 | -})(); |
src/gov_user/public/lib/noosfero-root.js
src/gov_user/public/lib/select-element.js
| @@ -1,35 +0,0 @@ | @@ -1,35 +0,0 @@ | ||
| 1 | -modulejs.define('SelectElement', function() { | ||
| 2 | - 'use strict'; | ||
| 3 | - | ||
| 4 | - | ||
| 5 | - function SelectElement(name, id) { | ||
| 6 | - this.select = document.createElement("select"); | ||
| 7 | - } | ||
| 8 | - | ||
| 9 | - | ||
| 10 | - SelectElement.prototype.setAttr = function(attr, value) { | ||
| 11 | - return this.select.setAttribute(attr, value); | ||
| 12 | - }; | ||
| 13 | - | ||
| 14 | - | ||
| 15 | - SelectElement.prototype.addOption = function(option) { | ||
| 16 | - return this.select.add(option); | ||
| 17 | - }; | ||
| 18 | - | ||
| 19 | - | ||
| 20 | - SelectElement.prototype.getSelect = function() { | ||
| 21 | - return this.select; | ||
| 22 | - }; | ||
| 23 | - | ||
| 24 | - | ||
| 25 | - SelectElement.generateOption = function(value, text) { | ||
| 26 | - var option; | ||
| 27 | - option = document.createElement("option"); | ||
| 28 | - option.setAttribute("value", value); | ||
| 29 | - option.text = text; | ||
| 30 | - return option; | ||
| 31 | - }; | ||
| 32 | - | ||
| 33 | - | ||
| 34 | - return SelectElement; | ||
| 35 | -}); |
src/gov_user/public/lib/select-field-choices.js
| @@ -1,81 +0,0 @@ | @@ -1,81 +0,0 @@ | ||
| 1 | -modulejs.define('SelectFieldChoices', ['jquery', 'SelectElement'], function($, SelectElement) { | ||
| 2 | - 'use strict'; | ||
| 3 | - | ||
| 4 | - | ||
| 5 | - function SelectFieldChoices(state_id, city_id, state_url) { | ||
| 6 | - this.state_id = state_id; | ||
| 7 | - this.input_html = $(state_id).parent().html(); | ||
| 8 | - this.old_value = $(state_id).val(); | ||
| 9 | - this.city_parent_div = $(city_id).parent().parent().parent(); | ||
| 10 | - this.state_url = state_url; | ||
| 11 | - } | ||
| 12 | - | ||
| 13 | - | ||
| 14 | - SelectFieldChoices.prototype.getCurrentStateElement = function() { | ||
| 15 | - return $(this.state_id); | ||
| 16 | - }; | ||
| 17 | - | ||
| 18 | - | ||
| 19 | - SelectFieldChoices.prototype.replaceWith = function(html) { | ||
| 20 | - var parent_div = this.getCurrentStateElement().parent(); | ||
| 21 | - parent_div.html(html); | ||
| 22 | - }; | ||
| 23 | - | ||
| 24 | - | ||
| 25 | - SelectFieldChoices.prototype.generateSelect = function(state_list) { | ||
| 26 | - var select_element, option; | ||
| 27 | - | ||
| 28 | - select_element = new SelectElement(); | ||
| 29 | - select_element.setAttr("name", "profile_data[state]"); | ||
| 30 | - select_element.setAttr("id", "state_field"); | ||
| 31 | - select_element.setAttr("class", "type-select valid"); | ||
| 32 | - | ||
| 33 | - state_list.forEach(function(state) { | ||
| 34 | - option = SelectElement.generateOption(state, state); | ||
| 35 | - select_element.addOption(option); | ||
| 36 | - }); | ||
| 37 | - | ||
| 38 | - return select_element.getSelect(); | ||
| 39 | - }; | ||
| 40 | - | ||
| 41 | - | ||
| 42 | - SelectFieldChoices.prototype.replaceStateWithSelectElement = function() { | ||
| 43 | - var klass = this; | ||
| 44 | - | ||
| 45 | - $.get(this.state_url, function(response) { | ||
| 46 | - var select_html; | ||
| 47 | - | ||
| 48 | - if (response.length > 0) { | ||
| 49 | - select_html = klass.generateSelect(response); | ||
| 50 | - klass.replaceWith(select_html); | ||
| 51 | - | ||
| 52 | - if (klass.old_value.length !== 0 && response.include(klass.old_value)) { | ||
| 53 | - klass.getCurrentStateElement().val(klass.old_value); | ||
| 54 | - } | ||
| 55 | - } | ||
| 56 | - }); | ||
| 57 | - }; | ||
| 58 | - | ||
| 59 | - | ||
| 60 | - SelectFieldChoices.prototype.replaceStateWithInputElement = function() { | ||
| 61 | - this.replaceWith(this.input_html); | ||
| 62 | - }; | ||
| 63 | - | ||
| 64 | - | ||
| 65 | - SelectFieldChoices.prototype.hideCity = function() { | ||
| 66 | - this.city_parent_div.addClass("mpog_hidden_field"); | ||
| 67 | - }; | ||
| 68 | - | ||
| 69 | - | ||
| 70 | - SelectFieldChoices.prototype.showCity = function() { | ||
| 71 | - this.city_parent_div.removeClass("mpog_hidden_field"); | ||
| 72 | - }; | ||
| 73 | - | ||
| 74 | - | ||
| 75 | - SelectFieldChoices.prototype.actualFieldIsInput = function() { | ||
| 76 | - return this.getCurrentStateElement().attr("type") === "text"; | ||
| 77 | - }; | ||
| 78 | - | ||
| 79 | - | ||
| 80 | - return SelectFieldChoices; | ||
| 81 | -}); |
src/gov_user/public/static/governmental_powers.txt
src/gov_user/public/static/governmental_sphere.txt
src/gov_user/public/static/juridical_nature.txt
src/gov_user/public/style.css
| @@ -1,26 +0,0 @@ | @@ -1,26 +0,0 @@ | ||
| 1 | -#complete_registration { | ||
| 2 | - padding: 5px; | ||
| 3 | - width: 100%; | ||
| 4 | - background-color: #fff; | ||
| 5 | -} | ||
| 6 | - | ||
| 7 | -#complete_registration a { | ||
| 8 | - text-decoration: none; | ||
| 9 | -} | ||
| 10 | - | ||
| 11 | -#complete_registration a:hover { | ||
| 12 | - font-weight: bold; | ||
| 13 | -} | ||
| 14 | - | ||
| 15 | -#complete_registration_percentage { | ||
| 16 | - width: 100%; | ||
| 17 | - height: 20px; | ||
| 18 | - background: #fff; | ||
| 19 | - border: solid 1px #000; | ||
| 20 | -} | ||
| 21 | - | ||
| 22 | -.highlight-error { | ||
| 23 | - outline: none; | ||
| 24 | - border-color: #FF0000; | ||
| 25 | - box-shadow: 0 0 10px #FF0000; | ||
| 26 | -} |
src/gov_user/public/vendor/jquery.js
src/gov_user/public/vendor/jquery.maskedinput.min.js
| @@ -1,7 +0,0 @@ | @@ -1,7 +0,0 @@ | ||
| 1 | -/* | ||
| 2 | - Masked Input plugin for jQuery | ||
| 3 | - Copyright (c) 2007-2013 Josh Bush (digitalbush.com) | ||
| 4 | - Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license) | ||
| 5 | - Version: 1.3.1 | ||
| 6 | -*/ | ||
| 7 | -(function(e){function t(){var e=document.createElement("input"),t="onpaste";return e.setAttribute(t,""),"function"==typeof e[t]?"paste":"input"}var n,a=t()+".mask",r=navigator.userAgent,i=/iphone/i.test(r),o=/android/i.test(r);e.mask={definitions:{9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},dataName:"rawMaskFn",placeholder:"_"},e.fn.extend({caret:function(e,t){var n;if(0!==this.length&&!this.is(":hidden"))return"number"==typeof e?(t="number"==typeof t?t:e,this.each(function(){this.setSelectionRange?this.setSelectionRange(e,t):this.createTextRange&&(n=this.createTextRange(),n.collapse(!0),n.moveEnd("character",t),n.moveStart("character",e),n.select())})):(this[0].setSelectionRange?(e=this[0].selectionStart,t=this[0].selectionEnd):document.selection&&document.selection.createRange&&(n=document.selection.createRange(),e=0-n.duplicate().moveStart("character",-1e5),t=e+n.text.length),{begin:e,end:t})},unmask:function(){return this.trigger("unmask")},mask:function(t,r){var c,l,s,u,f,h;return!t&&this.length>0?(c=e(this[0]),c.data(e.mask.dataName)()):(r=e.extend({placeholder:e.mask.placeholder,completed:null},r),l=e.mask.definitions,s=[],u=h=t.length,f=null,e.each(t.split(""),function(e,t){"?"==t?(h--,u=e):l[t]?(s.push(RegExp(l[t])),null===f&&(f=s.length-1)):s.push(null)}),this.trigger("unmask").each(function(){function c(e){for(;h>++e&&!s[e];);return e}function d(e){for(;--e>=0&&!s[e];);return e}function m(e,t){var n,a;if(!(0>e)){for(n=e,a=c(t);h>n;n++)if(s[n]){if(!(h>a&&s[n].test(R[a])))break;R[n]=R[a],R[a]=r.placeholder,a=c(a)}b(),x.caret(Math.max(f,e))}}function p(e){var t,n,a,i;for(t=e,n=r.placeholder;h>t;t++)if(s[t]){if(a=c(t),i=R[t],R[t]=n,!(h>a&&s[a].test(i)))break;n=i}}function g(e){var t,n,a,r=e.which;8===r||46===r||i&&127===r?(t=x.caret(),n=t.begin,a=t.end,0===a-n&&(n=46!==r?d(n):a=c(n-1),a=46===r?c(a):a),k(n,a),m(n,a-1),e.preventDefault()):27==r&&(x.val(S),x.caret(0,y()),e.preventDefault())}function v(t){var n,a,i,l=t.which,u=x.caret();t.ctrlKey||t.altKey||t.metaKey||32>l||l&&(0!==u.end-u.begin&&(k(u.begin,u.end),m(u.begin,u.end-1)),n=c(u.begin-1),h>n&&(a=String.fromCharCode(l),s[n].test(a)&&(p(n),R[n]=a,b(),i=c(n),o?setTimeout(e.proxy(e.fn.caret,x,i),0):x.caret(i),r.completed&&i>=h&&r.completed.call(x))),t.preventDefault())}function k(e,t){var n;for(n=e;t>n&&h>n;n++)s[n]&&(R[n]=r.placeholder)}function b(){x.val(R.join(""))}function y(e){var t,n,a=x.val(),i=-1;for(t=0,pos=0;h>t;t++)if(s[t]){for(R[t]=r.placeholder;pos++<a.length;)if(n=a.charAt(pos-1),s[t].test(n)){R[t]=n,i=t;break}if(pos>a.length)break}else R[t]===a.charAt(pos)&&t!==u&&(pos++,i=t);return e?b():u>i+1?(x.val(""),k(0,h)):(b(),x.val(x.val().substring(0,i+1))),u?t:f}var x=e(this),R=e.map(t.split(""),function(e){return"?"!=e?l[e]?r.placeholder:e:void 0}),S=x.val();x.data(e.mask.dataName,function(){return e.map(R,function(e,t){return s[t]&&e!=r.placeholder?e:null}).join("")}),x.attr("readonly")||x.one("unmask",function(){x.unbind(".mask").removeData(e.mask.dataName)}).bind("focus.mask",function(){clearTimeout(n);var e;S=x.val(),e=y(),n=setTimeout(function(){b(),e==t.length?x.caret(0,e):x.caret(e)},10)}).bind("blur.mask",function(){y(),x.val()!=S&&x.change()}).bind("keydown.mask",g).bind("keypress.mask",v).bind(a,function(){setTimeout(function(){var e=y(!0);x.caret(e),r.completed&&e==x.val().length&&r.completed.call(x)},0)}),y()}))}})})(jQuery); | ||
| 8 | \ No newline at end of file | 0 | \ No newline at end of file |
src/gov_user/public/vendor/modulejs-1.5.0.min.js
| @@ -1,2 +0,0 @@ | @@ -1,2 +0,0 @@ | ||
| 1 | -/* modulejs 1.5.0 - http://larsjung.de/modulejs/ */ | ||
| 2 | -!function(n){this.modulejs=n()}(function(){"use strict";function n(n){return function(r){return l.toString.call(r)==="[object "+n+"]"}}function r(n){return n===new Object(n)}function t(n,r){return l.hasOwnProperty.call(n,r)}function e(n,r,e){if(p&&n.forEach===p)n.forEach(r,e);else if(n.length===+n.length)for(var i=0,o=n.length;o>i;i+=1)r.call(e,n[i],i,n);else for(var u in n)t(n,u)&&r.call(e,n[u],u,n)}function i(n,r){for(var t=0,e=n.length;e>t;t+=1)if(n[t]===r)return!0;return!1}function o(n){var r={},i=[];return e(n,function(n){t(r,n)||(i.push(n),r[n]=1)}),i}function u(n,r,t){if(n){var e=new Error("[modulejs-"+r+"] "+t);throw e.code=r,e}}function c(n,r,a){if(u(!h(n),31,'id must be a string "'+n+'"'),!r&&t(b,n))return b[n];var f=y[n];u(!f,32,'id not defined "'+n+'"'),a=(a||[]).slice(0),a.push(n);var s=[];if(e(f.deps,function(n){u(i(a,n),33,"circular dependencies: "+a+" & "+n),r?(s=s.concat(c(n,r,a)),s.push(n)):s.push(c(n,r,a))}),r)return o(s);var d=f.fn.apply(void 0,s);return b[n]=d,d}function a(n,t,e){void 0===e&&(e=t,t=[]),u(!h(n),11,'id must be a string "'+n+'"'),u(y[n],12,'id already defined "'+n+'"'),u(!g(t),13,'dependencies for "'+n+'" must be an array "'+t+'"'),u(!r(e)&&!v(e),14,'arg for "'+n+'" must be object or function "'+e+'"'),y[n]={id:n,deps:t,fn:v(e)?e:function(){return e}}}function f(n){return c(n)}function s(){var n={};return e(y,function(r,e){n[e]={deps:r.deps.slice(0),reqs:c(e,!0),init:t(b,e)}}),e(y,function(r,t){var o=[];e(y,function(r,e){i(n[e].reqs,t)&&o.push(e)}),n[t].reqd=o}),n}function d(n){var r="\n";return e(s(),function(t,e){var i=n?t.reqd:t.reqs;r+=(t.init?"* ":" ")+e+" -> [ "+i.join(", ")+" ]\n"}),r}var l=Object.prototype,p=Array.prototype.forEach,h=n("String"),v=n("Function"),g=Array.isArray||n("Array"),y={},b={};return{define:a,require:f,state:s,log:d,_private:{isString:h,isFunction:v,isArray:g,isObject:r,has:t,each:e,contains:i,uniq:o,err:u,definitions:y,instances:b,resolve:c}}}); | ||
| 3 | \ No newline at end of file | 0 | \ No newline at end of file |
src/gov_user/public/views/complete-registration.js
| @@ -1,60 +0,0 @@ | @@ -1,60 +0,0 @@ | ||
| 1 | -modulejs.define('CompleteRegistration', ['jquery', 'NoosferoRoot'], function($, NoosferoRoot) { | ||
| 2 | - 'use strict'; | ||
| 3 | - | ||
| 4 | - | ||
| 5 | - var AJAX_URL = { | ||
| 6 | - hide_registration_incomplete_percentage: | ||
| 7 | - NoosferoRoot.urlWithSubDirectory("/plugin/gov_user/hide_registration_incomplete_percentage") | ||
| 8 | - }; | ||
| 9 | - | ||
| 10 | - | ||
| 11 | - function hide_incomplete_percentage(evt) { | ||
| 12 | - evt.preventDefault(); | ||
| 13 | - | ||
| 14 | - jQuery.get(AJAX_URL.hide_registration_incomplete_percentage, {hide:true}, function(response){ | ||
| 15 | - if( response === true ) { | ||
| 16 | - jQuery("#complete_registration").fadeOut(); | ||
| 17 | - } | ||
| 18 | - }); | ||
| 19 | - } | ||
| 20 | - | ||
| 21 | - | ||
| 22 | - function show_complete_progressbar() { | ||
| 23 | - var percentage = jQuery("#complete_registration_message span").html(); | ||
| 24 | - var canvas_tag = document.getElementById("complete_registration_percentage"); | ||
| 25 | - | ||
| 26 | - if( canvas_tag !== null ) { | ||
| 27 | - var context = canvas_tag.getContext("2d"); | ||
| 28 | - | ||
| 29 | - percentage = canvas_tag.width*(percentage/100.0); | ||
| 30 | - | ||
| 31 | - context.beginPath(); | ||
| 32 | - context.rect(0, 0, percentage, canvas_tag.height); | ||
| 33 | - context.fillStyle = '#00FF00'; | ||
| 34 | - context.fill(); | ||
| 35 | - } | ||
| 36 | - } | ||
| 37 | - | ||
| 38 | - | ||
| 39 | - function repositioning_bar_percentage() { | ||
| 40 | - var complete_message = $("#complete_registration").remove(); | ||
| 41 | - | ||
| 42 | - $(".profile-info-options").before(complete_message); | ||
| 43 | - } | ||
| 44 | - | ||
| 45 | - | ||
| 46 | - return { | ||
| 47 | - isCurrentPage: function() { | ||
| 48 | - return $("#complete_registration").length === 1; | ||
| 49 | - }, | ||
| 50 | - | ||
| 51 | - | ||
| 52 | - init: function() { | ||
| 53 | - repositioning_bar_percentage(); | ||
| 54 | - | ||
| 55 | - jQuery(".hide-incomplete-percentage").click(hide_incomplete_percentage); | ||
| 56 | - | ||
| 57 | - show_complete_progressbar(); | ||
| 58 | - } | ||
| 59 | - } | ||
| 60 | -}); |
src/gov_user/public/views/control-panel.js
| @@ -1,32 +0,0 @@ | @@ -1,32 +0,0 @@ | ||
| 1 | -modulejs.define('ControlPanel', ['jquery'], function($) { | ||
| 2 | - 'use strict'; | ||
| 3 | - | ||
| 4 | - function add_institution_on_control_panel(control_panel) { | ||
| 5 | - /*var institution_link = $(".control-panel-instituton-link").remove(); | ||
| 6 | - | ||
| 7 | - if( institution_link.size() > 0 ) { | ||
| 8 | - control_panel.prepend(institution_link); | ||
| 9 | - }*/ | ||
| 10 | - } | ||
| 11 | - | ||
| 12 | - | ||
| 13 | - function add_itens_on_controla_panel() { | ||
| 14 | - var control_panel = $(".control-panel"); | ||
| 15 | - | ||
| 16 | - if( control_panel.size() > 0 ) { | ||
| 17 | - add_institution_on_control_panel(control_panel); | ||
| 18 | - } | ||
| 19 | - } | ||
| 20 | - | ||
| 21 | - | ||
| 22 | - return { | ||
| 23 | - isCurrentPage: function() { | ||
| 24 | - return $("#profile-editor-index").length === 1; | ||
| 25 | - }, | ||
| 26 | - | ||
| 27 | - | ||
| 28 | - init: function() { | ||
| 29 | - add_itens_on_controla_panel(); | ||
| 30 | - } | ||
| 31 | - } | ||
| 32 | -}); |
src/gov_user/public/views/create-institution.js
| @@ -1,406 +0,0 @@ | @@ -1,406 +0,0 @@ | ||
| 1 | -modulejs.define('CreateInstitution', ['jquery', 'NoosferoRoot', 'SelectElement'], function($, NoosferoRoot, SelectElement) { | ||
| 2 | - 'use strict'; | ||
| 3 | - | ||
| 4 | - var AJAX_URL = { | ||
| 5 | - create_institution_modal: | ||
| 6 | - NoosferoRoot.urlWithSubDirectory("/plugin/gov_user/create_institution"), | ||
| 7 | - new_institution: | ||
| 8 | - NoosferoRoot.urlWithSubDirectory("/plugin/gov_user/new_institution"), | ||
| 9 | - institution_already_exists: | ||
| 10 | - NoosferoRoot.urlWithSubDirectory("/plugin/gov_user/institution_already_exists"), | ||
| 11 | - get_institutions: | ||
| 12 | - NoosferoRoot.urlWithSubDirectory("/plugin/gov_user/get_institutions"), | ||
| 13 | - auto_complete_city: | ||
| 14 | - NoosferoRoot.urlWithSubDirectory("/account/search_cities") | ||
| 15 | - }; | ||
| 16 | - | ||
| 17 | - | ||
| 18 | - function open_create_institution_modal(evt) { | ||
| 19 | - evt.preventDefault(); | ||
| 20 | - | ||
| 21 | - $.get(AJAX_URL.create_institution_modal, function(response){ | ||
| 22 | - $("#institution_dialog").html(response); | ||
| 23 | - | ||
| 24 | - set_form_count_custom_data(); | ||
| 25 | - set_events(); | ||
| 26 | - | ||
| 27 | - $("#institution_dialog").dialog({ | ||
| 28 | - modal: true, | ||
| 29 | - width: 500, | ||
| 30 | - height: 530, | ||
| 31 | - position: 'center', | ||
| 32 | - close: function() { | ||
| 33 | - $("#institution_dialog").html(""); | ||
| 34 | - $('#institution_empty_ajax_message').switchClass("show-field", "hide-field"); | ||
| 35 | - } | ||
| 36 | - }); | ||
| 37 | - }); | ||
| 38 | - } | ||
| 39 | - | ||
| 40 | - | ||
| 41 | - function show_public_institutions_fields() { | ||
| 42 | - $(".public-institutions-fields").show(); | ||
| 43 | - } | ||
| 44 | - | ||
| 45 | - | ||
| 46 | - function show_private_institutions_fields() { | ||
| 47 | - $(".public-institutions-fields").hide(); | ||
| 48 | - $("#institutions_governmental_power option").selected(0); | ||
| 49 | - $("#institutions_governmental_sphere option").selected(0); | ||
| 50 | - } | ||
| 51 | - | ||
| 52 | - | ||
| 53 | - function get_comunity_post_data() { | ||
| 54 | - return { | ||
| 55 | - name : $("#community_name").val(), | ||
| 56 | - country : $("#community_country").val(), | ||
| 57 | - state : $("#community_state").val(), | ||
| 58 | - city : $("#community_city").val() | ||
| 59 | - }; | ||
| 60 | - } | ||
| 61 | - | ||
| 62 | - | ||
| 63 | - function get_institution_post_data() { | ||
| 64 | - return { | ||
| 65 | - cnpj: $("#institutions_cnpj").val(), | ||
| 66 | - type: $("input[name='institutions[type]']:checked").val(), | ||
| 67 | - acronym : $("#institutions_acronym").val(), | ||
| 68 | - governmental_power: $("#institutions_governmental_power").selected().val(), | ||
| 69 | - governmental_sphere: $("#institutions_governmental_sphere").selected().val(), | ||
| 70 | - juridical_nature: $("#institutions_juridical_nature").selected().val(), | ||
| 71 | - corporate_name: $("#institutions_corporate_name").val() | ||
| 72 | - }; | ||
| 73 | - } | ||
| 74 | - | ||
| 75 | - | ||
| 76 | - function get_post_data() { | ||
| 77 | - var post_data = {}; | ||
| 78 | - | ||
| 79 | - post_data.community = get_comunity_post_data(); | ||
| 80 | - post_data.institutions = get_institution_post_data(); | ||
| 81 | - | ||
| 82 | - return post_data; | ||
| 83 | - } | ||
| 84 | - | ||
| 85 | - | ||
| 86 | - function success_ajax_response(response) { | ||
| 87 | - close_loading(); | ||
| 88 | - | ||
| 89 | - if(response.success){ | ||
| 90 | - var institution_name = response.institution_data.name; | ||
| 91 | - var institution_id = response.institution_data.id; | ||
| 92 | - | ||
| 93 | - $("#institution_dialog").html("<div class='errorExplanation'><h2>"+response.message+"</h2></div>"); | ||
| 94 | - $("#create_institution_errors").switchClass("show-field", "hide-field"); | ||
| 95 | - | ||
| 96 | - $(".institution_container").append(get_clone_institution_data(institution_id)); | ||
| 97 | - add_selected_institution_to_list(institution_id, institution_name); | ||
| 98 | - | ||
| 99 | - $(".remove-institution").click(remove_institution); | ||
| 100 | - } else { | ||
| 101 | - var errors = create_error_list(response); | ||
| 102 | - $("#create_institution_errors").switchClass("hide-field", "show-field").html("<h2>"+response.message+"</h2>"+errors); | ||
| 103 | - | ||
| 104 | - show_errors_in_each_field(response.errors); | ||
| 105 | - } | ||
| 106 | - } | ||
| 107 | - | ||
| 108 | - function create_error_list(response){ | ||
| 109 | - var errors = "<ul>"; | ||
| 110 | - var field_name; | ||
| 111 | - | ||
| 112 | - for(var error_key in response.errors) { | ||
| 113 | - field_name = adjust_error_key(error_key); | ||
| 114 | - | ||
| 115 | - if(response.errors[error_key].length > 0){ | ||
| 116 | - errors += "<li><b>"+field_name+"</b>: "+response.errors[error_key]+"</li>"; | ||
| 117 | - } | ||
| 118 | - } | ||
| 119 | - | ||
| 120 | - errors += "</ul>"; | ||
| 121 | - return errors; | ||
| 122 | - } | ||
| 123 | - | ||
| 124 | - | ||
| 125 | - function show_errors_in_each_field(errors) { | ||
| 126 | - var error_keys = Object.keys(errors); | ||
| 127 | - | ||
| 128 | - // (field)|(field)|... | ||
| 129 | - var verify_error = new RegExp("(\\[" + error_keys.join("\\])|(\\[") + "\\])" ); | ||
| 130 | - | ||
| 131 | - var fields_with_errors = $("#institution_dialog .formfield input").filter(function(index, field) { | ||
| 132 | - $(field).removeClass("highlight-error"); | ||
| 133 | - return verify_error.test(field.getAttribute("name")); | ||
| 134 | - }); | ||
| 135 | - | ||
| 136 | - var selects_with_errors = $("#institution_dialog .formfield select").filter(function(index, field) { | ||
| 137 | - $(field).removeClass("highlight-error"); | ||
| 138 | - return verify_error.test(field.getAttribute("name")); | ||
| 139 | - }); | ||
| 140 | - | ||
| 141 | - fields_with_errors.addClass("highlight-error"); | ||
| 142 | - selects_with_errors.addClass("highlight-error"); | ||
| 143 | - } | ||
| 144 | - | ||
| 145 | - | ||
| 146 | - function adjust_error_key(error_key) { | ||
| 147 | - var text = error_key.replace(/_/, " "); | ||
| 148 | - text = text.charAt(0).toUpperCase() + text.slice(1); | ||
| 149 | - | ||
| 150 | - return text; | ||
| 151 | - } | ||
| 152 | - | ||
| 153 | - | ||
| 154 | - function save_institution(evt) { | ||
| 155 | - evt.preventDefault(); | ||
| 156 | - | ||
| 157 | - open_loading($("#loading_message").val()); | ||
| 158 | - $.ajax({ | ||
| 159 | - url: AJAX_URL.new_institution, | ||
| 160 | - data : get_post_data(), | ||
| 161 | - type: "POST", | ||
| 162 | - success: success_ajax_response, | ||
| 163 | - error: function() { | ||
| 164 | - close_loading(); | ||
| 165 | - var error_message = $("#institution_error_message").val(); | ||
| 166 | - $("#create_institution_errors").switchClass("hide-field", "show-field").html("<h2>"+error_message+"</h2>"); | ||
| 167 | - } | ||
| 168 | - }); | ||
| 169 | - } | ||
| 170 | - | ||
| 171 | - function cancel_institution(evt){ | ||
| 172 | - evt.preventDefault(); | ||
| 173 | - $('#institution_dialog').dialog('close'); | ||
| 174 | - } | ||
| 175 | - | ||
| 176 | - | ||
| 177 | - function institution_already_exists(){ | ||
| 178 | - if( this.value.length >= 3 ) { | ||
| 179 | - $.get(AJAX_URL.institution_already_exists, {name:this.value}, function(response){ | ||
| 180 | - if( response === true ) { | ||
| 181 | - $("#already_exists_text").switchClass("hide-field", "show-field"); | ||
| 182 | - } else { | ||
| 183 | - $("#already_exists_text").switchClass("show-field", "hide-field"); | ||
| 184 | - } | ||
| 185 | - }); | ||
| 186 | - } | ||
| 187 | - } | ||
| 188 | - | ||
| 189 | - | ||
| 190 | - function get_clone_institution_data(value) { | ||
| 191 | - var user_institutions = $(".user_institutions").first().clone(); | ||
| 192 | - user_institutions.val(value); | ||
| 193 | - | ||
| 194 | - return user_institutions; | ||
| 195 | - } | ||
| 196 | - | ||
| 197 | - | ||
| 198 | - function institution_autocomplete() { | ||
| 199 | - $("#input_institution").autocomplete({ | ||
| 200 | - source : function(request, response){ | ||
| 201 | - $.ajax({ | ||
| 202 | - type: "GET", | ||
| 203 | - url: AJAX_URL.get_institutions, | ||
| 204 | - data: {query: request.term}, | ||
| 205 | - success: function(result){ | ||
| 206 | - response(result); | ||
| 207 | - | ||
| 208 | - if( result.length === 0 ) { | ||
| 209 | - $('#institution_empty_ajax_message').switchClass("hide-field", "show-field"); | ||
| 210 | - } else { | ||
| 211 | - $('#institution_empty_ajax_message').switchClass("show-field", "hide-field"); | ||
| 212 | - } | ||
| 213 | - }, | ||
| 214 | - error: function(ajax, stat, errorThrown) { | ||
| 215 | - console.log('Link not found : ' + errorThrown); | ||
| 216 | - } | ||
| 217 | - }); | ||
| 218 | - }, | ||
| 219 | - | ||
| 220 | - minLength: 2, | ||
| 221 | - | ||
| 222 | - select : function (event, selected) { | ||
| 223 | - $("#institution_selected").val(selected.item.id).attr("data-name", selected.item.label); | ||
| 224 | - } | ||
| 225 | - }); | ||
| 226 | - } | ||
| 227 | - | ||
| 228 | - | ||
| 229 | - function add_selected_institution_to_list(id, name) { | ||
| 230 | - var selected_institution = "<li data-institution='"+id+"'>"+name; | ||
| 231 | - selected_institution += "<a href='#' class='button without-text icon-remove remove-institution'></a></li>"; | ||
| 232 | - | ||
| 233 | - $(".institutions_added").append(selected_institution); | ||
| 234 | - } | ||
| 235 | - | ||
| 236 | - | ||
| 237 | - function add_new_institution(evt) { | ||
| 238 | - evt.preventDefault(); | ||
| 239 | - var selected = $("#institution_selected"); | ||
| 240 | - var institution_already_added = $(".institutions_added li[data-institution='"+selected.val()+"']").length; | ||
| 241 | - | ||
| 242 | - if(selected.val().length > 0 && institution_already_added === 0) { | ||
| 243 | - //field that send the institutions to the server | ||
| 244 | - $(".institution_container").append(get_clone_institution_data(selected.val())); | ||
| 245 | - | ||
| 246 | - // Visualy add the selected institution to the list | ||
| 247 | - add_selected_institution_to_list(selected.val(), selected.attr("data-name")); | ||
| 248 | - | ||
| 249 | - // clean the institution flag | ||
| 250 | - selected.val("").attr("data-name", ""); | ||
| 251 | - $("#input_institution").val(""); | ||
| 252 | - | ||
| 253 | - $(".remove-institution").click(remove_institution); | ||
| 254 | - } | ||
| 255 | - } | ||
| 256 | - | ||
| 257 | - | ||
| 258 | - function remove_institution(evt) { | ||
| 259 | - evt.preventDefault(); | ||
| 260 | - var code = $(this).parent().attr("data-institution"); | ||
| 261 | - | ||
| 262 | - $(".user_institutions[value="+code+"]").remove(); | ||
| 263 | - $(this).parent().remove(); | ||
| 264 | - } | ||
| 265 | - | ||
| 266 | - | ||
| 267 | - function add_mask_to_form_items() { | ||
| 268 | - if ($.mask) { | ||
| 269 | - $("#institutions_cnpj").mask("99.999.999/9999-99"); | ||
| 270 | - } | ||
| 271 | - } | ||
| 272 | - | ||
| 273 | - | ||
| 274 | - function show_hide_cnpj_city(country) { | ||
| 275 | - var cnpj = $("#institutions_cnpj").parent().parent(); | ||
| 276 | - var city = $("#community_city").parent().parent(); | ||
| 277 | - var state = $("#community_state").parent().parent(); | ||
| 278 | - var inst_type = $("input[name='institutions[type]']:checked").val(); | ||
| 279 | - institution_type_actions(inst_type); | ||
| 280 | - | ||
| 281 | - if( country === "-1" ) $("#community_country").val("BR"); | ||
| 282 | - | ||
| 283 | - if( country !== "BR" ) { | ||
| 284 | - cnpj.hide(); | ||
| 285 | - city.hide(); | ||
| 286 | - state.hide(); | ||
| 287 | - } else { | ||
| 288 | - cnpj.show(); | ||
| 289 | - city.show(); | ||
| 290 | - state.show(); | ||
| 291 | - } | ||
| 292 | - } | ||
| 293 | - | ||
| 294 | - function institution_type_actions(type) { | ||
| 295 | - var country = $("#community_country").val(); | ||
| 296 | - if( type === "PublicInstitution" && country == "BR") { | ||
| 297 | - show_public_institutions_fields(); | ||
| 298 | - } else { | ||
| 299 | - show_private_institutions_fields(); | ||
| 300 | - } | ||
| 301 | - } | ||
| 302 | - | ||
| 303 | - | ||
| 304 | - function set_form_count_custom_data() { | ||
| 305 | - var divisor_option = SelectElement.generateOption("-1", "--------------------------------"); | ||
| 306 | - var default_option = SelectElement.generateOption("BR", "Brazil"); | ||
| 307 | - | ||
| 308 | - | ||
| 309 | - var inst_type = $("input[name='institutions[type]']:checked").val(); | ||
| 310 | - var country = $("#community_country").val(); | ||
| 311 | - | ||
| 312 | - institution_type_actions(inst_type); | ||
| 313 | - show_hide_cnpj_city(country); | ||
| 314 | - | ||
| 315 | - if( $('#community_country').find("option[value='']").length === 1 ) { | ||
| 316 | - $('#community_country').find("option[value='']").remove(); | ||
| 317 | - $('#community_country').prepend(divisor_option); | ||
| 318 | - $('#community_country').prepend(default_option); | ||
| 319 | - | ||
| 320 | - if($("#edit_institution_page").val() === "false") { | ||
| 321 | - $('#community_country').val("BR"); | ||
| 322 | - show_hide_cnpj_city($('#community_country').val()); | ||
| 323 | - } | ||
| 324 | - } | ||
| 325 | - } | ||
| 326 | - | ||
| 327 | - function autoCompleteCity() { | ||
| 328 | - var country_selected = $('#community_country').val(); | ||
| 329 | - | ||
| 330 | - if(country_selected == "BR") { | ||
| 331 | - $('#community_city').autocomplete({ | ||
| 332 | - source : function(request, response){ | ||
| 333 | - $.ajax({ | ||
| 334 | - type: "GET", | ||
| 335 | - url: AJAX_URL.auto_complete_city, | ||
| 336 | - data: {city_name: request.term, state_name: $("#community_state").val()}, | ||
| 337 | - success: function(result){ | ||
| 338 | - response(result); | ||
| 339 | - | ||
| 340 | - // There are two autocompletes in this page, the last one is modal | ||
| 341 | - // autocomplete just put it above the modal | ||
| 342 | - $(".ui-autocomplete").last().css("z-index", 1000); | ||
| 343 | - }, | ||
| 344 | - error: function(ajax, stat, errorThrown) { | ||
| 345 | - console.log('Link not found : ' + errorThrown); | ||
| 346 | - } | ||
| 347 | - }); | ||
| 348 | - }, | ||
| 349 | - | ||
| 350 | - minLength: 3 | ||
| 351 | - }); | ||
| 352 | - } else { | ||
| 353 | - if ($('#community_city').data('autocomplete')) { | ||
| 354 | - $('#community_city').autocomplete("destroy"); | ||
| 355 | - $('#community_city').removeData('autocomplete'); | ||
| 356 | - } | ||
| 357 | - } | ||
| 358 | - } | ||
| 359 | - | ||
| 360 | - function set_events() { | ||
| 361 | - $("#create_institution_link").click(open_create_institution_modal); | ||
| 362 | - | ||
| 363 | - $("input[name='institutions[type]']").click(function(){ | ||
| 364 | - institution_type_actions(this.value); | ||
| 365 | - }); | ||
| 366 | - | ||
| 367 | - $('#save_institution_button').click(save_institution); | ||
| 368 | - $('#cancel_institution_button').click(cancel_institution); | ||
| 369 | - | ||
| 370 | - $("#community_name").keyup(institution_already_exists); | ||
| 371 | - | ||
| 372 | - $("#add_new_institution").click(add_new_institution); | ||
| 373 | - | ||
| 374 | - $(".remove-institution").click(remove_institution); | ||
| 375 | - | ||
| 376 | - $("#community_country").change(function(){ | ||
| 377 | - show_hide_cnpj_city(this.value); | ||
| 378 | - }); | ||
| 379 | - | ||
| 380 | - add_mask_to_form_items(); | ||
| 381 | - | ||
| 382 | - institution_autocomplete(); | ||
| 383 | - | ||
| 384 | - autoCompleteCity(); | ||
| 385 | - $('#community_country').change(function(){ | ||
| 386 | - autoCompleteCity(); | ||
| 387 | - }); | ||
| 388 | - } | ||
| 389 | - | ||
| 390 | - | ||
| 391 | - return { | ||
| 392 | - isCurrentPage: function() { | ||
| 393 | - return $("#institution_form").length === 1; | ||
| 394 | - }, | ||
| 395 | - | ||
| 396 | - | ||
| 397 | - init: function() { | ||
| 398 | - set_form_count_custom_data(); | ||
| 399 | - set_events(); | ||
| 400 | - }, | ||
| 401 | - | ||
| 402 | - institution_autocomplete: function(){ | ||
| 403 | - institution_autocomplete(); | ||
| 404 | - } | ||
| 405 | - }; | ||
| 406 | -}); |
src/gov_user/public/views/gov-user-comments-extra-fields.js
| @@ -1,26 +0,0 @@ | @@ -1,26 +0,0 @@ | ||
| 1 | -modulejs.define("GovUserCommentsExtraFields", ['jquery','CreateInstitution'], function($,CreateInstitution) { | ||
| 2 | - | ||
| 3 | - function set_events() { | ||
| 4 | - CreateInstitution.institution_autocomplete(); | ||
| 5 | - } | ||
| 6 | - | ||
| 7 | - | ||
| 8 | - function prepend_to_additional_information() { | ||
| 9 | - var institution_comments = $("#input_institution_comments").remove(); | ||
| 10 | - | ||
| 11 | - $(".comments-software-extra-fields").prepend(institution_comments); | ||
| 12 | - } | ||
| 13 | - | ||
| 14 | - | ||
| 15 | - return { | ||
| 16 | - isCurrentPage: function() { | ||
| 17 | - return $(".star-rate-form").length === 1; | ||
| 18 | - }, | ||
| 19 | - | ||
| 20 | - init: function() { | ||
| 21 | - prepend_to_additional_information(); | ||
| 22 | - set_events(); | ||
| 23 | - } | ||
| 24 | - } | ||
| 25 | - | ||
| 26 | -}) |
src/gov_user/public/views/new-community.js
| @@ -1,28 +0,0 @@ | @@ -1,28 +0,0 @@ | ||
| 1 | -modulejs.define("NewCommunity", ['jquery'], function($) { | ||
| 2 | - | ||
| 3 | - function replace_mandatory_message() { | ||
| 4 | - $(".required-field").first() | ||
| 5 | - .replaceWith("<span class='required-field'> Os campos em destaque<label class='pseudoformlabel'> (*)</label> são obrigatórios. </span>"); | ||
| 6 | - } | ||
| 7 | - | ||
| 8 | - function remove_image_builder_text() { | ||
| 9 | - $("label:contains('Image builder')").hide(); | ||
| 10 | - } | ||
| 11 | - | ||
| 12 | - function hide_organization_template_fields(){ | ||
| 13 | - $('#template-options').hide(); | ||
| 14 | - } | ||
| 15 | - | ||
| 16 | - return { | ||
| 17 | - | ||
| 18 | - isCurrentPage: function() { | ||
| 19 | - return true; | ||
| 20 | - }, | ||
| 21 | - | ||
| 22 | - init: function() { | ||
| 23 | - replace_mandatory_message(); | ||
| 24 | - remove_image_builder_text(); | ||
| 25 | - hide_organization_template_fields(); | ||
| 26 | - } | ||
| 27 | - } | ||
| 28 | -}) |
src/gov_user/public/views/user-edit-profile.js
| @@ -1,216 +0,0 @@ | @@ -1,216 +0,0 @@ | ||
| 1 | -modulejs.define('UserEditProfile', ['jquery', 'SelectElement', 'SelectFieldChoices', 'CreateInstitution'], function($, SelectElement, SelectFieldChoices, CreateInstitution) { | ||
| 2 | - 'use strict'; | ||
| 3 | - | ||
| 4 | - function set_form_count_custom_data() { | ||
| 5 | - var divisor_option = SelectElement.generateOption("-1", "--------------------------------"); | ||
| 6 | - var default_option = SelectElement.generateOption("BR", "Brazil"); | ||
| 7 | - | ||
| 8 | - $('#profile_data_country').find("option[value='']").remove(); | ||
| 9 | - $('#profile_data_country').prepend(divisor_option); | ||
| 10 | - $('#profile_data_country').prepend(default_option); | ||
| 11 | - $('#profile_data_country').val("BR"); | ||
| 12 | - } | ||
| 13 | - | ||
| 14 | - | ||
| 15 | - function set_initial_form_custom_data(selectFieldChoices) { | ||
| 16 | - set_form_count_custom_data(); | ||
| 17 | - | ||
| 18 | - $("#password-balloon").html($("#user_password_menssage").val()); | ||
| 19 | - $("#profile_data_email").parent().append($("#email_public_message").remove()); | ||
| 20 | - | ||
| 21 | - if( $("#state_field").length !== 0 ) selectFieldChoices.replaceStateWithSelectElement(); | ||
| 22 | - } | ||
| 23 | - | ||
| 24 | - | ||
| 25 | - function show_state_if_country_is_brazil() { | ||
| 26 | - var selectFieldChoices = new SelectFieldChoices("#state_field", "#city_field", "/plugin/gov_user/get_brazil_states"); | ||
| 27 | - set_initial_form_custom_data(selectFieldChoices); | ||
| 28 | - | ||
| 29 | - $("#profile_data_country").change(function(){ | ||
| 30 | - if( this.value === "-1" ) $(this).val("BR"); | ||
| 31 | - | ||
| 32 | - if( this.value === "BR" && selectFieldChoices.actualFieldIsInput() ) { | ||
| 33 | - selectFieldChoices.replaceStateWithSelectElement(); | ||
| 34 | - selectFieldChoices.showCity(); | ||
| 35 | - } else if( this.value !== "BR" && !selectFieldChoices.actualFieldIsInput() ) { | ||
| 36 | - selectFieldChoices.replaceStateWithInputElement(); | ||
| 37 | - selectFieldChoices.hideCity(); | ||
| 38 | - } | ||
| 39 | - }); | ||
| 40 | - } | ||
| 41 | - | ||
| 42 | - | ||
| 43 | - function show_or_hide_phone_mask() { | ||
| 44 | - if($("#profile_data_country").val() === "BR") { | ||
| 45 | - if( (typeof $("#profile_data_cell_phone").data("rawMaskFn") === 'undefined') ) { | ||
| 46 | - // $("#profile_data_cell_phone").mask("(99) 9999?9-9999"); | ||
| 47 | - // $("#profile_data_comercial_phone").mask("(99) 9999?9-9999"); | ||
| 48 | - // $("#profile_data_contact_phone").mask("(99) 9999?9-9999"); | ||
| 49 | - } | ||
| 50 | - } else { | ||
| 51 | - // $("#profile_data_cell_phone").unmask(); | ||
| 52 | - // $("#profile_data_comercial_phone").unmask(); | ||
| 53 | - // $("#profile_data_contact_phone").unmask(); | ||
| 54 | - } | ||
| 55 | - } | ||
| 56 | - | ||
| 57 | - | ||
| 58 | - function fix_phone_mask_format(id) { | ||
| 59 | - $(id).blur(function() { | ||
| 60 | - var last = $(this).val().substr( $(this).val().indexOf("-") + 1 ); | ||
| 61 | - | ||
| 62 | - if( last.length === 3 ) { | ||
| 63 | - var move = $(this).val().substr( $(this).val().indexOf("-") - 1, 1 ); | ||
| 64 | - var lastfour = move + last; | ||
| 65 | - var first = $(this).val().substr( 0, 9 ); | ||
| 66 | - | ||
| 67 | - $(this).val( first + '-' + lastfour ); | ||
| 68 | - } | ||
| 69 | - }); | ||
| 70 | - } | ||
| 71 | - | ||
| 72 | - | ||
| 73 | - function show_plugin_error_message(field_selector, hidden_message_id ) { | ||
| 74 | - var field = $(field_selector); | ||
| 75 | - | ||
| 76 | - field.removeClass("validated").addClass("invalid"); | ||
| 77 | - | ||
| 78 | - if(!$("." + hidden_message_id)[0]) { | ||
| 79 | - var message = $("#" + hidden_message_id).val(); | ||
| 80 | - field.parent().append("<div class='" + hidden_message_id + " errorExplanation'>"+message+"</span>"); | ||
| 81 | - } else { | ||
| 82 | - $("." + hidden_message_id).show(); | ||
| 83 | - } | ||
| 84 | - } | ||
| 85 | - | ||
| 86 | - | ||
| 87 | - function hide_plugin_error_message(field_selector, hidden_message_id) { | ||
| 88 | - $(field_selector).removeClass("invalid").addClass("validated"); | ||
| 89 | - $("." + hidden_message_id).hide(); | ||
| 90 | - } | ||
| 91 | - | ||
| 92 | - | ||
| 93 | - function add_blur_fields(field_selector, hidden_message_id, validation_function, allow_blank) { | ||
| 94 | - $(field_selector).blur(function(){ | ||
| 95 | - $(this).attr("class", ""); | ||
| 96 | - | ||
| 97 | - if( validation_function(this.value, !!allow_blank) ) { | ||
| 98 | - show_plugin_error_message(field_selector, hidden_message_id); | ||
| 99 | - } else { | ||
| 100 | - hide_plugin_error_message(field_selector, hidden_message_id); | ||
| 101 | - } | ||
| 102 | - }); | ||
| 103 | - } | ||
| 104 | - | ||
| 105 | - | ||
| 106 | - function invalid_email_validation(value, allow_blank) { | ||
| 107 | - if( allow_blank && value.trim().length === 0 ) { | ||
| 108 | - return false; | ||
| 109 | - } | ||
| 110 | - | ||
| 111 | - var correct_format_regex = new RegExp(/^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/); | ||
| 112 | - | ||
| 113 | - return !correct_format_regex.test(value); | ||
| 114 | - } | ||
| 115 | - | ||
| 116 | - | ||
| 117 | - function invalid_site_validation(value) { | ||
| 118 | - var correct_format_regex = new RegExp(/(^|)(http[s]{0,1})\:\/\/(\w+[.])\w+/g); | ||
| 119 | - | ||
| 120 | - return !correct_format_regex.test(value); | ||
| 121 | - } | ||
| 122 | - | ||
| 123 | - | ||
| 124 | - function get_privacy_selector_parent_div(field_id, actual) { | ||
| 125 | - if( actual === undefined ) actual = $(field_id); | ||
| 126 | - | ||
| 127 | - if( actual.is("form") || actual.length === 0 ) return null; // Not allow recursion over form | ||
| 128 | - | ||
| 129 | - if( actual.hasClass("field-with-privacy-selector") ) { | ||
| 130 | - return actual; | ||
| 131 | - } else { | ||
| 132 | - return get_privacy_selector_parent_div(field_id, actual.parent()); | ||
| 133 | - } | ||
| 134 | - } | ||
| 135 | - | ||
| 136 | - | ||
| 137 | - function try_to_remove(list, field) { | ||
| 138 | - try { | ||
| 139 | - list.push(field.remove()); | ||
| 140 | - } catch(e) { | ||
| 141 | - console.log("Cound not remove field"); | ||
| 142 | - } | ||
| 143 | - } | ||
| 144 | - | ||
| 145 | - | ||
| 146 | - function get_edit_fields_in_insertion_order() { | ||
| 147 | - var containers = []; | ||
| 148 | - | ||
| 149 | - try_to_remove(containers, get_privacy_selector_parent_div("#city_field")); | ||
| 150 | - try_to_remove(containers, get_privacy_selector_parent_div("#state_field")); | ||
| 151 | - try_to_remove(containers, get_privacy_selector_parent_div("#profile_data_country")); | ||
| 152 | - try_to_remove(containers, get_privacy_selector_parent_div("#profile_data_birth_date")); | ||
| 153 | - try_to_remove(containers, get_privacy_selector_parent_div("#profile_data_organization_website")); | ||
| 154 | - try_to_remove(containers, get_privacy_selector_parent_div("#profile_data_personal_website")); | ||
| 155 | - try_to_remove(containers, get_privacy_selector_parent_div("#profile_data_comercial_phone")); | ||
| 156 | - try_to_remove(containers, get_privacy_selector_parent_div("#profile_data_contact_phone")); | ||
| 157 | - try_to_remove(containers, get_privacy_selector_parent_div("#profile_data_cell_phone")); | ||
| 158 | - try_to_remove(containers, $("#select_institution")); | ||
| 159 | - try_to_remove(containers, $("#user_secondary_email").parent().parent()); | ||
| 160 | - try_to_remove(containers, get_privacy_selector_parent_div("#profile_data_email")); | ||
| 161 | - try_to_remove(containers, get_privacy_selector_parent_div("#profile_data_name")); | ||
| 162 | - try_to_remove(containers, $(".pseudoformlabel").parent().parent()); | ||
| 163 | - try_to_remove(containers, $("h2")[0]); | ||
| 164 | - | ||
| 165 | - return containers; | ||
| 166 | - } | ||
| 167 | - | ||
| 168 | - | ||
| 169 | - function change_edit_fields_order() { | ||
| 170 | - var form = $("#profile-data"); | ||
| 171 | - | ||
| 172 | - if( form.length !== 0 ) { | ||
| 173 | - var containers = get_edit_fields_in_insertion_order(); | ||
| 174 | - | ||
| 175 | - containers.forEach(function(container){ | ||
| 176 | - form.prepend(container); | ||
| 177 | - }); | ||
| 178 | - } | ||
| 179 | - } | ||
| 180 | - | ||
| 181 | - | ||
| 182 | - function set_fields_validations() { | ||
| 183 | - $("#profile_data_country").blur(show_or_hide_phone_mask); | ||
| 184 | - | ||
| 185 | - // $("#profile_data_birth_date").mask("99/99/9999"); | ||
| 186 | - | ||
| 187 | - fix_phone_mask_format("#profile_data_cell_phone"); | ||
| 188 | - fix_phone_mask_format("#profile_data_comercial_phone"); | ||
| 189 | - fix_phone_mask_format("#profile_data_contact_phone"); | ||
| 190 | - | ||
| 191 | - add_blur_fields("#profile_data_email", "email_error", invalid_email_validation); | ||
| 192 | - add_blur_fields("#user_secondary_email", "email_error", invalid_email_validation, true); | ||
| 193 | - add_blur_fields("#profile_data_personal_website", "site_error", invalid_site_validation); | ||
| 194 | - add_blur_fields("#profile_data_organization_website", "site_error", invalid_site_validation); | ||
| 195 | - } | ||
| 196 | - | ||
| 197 | - | ||
| 198 | - return { | ||
| 199 | - isCurrentPage: function() { | ||
| 200 | - return $('#profile_data_email').length === 1; | ||
| 201 | - }, | ||
| 202 | - | ||
| 203 | - | ||
| 204 | - init: function() { | ||
| 205 | - change_edit_fields_order(); // To change the fields order, it MUST be the first function executed | ||
| 206 | - | ||
| 207 | - show_state_if_country_is_brazil(); | ||
| 208 | - | ||
| 209 | - show_or_hide_phone_mask(); | ||
| 210 | - | ||
| 211 | - set_fields_validations(); | ||
| 212 | - | ||
| 213 | - CreateInstitution.init(); | ||
| 214 | - } | ||
| 215 | - } | ||
| 216 | -}); |
src/gov_user/test/functional/gov_user_plugin_controller_test.rb
| @@ -1,236 +0,0 @@ | @@ -1,236 +0,0 @@ | ||
| 1 | -require File.dirname(__FILE__) + '/../../../../test/test_helper' | ||
| 2 | -require File.dirname(__FILE__) + '/../helpers/institution_test_helper' | ||
| 3 | -require File.dirname(__FILE__) + '/../../controllers/gov_user_plugin_controller' | ||
| 4 | - | ||
| 5 | -class GovUserPluginController; def rescue_action(e) raise e end; end | ||
| 6 | -class GovUserPluginControllerTest < ActionController::TestCase | ||
| 7 | - | ||
| 8 | - | ||
| 9 | - def setup | ||
| 10 | - @admin = create_user("adminuser").person | ||
| 11 | - @admin.stubs(:has_permission?).returns("true") | ||
| 12 | - @controller.stubs(:current_user).returns(@admin.user) | ||
| 13 | - | ||
| 14 | - @environment = Environment.default | ||
| 15 | - @environment.enabled_plugins = ['SoftwareCommunitiesPlugin'] | ||
| 16 | - @environment.add_admin(@admin) | ||
| 17 | - @environment.save | ||
| 18 | - | ||
| 19 | - @gov_power = GovernmentalPower.create(:name=>"Some Gov Power") | ||
| 20 | - @gov_sphere = GovernmentalSphere.create(:name=>"Some Gov Sphere") | ||
| 21 | - @juridical_nature = JuridicalNature.create(:name => "Autarquia") | ||
| 22 | - @response = ActionController::TestResponse.new | ||
| 23 | - | ||
| 24 | - @institution_list = [] | ||
| 25 | - @institution_list << InstitutionTestHelper.create_public_institution( | ||
| 26 | - "Ministerio Publico da Uniao", | ||
| 27 | - "MPU", | ||
| 28 | - "BR", | ||
| 29 | - "DF", | ||
| 30 | - "Gama", | ||
| 31 | - @juridical_nature, | ||
| 32 | - @gov_power, | ||
| 33 | - @gov_sphere, | ||
| 34 | - "12.345.678/9012-45" | ||
| 35 | - ) | ||
| 36 | - @institution_list << InstitutionTestHelper.create_public_institution( | ||
| 37 | - "Tribunal Regional da Uniao", | ||
| 38 | - "TRU", | ||
| 39 | - "BR", | ||
| 40 | - "DF", | ||
| 41 | - "Brasilia", | ||
| 42 | - @juridical_nature, | ||
| 43 | - @gov_power, | ||
| 44 | - @gov_sphere, | ||
| 45 | - "12.345.678/9012-90" | ||
| 46 | - ) | ||
| 47 | - | ||
| 48 | - end | ||
| 49 | - | ||
| 50 | - should "Search for institution with acronym" do | ||
| 51 | - xhr :get, :get_institutions, :query=>"TRU" | ||
| 52 | - | ||
| 53 | - json_response = ActiveSupport::JSON.decode(@response.body) | ||
| 54 | - | ||
| 55 | - assert_equal "Tribunal Regional da Uniao", json_response[0]["value"] | ||
| 56 | - end | ||
| 57 | - | ||
| 58 | - should "Search for institution with name" do | ||
| 59 | - xhr :get, :get_institutions, :query=>"Minis" | ||
| 60 | - | ||
| 61 | - json_response = ActiveSupport::JSON.decode(@response.body) | ||
| 62 | - | ||
| 63 | - assert_equal "Ministerio Publico da Uniao", json_response[0]["value"] | ||
| 64 | - end | ||
| 65 | - | ||
| 66 | - should "search with name or acronym and return a list with institutions" do | ||
| 67 | - xhr :get, :get_institutions, :query=>"uni" | ||
| 68 | - | ||
| 69 | - json_response = ActiveSupport::JSON.decode(@response.body) | ||
| 70 | - | ||
| 71 | - assert_equal "Ministerio Publico da Uniao", json_response[0]["value"] | ||
| 72 | - assert_equal "Tribunal Regional da Uniao", json_response[1]["value"] | ||
| 73 | - end | ||
| 74 | - | ||
| 75 | - should "method create_institution return the html for modal" do | ||
| 76 | - @controller.stubs(:current_user).returns(@admin.user) | ||
| 77 | - xhr :get, :create_institution | ||
| 78 | - assert_template 'create_institution' | ||
| 79 | - end | ||
| 80 | - | ||
| 81 | - should "create new institution with ajax without acronym" do | ||
| 82 | - @controller.stubs(:verify_recaptcha).returns(true) | ||
| 83 | - | ||
| 84 | - fields = InstitutionTestHelper.generate_form_fields( | ||
| 85 | - "foo bar", | ||
| 86 | - "BR", | ||
| 87 | - "DF", | ||
| 88 | - "Brasilia", | ||
| 89 | - "12.234.567/8900-10", | ||
| 90 | - "PublicInstitution" | ||
| 91 | - ) | ||
| 92 | - fields[:institutions][:governmental_power] = @gov_power.id | ||
| 93 | - fields[:institutions][:governmental_sphere] = @gov_sphere.id | ||
| 94 | - fields[:institutions][:juridical_nature] = @juridical_nature.id | ||
| 95 | - | ||
| 96 | - xhr :get, :new_institution, fields | ||
| 97 | - | ||
| 98 | - json_response = ActiveSupport::JSON.decode(@response.body) | ||
| 99 | - | ||
| 100 | - assert json_response["success"] | ||
| 101 | - end | ||
| 102 | - | ||
| 103 | - should "create a institution without cnpj" do | ||
| 104 | - @controller.stubs(:verify_recaptcha).returns(true) | ||
| 105 | - | ||
| 106 | - fields = InstitutionTestHelper.generate_form_fields( | ||
| 107 | - "Some Private Institution", | ||
| 108 | - "BR", | ||
| 109 | - "DF", | ||
| 110 | - "Brasilia", | ||
| 111 | - "", | ||
| 112 | - "PrivateInstitution" | ||
| 113 | - ) | ||
| 114 | - fields[:institutions][:acronym] = "SPI" | ||
| 115 | - | ||
| 116 | - xhr :get, :new_institution, fields | ||
| 117 | - | ||
| 118 | - json_response = ActiveSupport::JSON.decode(@response.body) | ||
| 119 | - | ||
| 120 | - assert json_response["success"] | ||
| 121 | - end | ||
| 122 | - | ||
| 123 | - should "verify if institution name already exists" do | ||
| 124 | - xhr :get, :institution_already_exists, :name=>"Ministerio Publico da Uniao" | ||
| 125 | - assert_equal "true", @response.body | ||
| 126 | - | ||
| 127 | - xhr :get, :institution_already_exists, :name=>"Another name here" | ||
| 128 | - assert_equal "false", @response.body | ||
| 129 | - end | ||
| 130 | - | ||
| 131 | - should "hide registration incomplete message" do | ||
| 132 | - xhr :get, :hide_registration_incomplete_percentage, :hide=>true | ||
| 133 | - assert_equal "true", @response.body | ||
| 134 | - end | ||
| 135 | - | ||
| 136 | - should "not hide registration incomplete message" do | ||
| 137 | - xhr :get, :hide_registration_incomplete_percentage, :hide=>false | ||
| 138 | - assert_equal "false", @response.body | ||
| 139 | - end | ||
| 140 | - | ||
| 141 | - should "Create new institution with method post" do | ||
| 142 | - @controller.stubs(:verify_recaptcha).returns(true) | ||
| 143 | - | ||
| 144 | - fields = InstitutionTestHelper.generate_form_fields( | ||
| 145 | - "Some Private Institution", | ||
| 146 | - "BR", | ||
| 147 | - "DF", | ||
| 148 | - "Brasilia", | ||
| 149 | - "12.345.567/8900-10", | ||
| 150 | - "PrivateInstitution" | ||
| 151 | - ) | ||
| 152 | - fields[:institutions][:acronym] = "SPI" | ||
| 153 | - | ||
| 154 | - post :new_institution, fields | ||
| 155 | - | ||
| 156 | - assert_redirected_to(controller: "admin_panel", action: "index") | ||
| 157 | - end | ||
| 158 | - | ||
| 159 | - should "not create new institution with method post without cnpj" do | ||
| 160 | - @controller.stubs(:verify_recaptcha).returns(true) | ||
| 161 | - | ||
| 162 | - fields = InstitutionTestHelper.generate_form_fields( | ||
| 163 | - "Some Private Institution", | ||
| 164 | - "BR", | ||
| 165 | - "DF", | ||
| 166 | - "Brasilia", | ||
| 167 | - "56.366.790/0001-88", | ||
| 168 | - "PrivateInstitution" | ||
| 169 | - ) | ||
| 170 | - | ||
| 171 | - post :new_institution, fields | ||
| 172 | - | ||
| 173 | - assert_redirected_to(controller: "admin_panel", action: "index") | ||
| 174 | - end | ||
| 175 | - | ||
| 176 | - should "Create foreign institution without city, state and cnpj by post" do | ||
| 177 | - @controller.stubs(:verify_recaptcha).returns(true) | ||
| 178 | - | ||
| 179 | - fields = InstitutionTestHelper.generate_form_fields( | ||
| 180 | - "Foreign institution", | ||
| 181 | - "AZ", | ||
| 182 | - "", | ||
| 183 | - "", | ||
| 184 | - "", | ||
| 185 | - "PrivateInstitution" | ||
| 186 | - ) | ||
| 187 | - fields[:institutions][:acronym] = "FI" | ||
| 188 | - | ||
| 189 | - post :new_institution, fields | ||
| 190 | - | ||
| 191 | - assert_redirected_to(controller: "admin_panel", action: "index") | ||
| 192 | - end | ||
| 193 | - | ||
| 194 | - should "Create foreign institution without city, state and cnpj by ajax" do | ||
| 195 | - @controller.stubs(:verify_recaptcha).returns(true) | ||
| 196 | - | ||
| 197 | - fields = InstitutionTestHelper.generate_form_fields( | ||
| 198 | - "Foreign institution", | ||
| 199 | - "AZ", | ||
| 200 | - "", | ||
| 201 | - "", | ||
| 202 | - "", | ||
| 203 | - "PrivateInstitution" | ||
| 204 | - ) | ||
| 205 | - fields[:institutions][:acronym] = "FI" | ||
| 206 | - | ||
| 207 | - xhr :post, :new_institution, fields | ||
| 208 | - | ||
| 209 | - json_response = ActiveSupport::JSON.decode(@response.body) | ||
| 210 | - | ||
| 211 | - assert json_response["success"] | ||
| 212 | - end | ||
| 213 | - | ||
| 214 | - should "add environment admins to institution when created via admin panel" do | ||
| 215 | - @controller.stubs(:verify_recaptcha).returns(true) | ||
| 216 | - admin2 = create_user("another_admin").person | ||
| 217 | - admin2.stubs(:has_permission?).returns("true") | ||
| 218 | - @environment.add_admin(admin2) | ||
| 219 | - @environment.save | ||
| 220 | - | ||
| 221 | - fields = InstitutionTestHelper.generate_form_fields( | ||
| 222 | - "Private Institution", | ||
| 223 | - "BR", | ||
| 224 | - "DF", | ||
| 225 | - "Brasilia", | ||
| 226 | - "12.323.557/8900-10", | ||
| 227 | - "PrivateInstitution" | ||
| 228 | - ) | ||
| 229 | - fields[:institutions][:acronym] = "PI" | ||
| 230 | - fields[:edit_institution_page] = false | ||
| 231 | - post :new_institution, fields | ||
| 232 | - | ||
| 233 | - assert(Institution.last.community.admins.include?(admin2) ) | ||
| 234 | - end | ||
| 235 | - | ||
| 236 | -end |
src/gov_user/test/functional/gov_user_plugin_myprofile_controller.rb
| @@ -1,105 +0,0 @@ | @@ -1,105 +0,0 @@ | ||
| 1 | -require File.dirname(__FILE__) + '/../../../../test/test_helper' | ||
| 2 | -require File.dirname(__FILE__) + '/../helpers/institution_test_helper' | ||
| 3 | -require( | ||
| 4 | -File.dirname(__FILE__) + | ||
| 5 | -'/../../controllers/gov_user_plugin_myprofile_controller' | ||
| 6 | -) | ||
| 7 | - | ||
| 8 | -class GovUserPluginMyprofileController; def rescue_action(e) raise e end; | ||
| 9 | -end | ||
| 10 | - | ||
| 11 | -class GovUserPluginMyprofileControllerTest < ActionController::TestCase | ||
| 12 | - def setup | ||
| 13 | - @controller = GovUserPluginMyprofileController.new | ||
| 14 | - @request = ActionController::TestRequest.new | ||
| 15 | - @response = ActionController::TestResponse.new | ||
| 16 | - @person = create_user('person').person | ||
| 17 | - @offer = create_user('Angela Silva') | ||
| 18 | - @offer_1 = create_user('Ana de Souza') | ||
| 19 | - @offer_2 = create_user('Angelo Roberto') | ||
| 20 | - | ||
| 21 | - login_as(@person.user_login) | ||
| 22 | - @environment = Environment.default | ||
| 23 | - @environment.enable_plugin('GovUserPlugin') | ||
| 24 | - @environment.save! | ||
| 25 | - end | ||
| 26 | - should "user edit its community institution" do | ||
| 27 | - govPower = GovernmentalPower.create(:name=>"Some Gov Power") | ||
| 28 | - govSphere = GovernmentalSphere.create(:name=>"Some Gov Sphere") | ||
| 29 | - juridical_nature = JuridicalNature.create(:name => "Autarquia") | ||
| 30 | - | ||
| 31 | - institution = InstitutionTestHelper.create_public_institution( | ||
| 32 | - "Ministerio Publico da Uniao", | ||
| 33 | - "MPU", | ||
| 34 | - "BR", | ||
| 35 | - "DF", | ||
| 36 | - "Gama", | ||
| 37 | - juridical_nature, | ||
| 38 | - govPower, | ||
| 39 | - govSphere, | ||
| 40 | - "12.345.678/9012-45" | ||
| 41 | - ) | ||
| 42 | - | ||
| 43 | - identifier = institution.community.identifier | ||
| 44 | - | ||
| 45 | - fields = InstitutionTestHelper.generate_form_fields( | ||
| 46 | - "institution new name", | ||
| 47 | - "BR", | ||
| 48 | - "DF", | ||
| 49 | - "Gama", | ||
| 50 | - "12.345.678/9012-45", | ||
| 51 | - "PrivateInstitution" | ||
| 52 | - ) | ||
| 53 | - | ||
| 54 | - post( | ||
| 55 | - :edit_institution, | ||
| 56 | - :profile=>institution.community.identifier, | ||
| 57 | - :community=>fields[:community], | ||
| 58 | - :institutions=>fields[:institutions] | ||
| 59 | - ) | ||
| 60 | - | ||
| 61 | - institution = Community[identifier].institution | ||
| 62 | - assert_not_equal "Ministerio Publico da Uniao", institution.community.name | ||
| 63 | - end | ||
| 64 | - | ||
| 65 | - should "not user edit its community institution with wrong values" do | ||
| 66 | - govPower = GovernmentalPower.create(:name=>"Some Gov Power") | ||
| 67 | - govSphere = GovernmentalSphere.create(:name=>"Some Gov Sphere") | ||
| 68 | - juridical_nature = JuridicalNature.create(:name => "Autarquia") | ||
| 69 | - | ||
| 70 | - institution = InstitutionTestHelper.create_public_institution( | ||
| 71 | - "Ministerio Publico da Uniao", | ||
| 72 | - "MPU", | ||
| 73 | - "BR", | ||
| 74 | - "DF", | ||
| 75 | - "Gama", | ||
| 76 | - juridical_nature, | ||
| 77 | - govPower, | ||
| 78 | - govSphere, | ||
| 79 | - "12.345.678/9012-45" | ||
| 80 | - ) | ||
| 81 | - | ||
| 82 | - identifier = institution.community.identifier | ||
| 83 | - | ||
| 84 | - fields = InstitutionTestHelper.generate_form_fields( | ||
| 85 | - "", | ||
| 86 | - "BR", | ||
| 87 | - "DF", | ||
| 88 | - "Gama", | ||
| 89 | - "6465465465", | ||
| 90 | - "PrivateInstitution" | ||
| 91 | - ) | ||
| 92 | - | ||
| 93 | - post( | ||
| 94 | - :edit_institution, | ||
| 95 | - :profile=>institution.community.identifier, | ||
| 96 | - :community=>fields[:community], | ||
| 97 | - :institutions=>fields[:institutions] | ||
| 98 | - ) | ||
| 99 | - | ||
| 100 | - institution = Community[identifier].institution | ||
| 101 | - assert_equal "Ministerio Publico da Uniao", institution.community.name | ||
| 102 | - assert_equal "12.345.678/9012-45", institution.cnpj | ||
| 103 | - end | ||
| 104 | - | ||
| 105 | -end |
src/gov_user/test/functional/profile_editor_controller_test.rb
| @@ -1,112 +0,0 @@ | @@ -1,112 +0,0 @@ | ||
| 1 | -require File.dirname(__FILE__) + '/../../../../test/test_helper' | ||
| 2 | -require File.dirname(__FILE__) + '/../helpers/institution_test_helper' | ||
| 3 | -require( | ||
| 4 | -File.dirname(__FILE__) + | ||
| 5 | -'/../../../../app/controllers/my_profile/profile_editor_controller' | ||
| 6 | -) | ||
| 7 | - | ||
| 8 | -class ProfileEditorController; def rescue_action(e) raise e end; end | ||
| 9 | - | ||
| 10 | -class ProfileEditorControllerTest < ActionController::TestCase | ||
| 11 | - | ||
| 12 | - def setup | ||
| 13 | - @controller = ProfileEditorController.new | ||
| 14 | - @request = ActionController::TestRequest.new | ||
| 15 | - @response = ActionController::TestResponse.new | ||
| 16 | - @profile = create_user('default_user').person | ||
| 17 | - | ||
| 18 | - Environment.default.affiliate( | ||
| 19 | - @profile, | ||
| 20 | - [Environment::Roles.admin(Environment.default.id)] + | ||
| 21 | - Profile::Roles.all_roles(Environment.default.id) | ||
| 22 | - ) | ||
| 23 | - | ||
| 24 | - @environment = Environment.default | ||
| 25 | - @environment.enabled_plugins = ['GovUserPlugin'] | ||
| 26 | - admin = create_user("adminuser").person | ||
| 27 | - admin.stubs(:has_permission?).returns("true") | ||
| 28 | - login_as('adminuser') | ||
| 29 | - @environment.add_admin(admin) | ||
| 30 | - @environment.save | ||
| 31 | - | ||
| 32 | - @govPower = GovernmentalPower.create(:name=>"Some Gov Power") | ||
| 33 | - @govSphere = GovernmentalSphere.create(:name=>"Some Gov Sphere") | ||
| 34 | - @juridical_nature = JuridicalNature.create(:name => "Autarquia") | ||
| 35 | - | ||
| 36 | - @institution_list = [] | ||
| 37 | - @institution_list << InstitutionTestHelper.create_public_institution( | ||
| 38 | - "Ministerio Publico da Uniao", | ||
| 39 | - "MPU", | ||
| 40 | - "BR", | ||
| 41 | - "DF", | ||
| 42 | - "Gama", | ||
| 43 | - @juridical_nature, | ||
| 44 | - @govPower, | ||
| 45 | - @govSphere, | ||
| 46 | - "12.345.678/9012-45" | ||
| 47 | - ) | ||
| 48 | - | ||
| 49 | - @institution_list << InstitutionTestHelper.create_public_institution( | ||
| 50 | - "Tribunal Regional da Uniao", | ||
| 51 | - "TRU", | ||
| 52 | - "BR", | ||
| 53 | - "DF", | ||
| 54 | - "Brasilia", | ||
| 55 | - @juridical_nature, | ||
| 56 | - @govPower, | ||
| 57 | - @govSphere, | ||
| 58 | - "12.345.678/9012-90" | ||
| 59 | - ) | ||
| 60 | - end | ||
| 61 | - | ||
| 62 | - should "add new institution for user into edit profile" do | ||
| 63 | - user = create_basic_user | ||
| 64 | - | ||
| 65 | - params_user = Hash.new | ||
| 66 | - params_user[:institution_ids] = [] | ||
| 67 | - | ||
| 68 | - @institution_list.each do |institution| | ||
| 69 | - params_user[:institution_ids] << institution.id | ||
| 70 | - end | ||
| 71 | - | ||
| 72 | - post :edit, :profile => User.last.person.identifier, :user => params_user | ||
| 73 | - | ||
| 74 | - assert_equal @institution_list.count, User.last.institutions.count | ||
| 75 | - end | ||
| 76 | - | ||
| 77 | - should "remove institutions for user into edit profile" do | ||
| 78 | - user = create_basic_user | ||
| 79 | - | ||
| 80 | - @institution_list.each do |institution| | ||
| 81 | - user.institutions << institution | ||
| 82 | - end | ||
| 83 | - user.save! | ||
| 84 | - | ||
| 85 | - params_user = Hash.new | ||
| 86 | - params_user[:institution_ids] = [] | ||
| 87 | - | ||
| 88 | - assert_equal @institution_list.count, User.last.institutions.count | ||
| 89 | - | ||
| 90 | - post :edit, :profile => User.last.person.identifier, :user => params_user | ||
| 91 | - | ||
| 92 | - assert_equal 0, User.last.institutions.count | ||
| 93 | - end | ||
| 94 | - | ||
| 95 | - protected | ||
| 96 | - | ||
| 97 | - def create_basic_user | ||
| 98 | - user = fast_create(User) | ||
| 99 | - user.person = fast_create(Person) | ||
| 100 | - user.person.user = user | ||
| 101 | - user.save! | ||
| 102 | - user.person.save! | ||
| 103 | - user | ||
| 104 | - end | ||
| 105 | - | ||
| 106 | - def create_community name | ||
| 107 | - community = fast_create(Community) | ||
| 108 | - community.name = name | ||
| 109 | - community.save | ||
| 110 | - community | ||
| 111 | - end | ||
| 112 | -end |
src/gov_user/test/functional/search_controller_test.rb
| @@ -1,57 +0,0 @@ | @@ -1,57 +0,0 @@ | ||
| 1 | -require File.dirname(__FILE__) + '/../../../../test/test_helper' | ||
| 2 | -require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' | ||
| 3 | -require( | ||
| 4 | -File.dirname(__FILE__) + | ||
| 5 | -'/../../../../app/controllers/public/search_controller' | ||
| 6 | -) | ||
| 7 | - | ||
| 8 | -class SearchController; def rescue_action(e) raise e end; end | ||
| 9 | - | ||
| 10 | -class SearchControllerTest < ActionController::TestCase | ||
| 11 | - include PluginTestHelper | ||
| 12 | - | ||
| 13 | - def setup | ||
| 14 | - @environment = Environment.default | ||
| 15 | - @environment.enabled_plugins = ['SoftwareCommunitiesPlugin'] | ||
| 16 | - @environment.save | ||
| 17 | - | ||
| 18 | - @controller = SearchController.new | ||
| 19 | - @request = ActionController::TestRequest.new | ||
| 20 | - @request.stubs(:ssl?).returns(:false) | ||
| 21 | - @response = ActionController::TestResponse.new | ||
| 22 | - end | ||
| 23 | - | ||
| 24 | - should "communities searches don't have institution" do | ||
| 25 | - community = create_community("New Community") | ||
| 26 | - institution = create_private_institution( | ||
| 27 | - "New Private Institution", | ||
| 28 | - "NPI" , | ||
| 29 | - "Brazil", | ||
| 30 | - "DF", | ||
| 31 | - "Gama", | ||
| 32 | - "66.544.314/0001-63" | ||
| 33 | - ) | ||
| 34 | - | ||
| 35 | - get :communities, :query => "New" | ||
| 36 | - | ||
| 37 | - assert_includes assigns(:searches)[:communities][:results], community | ||
| 38 | - assert_not_includes assigns(:searches)[:communities][:results], institution.community | ||
| 39 | - end | ||
| 40 | - | ||
| 41 | - should "institutions_search don't have community" do | ||
| 42 | - community = create_community("New Community") | ||
| 43 | - institution = create_private_institution( | ||
| 44 | - "New Private Institution", | ||
| 45 | - "NPI" , | ||
| 46 | - "Brazil", | ||
| 47 | - "DF", | ||
| 48 | - "Gama", | ||
| 49 | - "66.544.314/0001-63" | ||
| 50 | - ) | ||
| 51 | - | ||
| 52 | - get :institutions, :query => "New" | ||
| 53 | - | ||
| 54 | - assert_includes assigns(:searches)[:institutions][:results], institution.community | ||
| 55 | - assert_not_includes assigns(:searches)[:institutions][:results], community | ||
| 56 | - end | ||
| 57 | -end |
src/gov_user/test/helpers/institution_test_helper.rb
| @@ -1,59 +0,0 @@ | @@ -1,59 +0,0 @@ | ||
| 1 | -module InstitutionTestHelper | ||
| 2 | - | ||
| 3 | - def self.generate_form_fields name, country, state, city, cnpj, type | ||
| 4 | - fields = { | ||
| 5 | - :community => { | ||
| 6 | - :name => name, | ||
| 7 | - :country => country, | ||
| 8 | - :state => state, | ||
| 9 | - :city => city | ||
| 10 | - }, | ||
| 11 | - :institutions => { | ||
| 12 | - :cnpj=> cnpj, | ||
| 13 | - :type => type, | ||
| 14 | - :acronym => "", | ||
| 15 | - :governmental_power => "", | ||
| 16 | - :governmental_sphere => "", | ||
| 17 | - :juridical_nature => "", | ||
| 18 | - :corporate_name => "coporate default" | ||
| 19 | - } | ||
| 20 | - } | ||
| 21 | - fields | ||
| 22 | - end | ||
| 23 | - | ||
| 24 | - def self.create_public_institution name, acronym, country, state, city, juridical_nature, gov_p, gov_s, cnpj | ||
| 25 | - institution = PublicInstitution.new | ||
| 26 | - institution.community = institution_community(name, country, state, city) | ||
| 27 | - institution.name = name | ||
| 28 | - institution.juridical_nature = juridical_nature | ||
| 29 | - institution.acronym = acronym | ||
| 30 | - institution.governmental_power = gov_p | ||
| 31 | - institution.governmental_sphere = gov_s | ||
| 32 | - institution.cnpj = cnpj | ||
| 33 | - institution.corporate_name = "corporate default" | ||
| 34 | - institution.save | ||
| 35 | - institution | ||
| 36 | - end | ||
| 37 | - | ||
| 38 | - def self.create_private_institution name, acronym, country, state, city, cnpj | ||
| 39 | - institution = PrivateInstitution.new | ||
| 40 | - institution.community = institution_community(name, country, state, city) | ||
| 41 | - institution.name = name | ||
| 42 | - institution.acronym = acronym | ||
| 43 | - institution.cnpj = cnpj | ||
| 44 | - institution.corporate_name = "corporate default" | ||
| 45 | - institution.save | ||
| 46 | - | ||
| 47 | - institution | ||
| 48 | - end | ||
| 49 | - | ||
| 50 | - def self.institution_community name, country, state, city | ||
| 51 | - institution_community = Community::new | ||
| 52 | - institution_community.name = name | ||
| 53 | - institution_community.country = country | ||
| 54 | - institution_community.state = state | ||
| 55 | - institution_community.city = city | ||
| 56 | - institution_community.save | ||
| 57 | - institution_community | ||
| 58 | - end | ||
| 59 | -end | ||
| 60 | \ No newline at end of file | 0 | \ No newline at end of file |
src/gov_user/test/helpers/plugin_test_helper.rb
| @@ -1,77 +0,0 @@ | @@ -1,77 +0,0 @@ | ||
| 1 | -require File.dirname(__FILE__) + '/../helpers/institution_test_helper' | ||
| 2 | - | ||
| 3 | -module PluginTestHelper | ||
| 4 | - | ||
| 5 | - def create_person name, email, password, password_confirmation, secondary_email, state="state", city="city" | ||
| 6 | - user = create_user( | ||
| 7 | - name.to_slug, | ||
| 8 | - email, | ||
| 9 | - password, | ||
| 10 | - password_confirmation, | ||
| 11 | - secondary_email | ||
| 12 | - ) | ||
| 13 | - person = Person::new | ||
| 14 | - | ||
| 15 | - user.person = person | ||
| 16 | - person.user = user | ||
| 17 | - | ||
| 18 | - person.name = name | ||
| 19 | - person.identifier = name.to_slug | ||
| 20 | - person.state = state | ||
| 21 | - person.city = city | ||
| 22 | - | ||
| 23 | - user.save | ||
| 24 | - person.save | ||
| 25 | - | ||
| 26 | - person | ||
| 27 | - end | ||
| 28 | - | ||
| 29 | - def create_user login, email, password, password_confirmation, secondary_email | ||
| 30 | - user = User.new | ||
| 31 | - | ||
| 32 | - user.login = login | ||
| 33 | - user.email = email | ||
| 34 | - user.password = password | ||
| 35 | - user.password_confirmation = password_confirmation | ||
| 36 | - user.secondary_email = secondary_email | ||
| 37 | - | ||
| 38 | - user | ||
| 39 | - end | ||
| 40 | - | ||
| 41 | - def create_public_institution *params | ||
| 42 | - InstitutionTestHelper.create_public_institution *params | ||
| 43 | - end | ||
| 44 | - | ||
| 45 | - def create_community name | ||
| 46 | - community = fast_create(Community) | ||
| 47 | - community.name = name | ||
| 48 | - community.save | ||
| 49 | - community | ||
| 50 | - end | ||
| 51 | - | ||
| 52 | - | ||
| 53 | - def create_private_institution name, acronym, country, state, city, cnpj | ||
| 54 | - InstitutionTestHelper.create_private_institution( | ||
| 55 | - name, | ||
| 56 | - acronym, | ||
| 57 | - country, | ||
| 58 | - state, | ||
| 59 | - city, | ||
| 60 | - cnpj | ||
| 61 | - ) | ||
| 62 | - end | ||
| 63 | - | ||
| 64 | - def create_public_institution *params | ||
| 65 | - InstitutionTestHelper.create_public_institution *params | ||
| 66 | - end | ||
| 67 | - | ||
| 68 | - def create_community_institution name, country, state, city | ||
| 69 | - community = fast_create(Community) | ||
| 70 | - community.name = name | ||
| 71 | - community.country = country | ||
| 72 | - community.state = state | ||
| 73 | - community.city = city | ||
| 74 | - community.save | ||
| 75 | - community | ||
| 76 | - end | ||
| 77 | -end |
src/gov_user/test/unit/gov_user_person_test.rb
| @@ -1,58 +0,0 @@ | @@ -1,58 +0,0 @@ | ||
| 1 | -# encoding: utf-8 | ||
| 2 | - | ||
| 3 | -require File.dirname(__FILE__) + '/../../../../test/test_helper' | ||
| 4 | -require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' | ||
| 5 | - | ||
| 6 | -class SoftwareCommunitiesPluginPersonTest < ActiveSupport::TestCase | ||
| 7 | - include PluginTestHelper | ||
| 8 | - | ||
| 9 | - def setup | ||
| 10 | - @plugin = GovUserPlugin.new | ||
| 11 | - | ||
| 12 | - @user = fast_create(User) | ||
| 13 | - @person = create_person( | ||
| 14 | - "My Name", | ||
| 15 | - "user@email.com", | ||
| 16 | - "123456", | ||
| 17 | - "123456", | ||
| 18 | - "user2@email.com", | ||
| 19 | - "Any State", | ||
| 20 | - "Some City" | ||
| 21 | - ) | ||
| 22 | - end | ||
| 23 | - | ||
| 24 | - def teardown | ||
| 25 | - @plugin = nil | ||
| 26 | - end | ||
| 27 | - | ||
| 28 | - should 'be a noosfero plugin' do | ||
| 29 | - assert_kind_of Noosfero::Plugin, @plugin | ||
| 30 | - end | ||
| 31 | - | ||
| 32 | - should 'save person with a valid full name' do | ||
| 33 | - p = Person::new :name=>"S1mpl3 0f N4m3", :identifier=>"simple-name" | ||
| 34 | - p.user = fast_create(:user) | ||
| 35 | - | ||
| 36 | - assert_equal true, p.save | ||
| 37 | - end | ||
| 38 | - | ||
| 39 | - should 'save person with a valid full name with accents' do | ||
| 40 | - name = 'Jônatàs dâ Sîlvã Jösé' | ||
| 41 | - identifier = "jonatas-jose-da-silva" | ||
| 42 | - p = Person::new :name=>name, :identifier=>identifier | ||
| 43 | - p.user = fast_create(:user) | ||
| 44 | - | ||
| 45 | - assert_equal true, p.save | ||
| 46 | - end | ||
| 47 | - | ||
| 48 | - should 'not save person whose name has not capital letter' do | ||
| 49 | - p = Person::new :name=>"simple name" | ||
| 50 | - assert !p.save, _("Name Should begin with a capital letter and no special characters") | ||
| 51 | - end | ||
| 52 | - | ||
| 53 | - should 'not save person whose name has special characters' do | ||
| 54 | - p = Person::new :name=>"Simple N@me" | ||
| 55 | - | ||
| 56 | - assert !p.save , _("Name Should begin with a capital letter and no special characters") | ||
| 57 | - end | ||
| 58 | -end |
src/gov_user/test/unit/governmental_power_test.rb
| @@ -1,33 +0,0 @@ | @@ -1,33 +0,0 @@ | ||
| 1 | -require File.dirname(__FILE__) + '/../../../../test/test_helper' | ||
| 2 | -require File.dirname(__FILE__) + '/../helpers/institution_test_helper' | ||
| 3 | - | ||
| 4 | -class GovernmentalPowerTest < ActiveSupport::TestCase | ||
| 5 | - | ||
| 6 | - def setup | ||
| 7 | - @gov_sphere = GovernmentalSphere.create(:name=>"Some Gov Sphere") | ||
| 8 | - @juridical_nature = JuridicalNature.create(:name => "Autarquia") | ||
| 9 | - end | ||
| 10 | - | ||
| 11 | - def teardown | ||
| 12 | - Institution.destroy_all | ||
| 13 | - end | ||
| 14 | - | ||
| 15 | - should "get public institutions" do | ||
| 16 | - inst_name = "Ministerio Publico da Uniao" | ||
| 17 | - inst_cnpj = "12.345.678/9012-45" | ||
| 18 | - gov_power = GovernmentalPower.create(:name=>"Some gov power") | ||
| 19 | - InstitutionTestHelper.create_public_institution( | ||
| 20 | - inst_name, | ||
| 21 | - "MPU", | ||
| 22 | - "BR", | ||
| 23 | - "DF", | ||
| 24 | - "Gama", | ||
| 25 | - @juridical_nature, | ||
| 26 | - gov_power, | ||
| 27 | - @gov_sphere, | ||
| 28 | - inst_cnpj | ||
| 29 | - ) | ||
| 30 | - | ||
| 31 | - assert_equal gov_power.public_institutions.count, PublicInstitution.count | ||
| 32 | - end | ||
| 33 | -end | ||
| 34 | \ No newline at end of file | 0 | \ No newline at end of file |
src/gov_user/test/unit/institution_test.rb
| @@ -1,63 +0,0 @@ | @@ -1,63 +0,0 @@ | ||
| 1 | -require File.dirname(__FILE__) + '/../../../../test/test_helper' | ||
| 2 | -require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' | ||
| 3 | - | ||
| 4 | -class InstitutionTest < ActiveSupport::TestCase | ||
| 5 | - include PluginTestHelper | ||
| 6 | - def setup | ||
| 7 | - @gov_power = GovernmentalPower.create(:name=>"Some Gov Power") | ||
| 8 | - @gov_sphere = GovernmentalSphere.create(:name=>"Some Gov Sphere") | ||
| 9 | - @juridical_nature = JuridicalNature.create(:name => "Autarquia") | ||
| 10 | - | ||
| 11 | - @institution = create_public_institution( | ||
| 12 | - "Ministerio Publico da Uniao", | ||
| 13 | - "MPU", | ||
| 14 | - "BR", | ||
| 15 | - "DF", | ||
| 16 | - "Gama", | ||
| 17 | - @juridical_nature, | ||
| 18 | - @gov_power, | ||
| 19 | - @gov_sphere, | ||
| 20 | - "11.222.333/4444-55" | ||
| 21 | - ) | ||
| 22 | - end | ||
| 23 | - | ||
| 24 | - def teardown | ||
| 25 | - GovernmentalPower.destroy_all | ||
| 26 | - GovernmentalSphere.destroy_all | ||
| 27 | - JuridicalNature.destroy_all | ||
| 28 | - @institution = nil | ||
| 29 | - end | ||
| 30 | - should "not save institutions without name" do | ||
| 31 | - @institution.name = nil | ||
| 32 | - assert_equal false, @institution.save | ||
| 33 | - assert_equal true, @institution.errors.full_messages.include?("Name can't be blank") | ||
| 34 | - end | ||
| 35 | - | ||
| 36 | - should "not save if institution has invalid type" do | ||
| 37 | - invalid_msg = "Type invalid, only public and private institutions are allowed." | ||
| 38 | - @institution.type = "Other type" | ||
| 39 | - assert_equal false, @institution.save | ||
| 40 | - assert_equal true, @institution.errors.full_messages.include?(invalid_msg) | ||
| 41 | - end | ||
| 42 | - | ||
| 43 | - should "not save without country" do | ||
| 44 | - @institution.community.country = nil | ||
| 45 | - assert_equal false, @institution.save | ||
| 46 | - assert_equal true, @institution.errors.full_messages.include?("Country can't be blank") | ||
| 47 | - end | ||
| 48 | - | ||
| 49 | - should "not save without state" do | ||
| 50 | - @institution.community.state = nil | ||
| 51 | - | ||
| 52 | - assert_equal false, @institution.save | ||
| 53 | - assert_equal true, @institution.errors.full_messages.include?("State can't be blank") | ||
| 54 | - end | ||
| 55 | - | ||
| 56 | - should "not save without city" do | ||
| 57 | - @institution.community.city = nil | ||
| 58 | - @institution.community.state = "DF" | ||
| 59 | - | ||
| 60 | - assert_equal false, @institution.save | ||
| 61 | - assert_equal true, @institution.errors.full_messages.include?("City can't be blank") | ||
| 62 | - end | ||
| 63 | -end |
src/gov_user/test/unit/institutions_block_test.rb
| @@ -1,51 +0,0 @@ | @@ -1,51 +0,0 @@ | ||
| 1 | -require File.dirname(__FILE__) + '/../../../../test/test_helper' | ||
| 2 | -require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' | ||
| 3 | - | ||
| 4 | -class InstitutionsBlockTest < ActiveSupport::TestCase | ||
| 5 | - include PluginTestHelper | ||
| 6 | - should 'inherit from Block' do | ||
| 7 | - assert_kind_of Block, InstitutionsBlock.new | ||
| 8 | - end | ||
| 9 | - | ||
| 10 | - should 'declare its default title' do | ||
| 11 | - InstitutionsBlock.any_instance.stubs(:profile_count).returns(0) | ||
| 12 | - assert_not_equal Block.new.default_title, InstitutionsBlock.new.default_title | ||
| 13 | - end | ||
| 14 | - | ||
| 15 | - should 'describe itself' do | ||
| 16 | - assert_not_equal Block.description, InstitutionsBlock.description | ||
| 17 | - end | ||
| 18 | - | ||
| 19 | - should 'give empty footer on unsupported owner type' do | ||
| 20 | - block = InstitutionsBlock.new | ||
| 21 | - block.expects(:owner).returns(1) | ||
| 22 | - assert_equal '', block.footer | ||
| 23 | - end | ||
| 24 | - | ||
| 25 | - should 'list institutions' do | ||
| 26 | - user = create_person("Jose_Augusto", | ||
| 27 | - "jose_augusto@email.com", | ||
| 28 | - "aaaaaaa", | ||
| 29 | - "aaaaaaa", | ||
| 30 | - 'jose@secondary.com', | ||
| 31 | - "DF", | ||
| 32 | - "Gama" | ||
| 33 | - ) | ||
| 34 | - | ||
| 35 | - institution = create_private_institution( | ||
| 36 | - "inst name", | ||
| 37 | - "IN", | ||
| 38 | - "country", | ||
| 39 | - "state", | ||
| 40 | - "city", | ||
| 41 | - "00.111.222/3333-44" | ||
| 42 | - ) | ||
| 43 | - institution.community.add_member(user) | ||
| 44 | - | ||
| 45 | - block = InstitutionsBlock.new | ||
| 46 | - block.expects(:owner).at_least_once.returns(user) | ||
| 47 | - | ||
| 48 | - assert_equivalent [institution.community], block.profiles | ||
| 49 | - end | ||
| 50 | - | ||
| 51 | -end |
src/gov_user/test/unit/juridical_nature_test.rb
| @@ -1,23 +0,0 @@ | @@ -1,23 +0,0 @@ | ||
| 1 | -require File.dirname(__FILE__) + '/../../../../test/test_helper' | ||
| 2 | -require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' | ||
| 3 | - | ||
| 4 | -class JuridicalNatureTest < ActiveSupport::TestCase | ||
| 5 | - | ||
| 6 | - include PluginTestHelper | ||
| 7 | - | ||
| 8 | - def setup | ||
| 9 | - @govPower = GovernmentalPower.create(:name=>"Some Gov Power") | ||
| 10 | - @govSphere = GovernmentalSphere.create(:name=>"Some Gov Sphere") | ||
| 11 | - end | ||
| 12 | - | ||
| 13 | - def teardown | ||
| 14 | - Institution.destroy_all | ||
| 15 | - end | ||
| 16 | - | ||
| 17 | - should "get public institutions" do | ||
| 18 | - juridical_nature = JuridicalNature.create(:name => "Autarquia") | ||
| 19 | - create_public_institution("Ministerio Publico da Uniao", "MPU", "BR", "DF", "Gama", juridical_nature, @govPower, @govSphere, "22.333.444/5555-66") | ||
| 20 | - create_public_institution("Tribunal Regional da Uniao", "TRU", "BR", "DF", "Brasilia", juridical_nature, @govPower, @govSphere, "22.333.444/5555-77") | ||
| 21 | - assert juridical_nature.public_institutions.count == PublicInstitution.count | ||
| 22 | - end | ||
| 23 | -end |
src/gov_user/test/unit/organization_rating_test.rb
| @@ -1,44 +0,0 @@ | @@ -1,44 +0,0 @@ | ||
| 1 | -require File.expand_path(File.dirname(__FILE__)) + '/../../../../test/test_helper' | ||
| 2 | -require File.expand_path(File.dirname(__FILE__)) + '/../helpers/plugin_test_helper' | ||
| 3 | - | ||
| 4 | -class OrganizationRatingTest < ActiveSupport::TestCase | ||
| 5 | - include PluginTestHelper | ||
| 6 | - | ||
| 7 | - def setup | ||
| 8 | - @environment = Environment.default | ||
| 9 | - @environment.enabled_plugins = ['SoftwareCommunitiesPlugin'] | ||
| 10 | - @environment.save | ||
| 11 | - end | ||
| 12 | - | ||
| 13 | - should "validate institution if there is an institution_id" do | ||
| 14 | - person = fast_create(Person) | ||
| 15 | - community = fast_create(Community) | ||
| 16 | - private_institution = build_private_institution "huehue", "hue", "11.222.333/4444-55" | ||
| 17 | - | ||
| 18 | - community_rating = OrganizationRating.new(:person => person, :value => 3, :organization => community, :institution => private_institution) | ||
| 19 | - assert_equal false, community_rating.valid? | ||
| 20 | - | ||
| 21 | - assert_equal true, community_rating.errors[:institution].include?("not found") | ||
| 22 | - | ||
| 23 | - private_institution.save | ||
| 24 | - community_rating.institution = private_institution | ||
| 25 | - | ||
| 26 | - assert_equal true, community_rating.valid? | ||
| 27 | - assert_equal false, community_rating.errors[:institution].include?("not found") | ||
| 28 | - end | ||
| 29 | - | ||
| 30 | - private | ||
| 31 | - | ||
| 32 | - def build_private_institution name, corporate_name, cnpj, country="AR" | ||
| 33 | - community = Community.new :name => name | ||
| 34 | - community.country = country | ||
| 35 | - | ||
| 36 | - institution = PrivateInstitution.new :name=> name | ||
| 37 | - institution.corporate_name = corporate_name | ||
| 38 | - institution.cnpj = cnpj | ||
| 39 | - institution.community = community | ||
| 40 | - | ||
| 41 | - institution | ||
| 42 | - end | ||
| 43 | -end | ||
| 44 | - |
src/gov_user/test/unit/person_test.rb
| @@ -1,43 +0,0 @@ | @@ -1,43 +0,0 @@ | ||
| 1 | -require File.dirname(__FILE__) + '/../../../../test/test_helper' | ||
| 2 | -require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' | ||
| 3 | - | ||
| 4 | -class SoftwareCommunitiesPluginPersonTest < ActiveSupport::TestCase | ||
| 5 | - include PluginTestHelper | ||
| 6 | - def setup | ||
| 7 | - @plugin = GovUserPlugin.new | ||
| 8 | - | ||
| 9 | - @user = fast_create(User) | ||
| 10 | - @person = create_person( | ||
| 11 | - "My Name", | ||
| 12 | - "user@email.com", | ||
| 13 | - "123456", | ||
| 14 | - "123456", | ||
| 15 | - "user@secondaryemail.com", | ||
| 16 | - "Any State", | ||
| 17 | - "Some City" | ||
| 18 | - ) | ||
| 19 | - end | ||
| 20 | - | ||
| 21 | - should 'calculate the percentege of person incomplete fields' do | ||
| 22 | - @person.cell_phone = "76888919" | ||
| 23 | - @person.contact_phone = "987654321" | ||
| 24 | - | ||
| 25 | - assert_equal(67, @plugin.calc_percentage_registration(@person)) | ||
| 26 | - | ||
| 27 | - @person.comercial_phone = "11223344" | ||
| 28 | - @person.country = "I dont know" | ||
| 29 | - @person.state = "I dont know" | ||
| 30 | - @person.city = "I dont know" | ||
| 31 | - @person.organization_website = "www.whatever.com" | ||
| 32 | - @person.image = Image::new :uploaded_data=>fixture_file_upload('/files/rails.png', 'image/png') | ||
| 33 | - @person.save | ||
| 34 | - | ||
| 35 | - assert_equal(100, @plugin.calc_percentage_registration(@person)) | ||
| 36 | - end | ||
| 37 | - | ||
| 38 | - should 'return true when the email has not gov.br,jus.br,leg.br or mp.br' do | ||
| 39 | - @user.secondary_email = "test_email@com.br" | ||
| 40 | - @user.email = "test_email@net.br" | ||
| 41 | - assert @user.save | ||
| 42 | - end | ||
| 43 | -end |
src/gov_user/test/unit/private_institution_test.rb
| @@ -1,34 +0,0 @@ | @@ -1,34 +0,0 @@ | ||
| 1 | -require File.dirname(__FILE__) + '/../../../../test/test_helper' | ||
| 2 | -require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' | ||
| 3 | - | ||
| 4 | -class PrivateInstitutionTest < ActiveSupport::TestCase | ||
| 5 | - include PluginTestHelper | ||
| 6 | - def setup | ||
| 7 | - @institution = create_private_institution( | ||
| 8 | - "Simple Private Institution", | ||
| 9 | - "SPI", | ||
| 10 | - "BR", | ||
| 11 | - "DF", | ||
| 12 | - "Gama", | ||
| 13 | - "00.000.000/0001-00" | ||
| 14 | - ) | ||
| 15 | - end | ||
| 16 | - | ||
| 17 | - def teardown | ||
| 18 | - @institution = nil | ||
| 19 | - Institution.destroy_all | ||
| 20 | - end | ||
| 21 | - | ||
| 22 | - should "save without a cnpj" do | ||
| 23 | - @institution.cnpj = nil | ||
| 24 | - | ||
| 25 | - assert @institution.save | ||
| 26 | - end | ||
| 27 | - | ||
| 28 | - should "save without fantasy name" do | ||
| 29 | - @institution.acronym = nil | ||
| 30 | - @institution.community.save | ||
| 31 | - | ||
| 32 | - assert @institution.save | ||
| 33 | - end | ||
| 34 | -end |
src/gov_user/test/unit/public_institution_test.rb
| @@ -1,68 +0,0 @@ | @@ -1,68 +0,0 @@ | ||
| 1 | -require File.dirname(__FILE__) + '/../../../../test/test_helper' | ||
| 2 | -require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' | ||
| 3 | - | ||
| 4 | -class PublicInstitutionTest < ActiveSupport::TestCase | ||
| 5 | - include PluginTestHelper | ||
| 6 | - def setup | ||
| 7 | - @gov_power = GovernmentalPower.create(:name=>"Some Gov Power") | ||
| 8 | - @gov_sphere = GovernmentalSphere.create(:name=>"Some Gov Sphere") | ||
| 9 | - @juridical_nature = JuridicalNature.create(:name => "Autarquia") | ||
| 10 | - | ||
| 11 | - @institution = create_public_institution( | ||
| 12 | - "Ministerio Publico da Uniao", | ||
| 13 | - "MPU", | ||
| 14 | - "BR", | ||
| 15 | - "DF", | ||
| 16 | - "Gama", | ||
| 17 | - @juridical_nature, | ||
| 18 | - @gov_power, | ||
| 19 | - @gov_sphere, | ||
| 20 | - "11.222.333/4444-55" | ||
| 21 | - ) | ||
| 22 | - end | ||
| 23 | - | ||
| 24 | - def teardown | ||
| 25 | - GovernmentalPower.destroy_all | ||
| 26 | - GovernmentalSphere.destroy_all | ||
| 27 | - JuridicalNature.destroy_all | ||
| 28 | - Institution.destroy_all | ||
| 29 | - @gov_power = nil | ||
| 30 | - @gov_sphere = nil | ||
| 31 | - @juridical_nature = nil | ||
| 32 | - @institution = nil | ||
| 33 | - end | ||
| 34 | - | ||
| 35 | - should "save without a cnpj" do | ||
| 36 | - @institution.cnpj = nil | ||
| 37 | - assert @institution.save | ||
| 38 | - end | ||
| 39 | - | ||
| 40 | - should "save institution without an acronym" do | ||
| 41 | - @institution.acronym = nil | ||
| 42 | - assert @institution.save | ||
| 43 | - end | ||
| 44 | - | ||
| 45 | - should "Not save institution without a governmental_power" do | ||
| 46 | - invalid_msg = "Governmental power can't be blank" | ||
| 47 | - @institution.governmental_power = nil | ||
| 48 | - | ||
| 49 | - assert !@institution.save | ||
| 50 | - assert @institution.errors.full_messages.include? invalid_msg | ||
| 51 | - end | ||
| 52 | - | ||
| 53 | - should "Not save institution without a governmental_sphere" do | ||
| 54 | - invalid_msg = "Governmental sphere can't be blank" | ||
| 55 | - @institution.governmental_sphere = nil | ||
| 56 | - | ||
| 57 | - assert !@institution.save | ||
| 58 | - assert @institution.errors.full_messages.include? invalid_msg | ||
| 59 | - end | ||
| 60 | - | ||
| 61 | - should "not save institution without juridical nature" do | ||
| 62 | - invalid_msg = "Juridical nature can't be blank" | ||
| 63 | - @institution.juridical_nature = nil | ||
| 64 | - | ||
| 65 | - assert !@institution.save | ||
| 66 | - assert @institution.errors.full_messages.include? invalid_msg | ||
| 67 | - end | ||
| 68 | -end |
src/gov_user/test/unit/user_test.rb
| @@ -1,99 +0,0 @@ | @@ -1,99 +0,0 @@ | ||
| 1 | -require File.dirname(__FILE__) + '/../../../../test/test_helper' | ||
| 2 | -require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' | ||
| 3 | - | ||
| 4 | -class UserTest < ActiveSupport::TestCase | ||
| 5 | - include PluginTestHelper | ||
| 6 | - | ||
| 7 | - should 'not save user whose both email and secondary email are the same' do | ||
| 8 | - user = fast_create(User) | ||
| 9 | - user.email = "test@email.com" | ||
| 10 | - user.secondary_email = "test@email.com" | ||
| 11 | - | ||
| 12 | - assert !user.save | ||
| 13 | - end | ||
| 14 | - | ||
| 15 | - should 'not save user whose email and secondary email have been taken' do | ||
| 16 | - user1 = create_default_user | ||
| 17 | - user2 = fast_create(User) | ||
| 18 | - | ||
| 19 | - user2.email = "primary@email.com" | ||
| 20 | - user2.secondary_email = "secondary@email.com" | ||
| 21 | - assert !user2.save | ||
| 22 | - end | ||
| 23 | - | ||
| 24 | - should 'not save user whose email has already been used' do | ||
| 25 | - user1 = create_default_user | ||
| 26 | - user2 = fast_create(User) | ||
| 27 | - | ||
| 28 | - user2.email = "primary@email.com" | ||
| 29 | - user2.secondary_email = "noosfero@email.com" | ||
| 30 | - assert !user2.save | ||
| 31 | - end | ||
| 32 | - | ||
| 33 | - should 'not save user whose email has been taken another in users secondary email' do | ||
| 34 | - user1 = create_default_user | ||
| 35 | - user2 = fast_create(User) | ||
| 36 | - | ||
| 37 | - user2.login = "another-login" | ||
| 38 | - user2.email = "secondary@email.com" | ||
| 39 | - user2.secondary_email = "noosfero@email.com" | ||
| 40 | - assert !user2.save | ||
| 41 | - end | ||
| 42 | - | ||
| 43 | - should 'not save user whose secondary email has been taken used in another users email' do | ||
| 44 | - user1 = create_default_user | ||
| 45 | - user2 = fast_create(User) | ||
| 46 | - | ||
| 47 | - user2.login = "another-login" | ||
| 48 | - user2.email = "noosfero@email.com" | ||
| 49 | - user2.secondary_email = "primary@email.com" | ||
| 50 | - assert !user2.save | ||
| 51 | - end | ||
| 52 | - | ||
| 53 | - should 'not save user whose secondary email has already been used in another users secondary email' do | ||
| 54 | - user1 = create_default_user | ||
| 55 | - user2 = fast_create(User) | ||
| 56 | - | ||
| 57 | - user2.login = "another-login" | ||
| 58 | - user2.email = "noosfero@email.com" | ||
| 59 | - user2.secondary_email = "secondary@email.com" | ||
| 60 | - assert !user2.save | ||
| 61 | - end | ||
| 62 | - | ||
| 63 | - should 'not save user whose secondary email is in the wrong format' do | ||
| 64 | - user = fast_create(User) | ||
| 65 | - user.email = "test@email.com" | ||
| 66 | - user.secondary_email = "notarightformat.com" | ||
| 67 | - | ||
| 68 | - assert !user.save | ||
| 69 | - | ||
| 70 | - user.secondary_email = "not@arightformatcom" | ||
| 71 | - | ||
| 72 | - assert !user.save | ||
| 73 | - end | ||
| 74 | - | ||
| 75 | - should 'save more than one user without secondary email' do | ||
| 76 | - user = fast_create(User) | ||
| 77 | - user.email = "test@email.com" | ||
| 78 | - user.secondary_email = "" | ||
| 79 | - user.save | ||
| 80 | - | ||
| 81 | - user2 = fast_create(User) | ||
| 82 | - user2.email = "test2@email.com" | ||
| 83 | - user2.secondary_email = "" | ||
| 84 | - assert user2.save | ||
| 85 | - end | ||
| 86 | - | ||
| 87 | - private | ||
| 88 | - | ||
| 89 | - def create_default_user | ||
| 90 | - user = fast_create(User) | ||
| 91 | - user.login = "a-login" | ||
| 92 | - user.email = "primary@email.com" | ||
| 93 | - user.secondary_email = "secondary@email.com" | ||
| 94 | - user.save | ||
| 95 | - | ||
| 96 | - return user | ||
| 97 | - end | ||
| 98 | - | ||
| 99 | -end |
src/gov_user/views/gov_user_plugin/_institution.html.erb
| @@ -1,128 +0,0 @@ | @@ -1,128 +0,0 @@ | ||
| 1 | -<h1><%= _('New Institution') %></h1> | ||
| 2 | - | ||
| 3 | -<% if environment.enabled?('admin_must_approve_new_communities') %> | ||
| 4 | - <div class='explanation'> | ||
| 5 | - <%= _("Note that the creation of communities in this environment is restricted. Your request to create this new community will be sent to %{environment} administrators and will be approved or rejected according to their methods and criteria.") % { :environment => environment.name }%> | ||
| 6 | - </div> | ||
| 7 | -<%end %> | ||
| 8 | - | ||
| 9 | -<% unless flash[:errors].nil? %> | ||
| 10 | -<div class="errorExplanation" id="errorExplanation"> | ||
| 11 | - <h2> <%= _("Can`t create new Institution: #{flash[:errors].length} errors") %> </h2> | ||
| 12 | - <ul> | ||
| 13 | - <% flash[:errors].each do |key, value| %> | ||
| 14 | - <% key_name = key.to_s.gsub("_", " ") %> | ||
| 15 | - <% if value.length > 0 %> | ||
| 16 | - <li> <%= _("<b>#{key_name.capitalize}</b> #{value.join()}") %> </li> | ||
| 17 | - <% end %> | ||
| 18 | - <% end %> | ||
| 19 | - </ul> | ||
| 20 | -</div> | ||
| 21 | -<% end %> | ||
| 22 | - | ||
| 23 | -<div id = 'create_institution_errors' class='errorExplanation hide-field'></div> | ||
| 24 | - | ||
| 25 | -<div> | ||
| 26 | - <%= labelled_form_for :community, :url => {:action=>"new_institution"}, :html => { :multipart => true, :id=>"institution_form" } do |f| %> | ||
| 27 | - <%= required_fields_message %> | ||
| 28 | - <%= hidden_field_tag "edit_institution_page", false %> | ||
| 29 | - <%= fields_for :institutions do |inst| %> | ||
| 30 | - <span class=''> | ||
| 31 | - <div class='formfield type-radio'> | ||
| 32 | - <label> | ||
| 33 | - <%= _("Private Institution") %> | ||
| 34 | - <%= radio_button_tag("institutions[type]" ,"PrivateInstitution", true)%> | ||
| 35 | - </label> | ||
| 36 | - | ||
| 37 | - <label> <%= _("Public Institution") %> | ||
| 38 | - <%= radio_button_tag("institutions[type]", "PublicInstitution") %> | ||
| 39 | - </label> | ||
| 40 | - </div> | ||
| 41 | - </span> | ||
| 42 | - | ||
| 43 | - <%= required f.text_field(:name, :class => flash[:error_community_name], :value => params[:community][:name]) %> | ||
| 44 | - <%= content_tag :span, _("Institution name already exists"), :id=>"already_exists_text", :class=>"errorExplanation hide-field" %> | ||
| 45 | - | ||
| 46 | - <span class='optional-field'> | ||
| 47 | - <div class="formfield type-text"> | ||
| 48 | - <%= inst.label "corporate_name", _("Corporate Name"), :class=>"formlabel" %> | ||
| 49 | - <%= inst.text_field(:corporate_name, :value => params[:institutions][:corporate_name], :size => 55) %> | ||
| 50 | - </div> | ||
| 51 | - </span> | ||
| 52 | - | ||
| 53 | - <%= required select_country(_('Country'), 'community', 'country', {:class => "type-select #{flash[:error_community_country]}", :id => "community_country"}) %> | ||
| 54 | - | ||
| 55 | - <span class='required-field'> | ||
| 56 | - <div class="formfield"> | ||
| 57 | - <label for="community_state" class="formlabel"><%= _("State") %></label> | ||
| 58 | - <%= f.select(:state, @state_options, {:selected => params[:community][:state]}, {:class => flash[:error_community_state]}) %> | ||
| 59 | - </div> | ||
| 60 | - </span> | ||
| 61 | - | ||
| 62 | - <%= required f.text_field(:city, :class => flash[:error_community_city], :value => params[:community][:city]) %> | ||
| 63 | - | ||
| 64 | - | ||
| 65 | - <div class="formfield type-text"> | ||
| 66 | - <%= inst.label("cnpj" ,_("CNPJ"), :class=>"formlabel") %> | ||
| 67 | - <%= required inst.text_field(:cnpj, :placeholder=>"99.999.999/9999-99", :class=>"intitution_cnpj_field", :value => params[:institutions][:cnpj]) %> | ||
| 68 | - </div> | ||
| 69 | - | ||
| 70 | - <span class='optional-field'> | ||
| 71 | - <div class="formfield type-text"> | ||
| 72 | - <%= hidden_field_tag "acronym_translate", _("Acronym") %> | ||
| 73 | - <%= hidden_field_tag "fantasy_name_translate", _("Fantasy name") %> | ||
| 74 | - <%= inst.label("acronym" ,_("Acronym"), :class=>"formlabel") %> | ||
| 75 | - <%= inst.text_field(:acronym, :value => params[:institutions][:acronym]) %> | ||
| 76 | - </div> | ||
| 77 | - </span> | ||
| 78 | - | ||
| 79 | - <span class='required-field public-institutions-fields'> | ||
| 80 | - <div class="formfield type-text"> | ||
| 81 | - <%= inst.label("governmental_sphere_id" ,_("Governmental Sphere:"), :class=>"formlabel") %> | ||
| 82 | - <%= inst.select(:governmental_sphere, @governmental_sphere, :selected=>params[:institutions][:governmental_sphere], :class => flash[:error_institution_governmental_sphere])%> | ||
| 83 | - </div> | ||
| 84 | - </span> | ||
| 85 | - | ||
| 86 | - <span class='required-field public-institutions-fields'> | ||
| 87 | - <div class="formfield type-text"> | ||
| 88 | - <%= inst.label("governmental_power_id" ,_("Governmental Power:"), :class=>"formlabel") %> | ||
| 89 | - <%= inst.select(:governmental_power, @governmental_power, :selected=>params[:institutions][:governmental_sphere], :class => flash[:error_institution_governmental_power])%> | ||
| 90 | - </div> | ||
| 91 | - </span> | ||
| 92 | - <span class='required-field public-institutions-fields'> | ||
| 93 | - <div class="formfield type-text"> | ||
| 94 | - <%= inst.label("juridical_nature_id" ,_("Juridical Nature:"), :class=>"formlabel") %> | ||
| 95 | - <%= inst.select(:juridical_nature, @juridical_nature, :selected=>params[:institutions][:juridical_nature], :class => flash[:error_institution_juridical_nature])%> | ||
| 96 | - </div> | ||
| 97 | - </span> | ||
| 98 | - | ||
| 99 | - <span class='required-field public-institutions-fields'> | ||
| 100 | - <div class="formfield type-text"> | ||
| 101 | - <%= _("SISP?") %> | ||
| 102 | - <% if @show_sisp_field %> | ||
| 103 | - <%= inst.radio_button(:sisp, true, :class => "#{flash[:error_institution_sisp]}" ) %> | ||
| 104 | - <%= inst.label :sisp ,_("Yes"), :value => true %> | ||
| 105 | - <%= inst.radio_button(:sisp, false, :checked=>"checked", :class => "#{flash[:error_institution_sisp]}") %> | ||
| 106 | - <%= inst.label :sisp ,_("No"), :value => false %> | ||
| 107 | - <% else %> | ||
| 108 | - <%= inst.label("sisp", _("No")) %> | ||
| 109 | - <% end %> | ||
| 110 | - </div> | ||
| 111 | - </span> | ||
| 112 | - | ||
| 113 | - <% if @url_token == "create_institution_admin" %> | ||
| 114 | - <%= submit_button :save, _('Save') %> | ||
| 115 | - <%= button(:cancel, _("Cancel"), {:controller => "admin_panel", :action => 'index'}) %> | ||
| 116 | - <%else%> | ||
| 117 | - <div> | ||
| 118 | - <%= link_to(_('Save'), '#', :id=>'save_institution_button', :class=>'button with-text icon-add') %> | ||
| 119 | - <%= link_to(_('Cancel'), '#', :id=>"cancel_institution_button", :class=>'button with-text icon-cancel') %> | ||
| 120 | - </div> | ||
| 121 | - <%= hidden_field_tag :institution_error_message, _("Could not send the form data to the server") %> | ||
| 122 | - <%end%> | ||
| 123 | - | ||
| 124 | - <% end %> | ||
| 125 | - | ||
| 126 | - <% end %> | ||
| 127 | -</div> | ||
| 128 | -<%= hidden_field_tag :loading_message, _("Creating institution") %> |
src/gov_user/views/gov_user_plugin/create_institution.html.erb
| @@ -1 +0,0 @@ | @@ -1 +0,0 @@ | ||
| 1 | -<%= render :partial => "institution" %> |
src/gov_user/views/gov_user_plugin/create_institution_admin.html.erb
| @@ -1 +0,0 @@ | @@ -1 +0,0 @@ | ||
| 1 | -<%= render :partial => "institution" %> |
src/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb
| @@ -1,114 +0,0 @@ | @@ -1,114 +0,0 @@ | ||
| 1 | -<h1><%= _('Edit Institution') %></h1> | ||
| 2 | - | ||
| 3 | -<% if environment.enabled?('admin_must_approve_new_communities') %> | ||
| 4 | - <div class='explanation'> | ||
| 5 | - <%= _("Note that the creation of communities in this environment is restricted. Your request to create this new community will be sent to %{environment} administrators and will be approved or rejected according to their methods and criteria.") % { :environment => environment.name }%> | ||
| 6 | - </div> | ||
| 7 | -<%end %> | ||
| 8 | - | ||
| 9 | -<% unless flash[:errors].blank? %> | ||
| 10 | - <div class="errorExplanation" id="errorExplanation"> | ||
| 11 | - <h2> <%= _("Can`t create new Institution: #{flash[:errors].length} errors") %> </h2> | ||
| 12 | - <ul> | ||
| 13 | - <% flash[:errors].each do |error| %> | ||
| 14 | - <li> <%= error %> </li> | ||
| 15 | - <% end %> | ||
| 16 | - </ul> | ||
| 17 | - </div> | ||
| 18 | -<% end %> | ||
| 19 | - | ||
| 20 | -<div id = 'create_institution_errors' class='errorExplanation hide-field'></div> | ||
| 21 | - | ||
| 22 | -<div> | ||
| 23 | - <%= labelled_form_for :community,:html => { :multipart => true, :id=>"institution_form" } do |f| %> | ||
| 24 | - <%= hidden_field_tag "edit_institution_page", true %> | ||
| 25 | - <%= fields_for :institutions do |inst| %> | ||
| 26 | - <span class=''> | ||
| 27 | - <div class='formfield type-radio'> | ||
| 28 | - <label> <%= _("Public Institution") %> | ||
| 29 | - <%= radio_button_tag("institutions[type]", "PublicInstitution", (@institution.type == "PublicInstitution" ? true : false)) %> | ||
| 30 | - </label> | ||
| 31 | - | ||
| 32 | - <label> | ||
| 33 | - <%= _("Private Institution") %> | ||
| 34 | - <%= radio_button_tag("institutions[type]" ,"PrivateInstitution", (@institution.type == "PrivateInstitution" ? true : false))%> | ||
| 35 | - </label> | ||
| 36 | - </div> | ||
| 37 | - </span> | ||
| 38 | - | ||
| 39 | - <%= required f.text_field(:name, :value => @institution.community.name) %> | ||
| 40 | - <%= content_tag :span, _("Institution name already exists"), :id=>"already_exists_text", :class=>"errorExplanation hide-field" %> | ||
| 41 | - | ||
| 42 | - <span class='required-field'> | ||
| 43 | - <div class="formfield type-text"> | ||
| 44 | - <%= inst.label "corporate_name", _("Corporate Name"), :class=>"formlabel" %> | ||
| 45 | - <%= required inst.text_field(:corporate_name, :value => @institution.corporate_name) %> | ||
| 46 | - </div> | ||
| 47 | - </span> | ||
| 48 | - | ||
| 49 | - <%= required select_country(_('Country'), 'community', 'country', {:class => 'type-select', :id => "community_country"}, :selected => @institution.community.country) %> | ||
| 50 | - | ||
| 51 | - <span class='required-field'> | ||
| 52 | - <div class="formfield"> | ||
| 53 | - <label for="community_state" class="formlabel"><%= _("State") %></label> | ||
| 54 | - <%= f.select(:state, @state_list.collect {|state| [state.name, state.name]}, :selected => @institution.community.state) %> | ||
| 55 | - </div> | ||
| 56 | - </span> | ||
| 57 | - | ||
| 58 | - <%= required f.text_field(:city, :value => @institution.community.city) %> | ||
| 59 | - | ||
| 60 | - | ||
| 61 | - <span class='optional-field'> | ||
| 62 | - <div class="formfield type-text"> | ||
| 63 | - <%= inst.label("cnpj" ,_("CNPJ"), :class=>"formlabel") %> | ||
| 64 | - <%= required inst.text_field(:cnpj, :placeholder=>"99.999.999/9999-99", :class=>"intitution_cnpj_field", :value => @institution.cnpj) %> | ||
| 65 | - </div> | ||
| 66 | - </span> | ||
| 67 | - | ||
| 68 | - <span class='optional-field'> | ||
| 69 | - <div class="formfield type-text"> | ||
| 70 | - <%= hidden_field_tag "acronym_translate", _("Acronym") %> | ||
| 71 | - <%= hidden_field_tag "fantasy_name_translate", _("Fantasy name") %> | ||
| 72 | - <%= inst.label("acronym" ,_("Acronym"), :class=>"formlabel") %> | ||
| 73 | - <%= inst.text_field(:acronym, :value => @institution.acronym) %> | ||
| 74 | - </div> | ||
| 75 | - </span> | ||
| 76 | - | ||
| 77 | - <span class='required-field public-institutions-fields'> | ||
| 78 | - <div class="formfield type-text"> | ||
| 79 | - <%= inst.label("governmental_sphere_id" ,_("Governmental Sphere:"), :class=>"formlabel") %> | ||
| 80 | - <%= inst.select(:governmental_sphere, [[_("Select a Governmental Sphere"), 0]]|GovernmentalSphere.all.map {|s| [s.name, s.id]}, {:selected=>@institution.governmental_power_id})%> | ||
| 81 | - </div> | ||
| 82 | - </span> | ||
| 83 | - | ||
| 84 | - <span class='required-field public-institutions-fields'> | ||
| 85 | - <div class="formfield type-text"> | ||
| 86 | - <%= inst.label("governmental_power_id" ,_("Governmental Power:"), :class=>"formlabel") %> | ||
| 87 | - <%= inst.select(:governmental_power, [[_("Select a Governmental Power"), 0]]|GovernmentalPower.all.map {|g| [g.name, g.id]}, {:selected=> @institution.governmental_sphere_id})%> | ||
| 88 | - </div> | ||
| 89 | - </span> | ||
| 90 | - <span class='required-field public-institutions-fields'> | ||
| 91 | - <div class="formfield type-text"> | ||
| 92 | - <%= inst.label("juridical_nature_id" ,_("Juridical Nature:"), :class=>"formlabel") %> | ||
| 93 | - <%= inst.select(:juridical_nature, [[_("Select a Juridical Nature"), 0]]|JuridicalNature.all.map {|j| [j.name, j.id]}, {:selected=> @institution.juridical_nature_id})%> | ||
| 94 | - </div> | ||
| 95 | - </span> | ||
| 96 | - | ||
| 97 | - <span class='required-field public-institutions-fields'> | ||
| 98 | - <div class="formfield type-text"> | ||
| 99 | - <%= _("SISP?") %> | ||
| 100 | - <% if @show_sisp_field %> | ||
| 101 | - <%= inst.label("sisp" ,_("Yes")) %> | ||
| 102 | - <%= inst.radio_button(:sisp, true, :checked=>(@institution.sisp ? true : false)) %> | ||
| 103 | - <%= inst.label("sisp" ,_("No")) %> | ||
| 104 | - <%= inst.radio_button(:sisp, false, :checked=>(@institution.sisp ? false : true)) %> | ||
| 105 | - <% else %> | ||
| 106 | - <%= inst.label("sisp", _("No")) %> | ||
| 107 | - <% end %> | ||
| 108 | - </div> | ||
| 109 | - </span> | ||
| 110 | - | ||
| 111 | - <%= submit_button :save, _('Save') %> | ||
| 112 | - <% end %> | ||
| 113 | -<% end %> | ||
| 114 | - |
src/gov_user/views/incomplete_registration.html.erb
| @@ -1,11 +0,0 @@ | @@ -1,11 +0,0 @@ | ||
| 1 | -<div id='complete_registration'> | ||
| 2 | - <div id="complete_registration_message"> | ||
| 3 | - <div><%= _("Complete Profile")+": <span>#{@percentege}</span>%" %></div> | ||
| 4 | - <canvas id="complete_registration_percentage" width="100%" height="20"></canvas> | ||
| 5 | - <div> | ||
| 6 | - <%= link_to _("Complete your profile"), "#{Noosfero.root}/myprofile/#{@person.identifier}/profile_editor/edit" %> | | ||
| 7 | - <%= link_to _("Hide"), "#", :class=>"hide-incomplete-percentage" %> | ||
| 8 | - </div> | ||
| 9 | - </div> | ||
| 10 | -</div> | ||
| 11 | -</div> |
src/gov_user/views/organization_ratings_extra_fields_show_institution.html.erb
src/gov_user/views/person_editor_extras.html.erb
| @@ -1,42 +0,0 @@ | @@ -1,42 +0,0 @@ | ||
| 1 | -<div class="formfieldline"> | ||
| 2 | - <%= label_tag "user[secondary_email]", _('Secondary e-mail')+":", :class=>"formlabel" %> | ||
| 3 | - | ||
| 4 | - <div class="formfield type-text"> | ||
| 5 | - <%= text_field_tag "user[secondary_email]", context.profile.user.secondary_email %> | ||
| 6 | - </div> | ||
| 7 | -</div> | ||
| 8 | - | ||
| 9 | - | ||
| 10 | -<div class="formfieldline" id="select_institution"> | ||
| 11 | - <%= label_tag "user[institution_ids]", _('Institutions'), :class=>"formlabel" %> | ||
| 12 | - | ||
| 13 | - <div class="institution_container"> | ||
| 14 | - <%= text_field_tag(:institution, "", :id=>"input_institution") %> | ||
| 15 | - | ||
| 16 | - <% context.profile.user.institutions.each do |institution| %> | ||
| 17 | - <%= hidden_field_tag("user[institution_ids][]", institution.id, :class => 'user_institutions') %> | ||
| 18 | - <% end %> | ||
| 19 | - </div> | ||
| 20 | - | ||
| 21 | - <%= content_tag(:div, _("No institution found"), :id=>"institution_empty_ajax_message", :class=>"errorExplanation hide-field") %> | ||
| 22 | - <%= link_to(_("Add new institution"), "#", :class=>'button with-text icon-add', :id => 'add_new_institution') %> | ||
| 23 | - <%= link_to(_("Create new institution"), "#", :id=>"create_institution_link", :class=>'button with-text icon-add') %> | ||
| 24 | - <%= content_tag(:div, "", :id=>"institution_dialog") %> | ||
| 25 | - | ||
| 26 | - <%= hidden_field_tag("user[institution_ids][]", "", :class => 'user_institutions') %> | ||
| 27 | - <%= hidden_field_tag("institution_selected", "") %> | ||
| 28 | - | ||
| 29 | - <ul class="institutions_added"> | ||
| 30 | - <% context.profile.user.institutions.each do |institution| %> | ||
| 31 | - <li data-institution="<%= institution.id %>"> | ||
| 32 | - <%= institution.name %> | ||
| 33 | - <%= link_to("", "#", :class => "button without-text icon-remove remove-institution") %> | ||
| 34 | - </li> | ||
| 35 | - <% end %> | ||
| 36 | - </ul> | ||
| 37 | -</div> | ||
| 38 | - | ||
| 39 | -<%= hidden_field_tag("full_name_error", _("Should begin with a capital letter and no special characters")) %> | ||
| 40 | -<%= hidden_field_tag("email_error", _("Email should have the following format: name@host.br")) %> | ||
| 41 | -<%= hidden_field_tag("site_error", _("Site should have a valid format: http://name.hosts")) %> | ||
| 42 | -<div id="email_public_message"><%= _("If you work in a public agency use your government e-Mail") %> </div> |
src/gov_user/views/profile/_institution_tab.html.erb
| @@ -1,21 +0,0 @@ | @@ -1,21 +0,0 @@ | ||
| 1 | -<table> | ||
| 2 | - <tr> | ||
| 3 | - <th colspan='2'><%= _('Institution Information')%></th> | ||
| 4 | - </tr> | ||
| 5 | - | ||
| 6 | - <%= display_mpog_field(_('Type:'), profile.institution, :type, true) %> | ||
| 7 | - <%= display_mpog_field(_('CNPJ:'), profile.institution, :cnpj, true) %> | ||
| 8 | - <%= display_mpog_field(_('Last modification:'), profile.institution, :date_modification, true) %> | ||
| 9 | - <%= display_mpog_field(_('Country:'), profile.institution.community, :country, true) %> | ||
| 10 | - <%= display_mpog_field(_('State:'), profile.institution.community, :state, true) %> | ||
| 11 | - <%= display_mpog_field(_('City:'), profile.institution.community, :city, true) %> | ||
| 12 | - <% if profile.institution.type == "PrivateInstitution"%> | ||
| 13 | - <%= display_mpog_field(_('Fantasy Name:'), profile.institution, :acronym, true) %> | ||
| 14 | - <% else %> | ||
| 15 | - <%= display_mpog_field(_('Acronym:'), profile.institution, :acronym, true) %> | ||
| 16 | - <%= display_mpog_field(_('Governmental Power:'), profile.institution.governmental_power, :name, true) %> | ||
| 17 | - <%= display_mpog_field(_('Governmental Sphere:'), profile.institution.governmental_sphere, :name, true) %> | ||
| 18 | - <%= display_mpog_field(_('Juridical Nature:'), profile.institution.juridical_nature, :name, true) %> | ||
| 19 | - <%= content_tag('tr', content_tag('td', _("SISP:")) + content_tag('td', profile.institution.sisp ? _("Yes") : _("No"))) %> | ||
| 20 | - <% end %> | ||
| 21 | -</table> |
src/gov_user/views/profile/_profile_tab.html.erb
src/gov_user/views/ratings_extra_field.html.erb
| @@ -1,10 +0,0 @@ | @@ -1,10 +0,0 @@ | ||
| 1 | -<div id="input_institution_comments"> | ||
| 2 | - <%= label_tag "input_institution", _("Organization name or Enterprise name")%> | ||
| 3 | - <span class="star-tooltip" title="Órgão ou Empresa que você representa e utiliza o software"></span> | ||
| 4 | - <input type="text" id="input_institution"> | ||
| 5 | - | ||
| 6 | - <%= content_tag(:div, _("No institution found"), | ||
| 7 | - :id=>"institution_empty_ajax_message", | ||
| 8 | - :class=>"errorExplanation hide-field") %> | ||
| 9 | - <%= hidden_field_tag "organization_rating[institution_id]", "", id: "institution_selected" %> | ||
| 10 | -</div> |
src/gov_user/views/search/institutions.html.erb
| @@ -1,16 +0,0 @@ | @@ -1,16 +0,0 @@ | ||
| 1 | -<%= search_page_title( @titles[@asset], @category ) %> | ||
| 2 | - | ||
| 3 | -<%= render :partial => 'search_form', :locals => { :hint => _("Type words about the %s you're looking for") % @asset.to_s.singularize } %> | ||
| 4 | - | ||
| 5 | -<%= display_results(@searches, @asset) %> | ||
| 6 | -<% if params[:display] != 'map' %> | ||
| 7 | - <%= pagination_links @searches[@asset][:results] %> | ||
| 8 | -<% end %> | ||
| 9 | - | ||
| 10 | -<div style="clear: both"></div> | ||
| 11 | - | ||
| 12 | -<% if @asset == :product %> | ||
| 13 | - <%= javascript_tag do %> | ||
| 14 | - jQuery('.search-product-price-details').altBeautify(); | ||
| 15 | - <% end %> | ||
| 16 | -<% end %> |
src/noosfero-spb-theme/.gitignore
src/noosfero-spb-theme/README.md
src/noosfero-spb-theme/categories.html.erb
| @@ -1,7 +0,0 @@ | @@ -1,7 +0,0 @@ | ||
| 1 | -<ul id="cat_menu"> | ||
| 2 | - <% @environment.top_level_categories.find(:all, :conditions => {:display_in_menu => true}).each do |item| %> | ||
| 3 | - <li id="category category_<%= item.path %>" > | ||
| 4 | - <%= link_to(item.name, {:controller => :search, :action => 'category_index', :category_path => item.path }, :title => item.name, :style=>"color: ##{item.display_color || '000000'}" ) %> | ||
| 5 | - </li> | ||
| 6 | - <% end %> | ||
| 7 | -</ul><!-- fim id="cat_menu" --> |
src/noosfero-spb-theme/css/administration-panel.css
| @@ -1,159 +0,0 @@ | @@ -1,159 +0,0 @@ | ||
| 1 | -/*** Environment Admin Pages - General Rules ***/ | ||
| 2 | -.action-admin_panel-index #content .main-block h2, | ||
| 3 | -.controller-features #content .main-block h2{ | ||
| 4 | - font-family: Arial; | ||
| 5 | - font-size: 22px; | ||
| 6 | - font-weight: 700; | ||
| 7 | - line-height: 21px; | ||
| 8 | -} | ||
| 9 | - | ||
| 10 | -/* Environment Settings */ | ||
| 11 | - | ||
| 12 | -/* Profile tab */ | ||
| 13 | - | ||
| 14 | -.action-admin_panel-site_info .main-content .ui-tabs{ | ||
| 15 | - border: none; | ||
| 16 | -} | ||
| 17 | - | ||
| 18 | -.action-admin_panel-site_info .main-content .ui-tabs .ui-tabs-nav{ | ||
| 19 | - margin: 0 0 0 1em; | ||
| 20 | - padding: 0; | ||
| 21 | - background: none; | ||
| 22 | - color: #172738; | ||
| 23 | - border: 0px solid #aaaaaa; | ||
| 24 | - border-radius: 4px; | ||
| 25 | - font-weight: bold; | ||
| 26 | -} | ||
| 27 | - | ||
| 28 | -.action-admin_panel-site_info .main-content .ui-widget-content .ui-state-default, | ||
| 29 | -.action-admin_panel-site_info .main-content .ui-widget-header .ui-state-default{ | ||
| 30 | - background: #d5d5d5 none; | ||
| 31 | - color: #555555; | ||
| 32 | - font-weight: normal; | ||
| 33 | -} | ||
| 34 | - | ||
| 35 | -.action-admin_panel-site_info .main-content .ui-widget-content .ui-state-active, | ||
| 36 | -.action-admin_panel-site_info .main-content .ui-widget-header .ui-state-active{ | ||
| 37 | - background: #eeeff1; | ||
| 38 | - color: #212121; | ||
| 39 | - font-weight: normal; | ||
| 40 | -} | ||
| 41 | - | ||
| 42 | -.action-admin_panel-site_info .main-content .ui-tabs .ui-tabs-panel{ | ||
| 43 | - display: block; | ||
| 44 | - padding: 1em 1.4em; | ||
| 45 | - background-color: #eeeff1; | ||
| 46 | - color: #777; | ||
| 47 | - border-width: 1px; | ||
| 48 | - font-size: 13px; | ||
| 49 | - text-decoration: none; | ||
| 50 | -} | ||
| 51 | - | ||
| 52 | -/* Organizations Settings */ | ||
| 53 | - | ||
| 54 | -.action-organizations-index .main-block form#manage-profiles, | ||
| 55 | -.action-organizations-index .main-block form#manage-profiles form{ | ||
| 56 | - background-color: transparent; | ||
| 57 | -} | ||
| 58 | - | ||
| 59 | -.action-organizations-index .main-block form#manage-profiles .search-field{ | ||
| 60 | - margin-bottom: 30px; | ||
| 61 | -} | ||
| 62 | - | ||
| 63 | -.action-organizations-index .main-block form#manage-profiles .search-field .formfield { | ||
| 64 | - width: 100%; | ||
| 65 | - margin-right: 0.5em; | ||
| 66 | - float: left; | ||
| 67 | -} | ||
| 68 | - | ||
| 69 | -.action-organizations-index .main-block form#manage-profiles .search-field .formfield input { | ||
| 70 | - margin-top: 0px; | ||
| 71 | - margin-right: 0.5em; | ||
| 72 | - padding: 6px; | ||
| 73 | - min-width: 97%; | ||
| 74 | - height: 19px; | ||
| 75 | - max-height: 19px; | ||
| 76 | - background: none; | ||
| 77 | - border: 1px solid #ccc; | ||
| 78 | - border-radius: 4px; | ||
| 79 | -} | ||
| 80 | - | ||
| 81 | -.action-organizations-index .main-block form#manage-profiles input.button.submit{ | ||
| 82 | - height: 32px; | ||
| 83 | - margin-top: 8px; | ||
| 84 | - padding: 5px 15px; | ||
| 85 | - background: #3E67B1 none; | ||
| 86 | - color: #FFF; | ||
| 87 | - border-radius: 4px; | ||
| 88 | - border: 1px solid #3E67B1; | ||
| 89 | - line-height: 22px; | ||
| 90 | - font-size: 14px; | ||
| 91 | - text-transform: uppercase; | ||
| 92 | -} | ||
| 93 | - | ||
| 94 | -.action-organizations-index .main-block form#manage-profiles input.button.submit:hover{ | ||
| 95 | - background: #5E82C6; | ||
| 96 | -} | ||
| 97 | - | ||
| 98 | -.action-organizations-index .main-block #environment-profiles-filter-title, | ||
| 99 | -.action-organizations-index .main-block #environment-profiles-filter-filter{ | ||
| 100 | - line-height: 35px; | ||
| 101 | - font-size: 12px; | ||
| 102 | -} | ||
| 103 | - | ||
| 104 | -.action-organizations-index .main-block table#organizations-list th{ | ||
| 105 | - text-align: left; | ||
| 106 | - vertical-align: middle; | ||
| 107 | - padding: 2px 8px; | ||
| 108 | -} | ||
| 109 | - | ||
| 110 | -/*** Features Settings ***/ | ||
| 111 | - | ||
| 112 | -.controller-features #content form *{ | ||
| 113 | - font-size: 15px; | ||
| 114 | -} | ||
| 115 | - | ||
| 116 | -.controller-features #content th{ | ||
| 117 | - text-align: left; | ||
| 118 | -} | ||
| 119 | - | ||
| 120 | -.controller-features #content h3{ | ||
| 121 | - min-height: 0; | ||
| 122 | - margin: 20px auto 10px auto; | ||
| 123 | -} | ||
| 124 | - | ||
| 125 | -.controller-features #content hr{ | ||
| 126 | - display: none; | ||
| 127 | -} | ||
| 128 | - | ||
| 129 | -.controller-features #content ul.token-input-list{ | ||
| 130 | - padding: 6px; | ||
| 131 | - background: none; | ||
| 132 | - border: 1px solid #ccc; | ||
| 133 | - border-radius: 4px; | ||
| 134 | - font-family: Arial, helvetica; | ||
| 135 | - font-size: 15px; | ||
| 136 | -} | ||
| 137 | - | ||
| 138 | -/*** Community Admin pages ***/ | ||
| 139 | -/* Homepage */ | ||
| 140 | -.action-profile_editor-index #profile-editor-index h1.block-title{ | ||
| 141 | - color: #172738; | ||
| 142 | - background-color: transparent; | ||
| 143 | - border-bottom: none; | ||
| 144 | - font-size: 2.3em; | ||
| 145 | - font-weight: bold; | ||
| 146 | - font-variant: normal; | ||
| 147 | - font-family: Arial, open_sansbold, Helvetica, sans-serif; | ||
| 148 | -} | ||
| 149 | - | ||
| 150 | -/* Index */ | ||
| 151 | -.action-cms-index .cms-articles th{ | ||
| 152 | - text-align: left; | ||
| 153 | -} | ||
| 154 | - | ||
| 155 | -/* Spam Index */ | ||
| 156 | -.action-spam-index .ui-widget-header { | ||
| 157 | - border: none; | ||
| 158 | - background: none; | ||
| 159 | -} |
src/noosfero-spb-theme/css/animate.css
| @@ -1,68 +0,0 @@ | @@ -1,68 +0,0 @@ | ||
| 1 | -.animated { | ||
| 2 | - -webkit-animation-duration: .7s; | ||
| 3 | - animation-duration: .7s; | ||
| 4 | - -webkit-animation-fill-mode: both; | ||
| 5 | - animation-fill-mode: both; | ||
| 6 | -} | ||
| 7 | - | ||
| 8 | -@-webkit-keyframes slideInDown { | ||
| 9 | - from { | ||
| 10 | - -webkit-transform: translate3d(0, -100%, 0); | ||
| 11 | - transform: translate3d(0, -100%, 0); | ||
| 12 | - visibility: visible; | ||
| 13 | - } | ||
| 14 | - | ||
| 15 | - 100% { | ||
| 16 | - -webkit-transform: translate3d(0, 0, 0); | ||
| 17 | - transform: translate3d(0, 0, 0); | ||
| 18 | - } | ||
| 19 | -} | ||
| 20 | - | ||
| 21 | -@keyframes slideInDown { | ||
| 22 | - from { | ||
| 23 | - -webkit-transform: translate3d(0, -100%, 0); | ||
| 24 | - transform: translate3d(0, -100%, 0); | ||
| 25 | - visibility: visible; | ||
| 26 | - } | ||
| 27 | - | ||
| 28 | - 100% { | ||
| 29 | - -webkit-transform: translate3d(0, 0, 0); | ||
| 30 | - transform: translate3d(0, 0, 0); | ||
| 31 | - } | ||
| 32 | -} | ||
| 33 | - | ||
| 34 | -.slideInDown { | ||
| 35 | - -webkit-animation-name: slideInDown; | ||
| 36 | - animation-name: slideInDown; | ||
| 37 | -} | ||
| 38 | - | ||
| 39 | -@-webkit-keyframes slideOutUp { | ||
| 40 | - from { | ||
| 41 | - -webkit-transform: translate3d(0, 0, 0); | ||
| 42 | - transform: translate3d(0, 0, 0); | ||
| 43 | - } | ||
| 44 | - | ||
| 45 | - 100% { | ||
| 46 | - visibility: hidden; | ||
| 47 | - -webkit-transform: translate3d(0, -100%, 0); | ||
| 48 | - transform: translate3d(0, -100%, 0); | ||
| 49 | - } | ||
| 50 | -} | ||
| 51 | - | ||
| 52 | -@keyframes slideOutUp { | ||
| 53 | - from { | ||
| 54 | - -webkit-transform: translate3d(0, 0, 0); | ||
| 55 | - transform: translate3d(0, 0, 0); | ||
| 56 | - } | ||
| 57 | - | ||
| 58 | - 100% { | ||
| 59 | - visibility: hidden; | ||
| 60 | - -webkit-transform: translate3d(0, -100%, 0); | ||
| 61 | - transform: translate3d(0, -100%, 0); | ||
| 62 | - } | ||
| 63 | -} | ||
| 64 | - | ||
| 65 | -.slideOutUp { | ||
| 66 | - -webkit-animation-name: slideOutUp; | ||
| 67 | - animation-name: slideOutUp; | ||
| 68 | -} |
src/noosfero-spb-theme/css/article-page.css
| @@ -1,256 +0,0 @@ | @@ -1,256 +0,0 @@ | ||
| 1 | -/*** General Definitions ***/ | ||
| 2 | -#content .main-block #article-header h1.title{ | ||
| 3 | - margin-bottom: 10px; | ||
| 4 | - padding: 0px 0px 10px 0px; | ||
| 5 | - color: #172738; | ||
| 6 | - border-bottom: 1px solid #D3D6DE; | ||
| 7 | - font-family: Arial, open_sansbold, Helvetica, sans-serif; | ||
| 8 | - font-size: 34px; | ||
| 9 | - font-variant: normal; | ||
| 10 | - font-weight: bold; | ||
| 11 | - line-height: 37px; | ||
| 12 | -} | ||
| 13 | - | ||
| 14 | -#content .main-block #article-header .publishing-info span{ | ||
| 15 | - font-size: 12px; | ||
| 16 | - color: #172738; | ||
| 17 | - font-family: Arial; | ||
| 18 | -} | ||
| 19 | - | ||
| 20 | -#content .main-block .publishing-info a{ | ||
| 21 | - color: #2C66CE; | ||
| 22 | - font-family: Arial; | ||
| 23 | -} | ||
| 24 | - | ||
| 25 | -#content .main-block .article-body { | ||
| 26 | - font-family: Arial ; | ||
| 27 | - font-size: 15px; | ||
| 28 | - line-height: 21px; | ||
| 29 | -} | ||
| 30 | - | ||
| 31 | -#content #article-parent{ | ||
| 32 | - margin: 0px 0px 10px 0; | ||
| 33 | - font-style: normal; | ||
| 34 | - text-align: left; | ||
| 35 | -} | ||
| 36 | - | ||
| 37 | -#content #article-parent a.button.with-text{ | ||
| 38 | - height: 18px; | ||
| 39 | - padding: 5px; | ||
| 40 | - background-color: #3E67B1; | ||
| 41 | - color: #FFF; | ||
| 42 | - border-radius: 4px; | ||
| 43 | - border: 1px solid #3E67B1; | ||
| 44 | - font-size: 12px; | ||
| 45 | - line-height: 18px; | ||
| 46 | - text-transform: none; | ||
| 47 | -} | ||
| 48 | - | ||
| 49 | -#content #article-parent a.button.with-text:hover{ | ||
| 50 | - background-color: #5E82C6; | ||
| 51 | - border-color: #5E82C6; | ||
| 52 | -} | ||
| 53 | - | ||
| 54 | -#content #article-parent a.button.with-text::before{ | ||
| 55 | - content: "\f053"; | ||
| 56 | - font-family: FontAwesome; | ||
| 57 | - padding-right: 4px; | ||
| 58 | - padding-left: 2px; | ||
| 59 | - color: #ffffff; | ||
| 60 | - border-radius: 4px; | ||
| 61 | - text-align: center; | ||
| 62 | -} | ||
| 63 | - | ||
| 64 | -/* Need a dev solution - blog internal pages*/ | ||
| 65 | - | ||
| 66 | -#article-header .preview{ | ||
| 67 | - display: none; | ||
| 68 | -} | ||
| 69 | - | ||
| 70 | -#article-hits { | ||
| 71 | - display: none; | ||
| 72 | - | ||
| 73 | -} | ||
| 74 | - | ||
| 75 | -/* For software internal pages */ | ||
| 76 | - | ||
| 77 | -#content .main-block .article-body h2 { | ||
| 78 | - margin-bottom: 20px; | ||
| 79 | - font-family: Arial; | ||
| 80 | - font-size: 16px; | ||
| 81 | - font-weight: bold; | ||
| 82 | - line-height: 21px; | ||
| 83 | -} | ||
| 84 | - | ||
| 85 | -#content .main-block .article-body h3 { | ||
| 86 | - margin-bottom: 20px; | ||
| 87 | - font-size: 15px; | ||
| 88 | - line-height: 21px; | ||
| 89 | - font-weight: bold; | ||
| 90 | - font-family: Arial; | ||
| 91 | -} | ||
| 92 | - | ||
| 93 | -#content .main-block .article-body p{ | ||
| 94 | - margin-bottom: 22px; | ||
| 95 | - font-family: Arial; | ||
| 96 | -} | ||
| 97 | - | ||
| 98 | -#content .main-block .article-body .zoomable-image, | ||
| 99 | -#content .main-block .article-body img { | ||
| 100 | - display: block; | ||
| 101 | -} | ||
| 102 | - | ||
| 103 | -#content .main-block .article-body hr { | ||
| 104 | - height: 0; | ||
| 105 | - margin: 30px 0; | ||
| 106 | - border: 0; | ||
| 107 | - border-top: 1px solid rgba(0, 0, 0, 0.1); | ||
| 108 | - border-bottom: 1px solid rgba(255, 255, 255, 0.3); | ||
| 109 | -} | ||
| 110 | - | ||
| 111 | -#content .main-block .article-body #article-actions:last-child{ | ||
| 112 | - margin: 0; | ||
| 113 | - padding: 10px 0; | ||
| 114 | - border-top: 3px solid #172938; | ||
| 115 | -} | ||
| 116 | - | ||
| 117 | -#content .main-block .article-body #article-actions { | ||
| 118 | - display: none; | ||
| 119 | -} | ||
| 120 | - | ||
| 121 | -/*** Categories ***/ | ||
| 122 | - | ||
| 123 | -#content .main-block #article-cat{ | ||
| 124 | - border-top: 4px solid #2C4B6B; | ||
| 125 | - border-bottom: 1px solid #D3D6DE; | ||
| 126 | -} | ||
| 127 | - | ||
| 128 | -#content .main-block #article-cat h4 { | ||
| 129 | - float: left; | ||
| 130 | - margin: 12px 10px 10px 0; | ||
| 131 | - min-height: 0px; | ||
| 132 | - color: #5E82C6; | ||
| 133 | - font-family: Arial; | ||
| 134 | - font-size: 12px; | ||
| 135 | - font-weight: 300; | ||
| 136 | - text-decoration: initial; | ||
| 137 | -} | ||
| 138 | - | ||
| 139 | -#content .main-block #article-cat a{ | ||
| 140 | - display: inline-block; | ||
| 141 | - margin: 10px 10px 10px 0; | ||
| 142 | - padding: 3px 10px; | ||
| 143 | - color: #5E82C6; | ||
| 144 | - background-color: #ECEDF1; | ||
| 145 | - border: 1px solid #D3D6DE; | ||
| 146 | - border-radius: 3px; | ||
| 147 | - font-size: 12px; | ||
| 148 | - text-decoration: initial; | ||
| 149 | -} | ||
| 150 | - | ||
| 151 | -/*** Tags ***/ | ||
| 152 | - | ||
| 153 | -#content .main-block #article-tags{ | ||
| 154 | - display: none; /* wait to fix label */ | ||
| 155 | - width: 100%; | ||
| 156 | - color: #5E82C6; | ||
| 157 | - border-bottom: 1px solid #D3D6DE; | ||
| 158 | - font-family: Arial; | ||
| 159 | - font-size: 12px; | ||
| 160 | - font-weight: 300; | ||
| 161 | - text-align: left; | ||
| 162 | -} | ||
| 163 | - | ||
| 164 | -#content .main-block #article-tags a{ | ||
| 165 | - display: inline-block; | ||
| 166 | - margin: 10px 10px 10px 0; | ||
| 167 | - padding: 3px 10px; | ||
| 168 | - color: #5E82C6; | ||
| 169 | - background-color: #ECEDF1; | ||
| 170 | - border: 1px solid #D3D6DE; | ||
| 171 | - border-radius: 3px; | ||
| 172 | - font-size: 12px; | ||
| 173 | - text-decoration: initial; | ||
| 174 | -} | ||
| 175 | - | ||
| 176 | -/*** Site Map page ***/ | ||
| 177 | - | ||
| 178 | -#content .main-block .article-body #sitemap{ | ||
| 179 | - overflow: auto; | ||
| 180 | -} | ||
| 181 | - | ||
| 182 | -#content .main-block .article-body #sitemap a{ | ||
| 183 | - text-decoration: initial; | ||
| 184 | -} | ||
| 185 | - | ||
| 186 | -#content .main-block .article-body #sitemap ul{ | ||
| 187 | - padding-top: 20px; | ||
| 188 | - font-weight: 700; | ||
| 189 | -} | ||
| 190 | - | ||
| 191 | -#content .main-block .article-body #sitemap li{ | ||
| 192 | - padding-left: 10px; | ||
| 193 | - font-weight: 500; | ||
| 194 | -} | ||
| 195 | - | ||
| 196 | -#content .main-block .article-body #sitemap #first-half{ | ||
| 197 | - float: left; | ||
| 198 | - width: 40%; | ||
| 199 | -} | ||
| 200 | - | ||
| 201 | -#content .main-block .article-body #sitemap #second-half{ | ||
| 202 | - float: left; | ||
| 203 | - padding-top: 50px; | ||
| 204 | - width: 40%; | ||
| 205 | -} | ||
| 206 | - | ||
| 207 | -/*** end of sitemap page ***/ | ||
| 208 | - | ||
| 209 | -/*** Help page ***/ | ||
| 210 | - | ||
| 211 | -#content .main-block .article-body ul.help-list li { | ||
| 212 | - list-style-type: none; | ||
| 213 | - padding-bottom: 5px; | ||
| 214 | -} | ||
| 215 | - | ||
| 216 | -#content .main-block .article-body ul.help-list li a[href="#faq"]:before { | ||
| 217 | - content: url('../images/arrow-globe-icon.png'); | ||
| 218 | - padding-right: 5px; | ||
| 219 | - vertical-align: middle; | ||
| 220 | -} | ||
| 221 | - | ||
| 222 | -#content .main-block .article-body ul.help-list li a[href="#lista-discussao"]:before { | ||
| 223 | - content: url('../images/balloon-icon.png'); | ||
| 224 | - padding-left: 3px; | ||
| 225 | - padding-right: 6px; | ||
| 226 | - vertical-align: middle; | ||
| 227 | -} | ||
| 228 | - | ||
| 229 | -#content .main-block .article-body ul.help-list li a { | ||
| 230 | - color: #2c66ce; | ||
| 231 | - font-size: 15px; | ||
| 232 | -} | ||
| 233 | - | ||
| 234 | -#content .main-block .article-body ul.help-list { | ||
| 235 | - padding-top: 21px; | ||
| 236 | - border-top: 1px solid #D3D6DE; | ||
| 237 | -} | ||
| 238 | - | ||
| 239 | -#content .main-block .article-header h1.help-page-title { | ||
| 240 | - margin-top: 0px; | ||
| 241 | - margin-bottom: 30px; | ||
| 242 | - padding: 0px; | ||
| 243 | - color: #172738; | ||
| 244 | - line-height: 30px; | ||
| 245 | - border: none; | ||
| 246 | - letter-spacing: -0.1px; | ||
| 247 | - font-family: Arial; | ||
| 248 | - font-size: 26px; | ||
| 249 | - font-variant: normal; | ||
| 250 | -} | ||
| 251 | - | ||
| 252 | -#content .main-block .article-body p a { | ||
| 253 | - color: #2c66ce; | ||
| 254 | -} | ||
| 255 | - | ||
| 256 | -/*** end of help page ***/ |
src/noosfero-spb-theme/css/community-pages.css
| @@ -1,1130 +0,0 @@ | @@ -1,1130 +0,0 @@ | ||
| 1 | -/*** Home page - profile page ***/ | ||
| 2 | -.action-profile-index .main-content{ | ||
| 3 | - padding:0px; | ||
| 4 | -} | ||
| 5 | -.action-profile-index .page-profile-header{ | ||
| 6 | - display: block; | ||
| 7 | - border-bottom: 1px solid #D3D6DE; | ||
| 8 | - padding-bottom:30px; | ||
| 9 | - margin-bottom: 30px; | ||
| 10 | -} | ||
| 11 | -.action-profile-index .page-profile-header .join-leave-button.require-login-popup{ | ||
| 12 | - float:left; | ||
| 13 | - width: 35%; | ||
| 14 | -} | ||
| 15 | -.action-profile-index #content .page-profile-header a.button.with-text { | ||
| 16 | - padding: 5px 15px; | ||
| 17 | - border: 1px solid #D3D6DE; | ||
| 18 | - text-transform: none; | ||
| 19 | - font-size: 12px; | ||
| 20 | -} | ||
| 21 | -.action-profile-index #content .page-profile-header .control-panel-button a{ | ||
| 22 | - background:#3E67B1; | ||
| 23 | - color:#fff; | ||
| 24 | -} | ||
| 25 | -.action-profile-index #content .page-profile-header .control-panel-button a.button.with-text, | ||
| 26 | -.action-profile-index #content .page-profile-header .join-leave-button a:hover{ | ||
| 27 | - border:1px solid #3E67B1; | ||
| 28 | -} | ||
| 29 | - | ||
| 30 | - | ||
| 31 | - | ||
| 32 | -/* Profile header */ | ||
| 33 | -.profile-type-is-community .action-profile-index #content .main-block h1 { | ||
| 34 | - color: #172738; | ||
| 35 | - border-bottom: none; | ||
| 36 | - font-size: 2.3em; | ||
| 37 | - font-weight: bold; | ||
| 38 | - font-variant: normal; | ||
| 39 | - font-family: Arial, open_sansbold, Helvetica, sans-serif; | ||
| 40 | -} | ||
| 41 | - | ||
| 42 | -/* Search form - need to develop solution - hidden on profile page*/ | ||
| 43 | -.profile-type-is-community .action-profile-index #public-profile-search{ | ||
| 44 | - display: none; | ||
| 45 | -} | ||
| 46 | - | ||
| 47 | -.action-profile-index .main-block #public-profile-search, | ||
| 48 | -.action-profile-index .main-block #profile-search-results form, | ||
| 49 | -.action-profile-index .main-block .profile-search-block form { | ||
| 50 | - background-color: transparent; | ||
| 51 | -} | ||
| 52 | - | ||
| 53 | -.action-profile-index .main-block #public-profile-search .search-field .formfield { | ||
| 54 | - float: left; | ||
| 55 | - margin-right: 0.5em; | ||
| 56 | -} | ||
| 57 | - | ||
| 58 | -.action-profile-index .main-block #public-profile-search .search-field .formfield input { | ||
| 59 | - margin-top: 0px; | ||
| 60 | - margin-right: 0.5em; | ||
| 61 | - padding: 6px; | ||
| 62 | - height: 19px; | ||
| 63 | - max-height: 19px; | ||
| 64 | - border: 1px solid #D3D6DE; | ||
| 65 | - border-radius: 4px; | ||
| 66 | -} | ||
| 67 | - | ||
| 68 | -.action-profile-index .main-block #public-profile-search .formfield input, | ||
| 69 | -.action-profile-index .main-block #public-profile-search .formfield textarea{ | ||
| 70 | - width: 100%; | ||
| 71 | - background: none #FFFFFF; | ||
| 72 | - color: #585858; | ||
| 73 | - border: 1px solid #DDDDDD; | ||
| 74 | - font-size: 16px; | ||
| 75 | - word-wrap: break-word; | ||
| 76 | -} | ||
| 77 | - | ||
| 78 | -.action-profile-index .main-block #public-profile-search form input.button.submit { | ||
| 79 | - height: 32px; | ||
| 80 | - margin-top: 8px; | ||
| 81 | - padding: 5px 15px; | ||
| 82 | - color: #ffffff; | ||
| 83 | - background: #2B51A8; | ||
| 84 | - border-radius: 4px; | ||
| 85 | - border: 1px solid #2B51A8; | ||
| 86 | - font-size: 14px; | ||
| 87 | - line-height: 14px; | ||
| 88 | - text-transform: uppercase; | ||
| 89 | -} | ||
| 90 | - | ||
| 91 | -/* Profile tab */ | ||
| 92 | -.profile-type-is-community .action-profile-index .profile{ | ||
| 93 | - display: none; | ||
| 94 | -} | ||
| 95 | - | ||
| 96 | -#block-community-tabs{ | ||
| 97 | - font-family: Arial; | ||
| 98 | -} | ||
| 99 | - | ||
| 100 | -#block-community-tabs .ui-corner-all{ | ||
| 101 | - overflow: visible; | ||
| 102 | -} | ||
| 103 | - | ||
| 104 | -#content #block-community-tabs .iu-widget{ | ||
| 105 | - font-size: 0px ; | ||
| 106 | -} | ||
| 107 | - | ||
| 108 | -#block-community-tabs .ui-widget-header{ | ||
| 109 | - background:#ECEDF1; | ||
| 110 | - border:none; | ||
| 111 | - border-bottom: 3px solid #D3D6DE; | ||
| 112 | -} | ||
| 113 | - | ||
| 114 | -#block-community-tabs .ui-widget-content{ | ||
| 115 | - border:none; | ||
| 116 | - background:none; | ||
| 117 | -} | ||
| 118 | - | ||
| 119 | -#block-community-tabs .ui-corner-all{ | ||
| 120 | - border-radius:0px; | ||
| 121 | -} | ||
| 122 | - | ||
| 123 | -#block-community-tabs .ui-state-default | ||
| 124 | -#block-community-tabs .ui-widget-content .ui-state-default, | ||
| 125 | -#block-community-tabs .ui-widget-header .ui-state-default{ | ||
| 126 | - border:none; | ||
| 127 | - background:#ECEDF1; | ||
| 128 | - font-weight: normal; | ||
| 129 | - color:#172738; | ||
| 130 | -} | ||
| 131 | - | ||
| 132 | -#block-community-tabs .ui-tabs .ui-tabs-nav{ | ||
| 133 | - font-size: 15px; | ||
| 134 | - padding:.2em .0em 0; | ||
| 135 | -} | ||
| 136 | - | ||
| 137 | -#block-community-tabs .ui-tabs .ui-tabs-nav .ui-tabs-anchor{ | ||
| 138 | - float:none; | ||
| 139 | - display:table; | ||
| 140 | -} | ||
| 141 | -.profile-members-tabs-container .ui-tabs .ui-tabs-panel, | ||
| 142 | -#block-community-tabs .ui-tabs .ui-tabs-panel{ | ||
| 143 | - padding: 0px; | ||
| 144 | -} | ||
| 145 | - | ||
| 146 | -#block-community-tabs .ui-tabs .ui-tabs-nav li a:visited{ | ||
| 147 | - color:#172738; | ||
| 148 | -} | ||
| 149 | - | ||
| 150 | -#block-community-tabs .ui-tabs .ui-tabs-nav li{ | ||
| 151 | - padding-right: 3px; | ||
| 152 | -} | ||
| 153 | - | ||
| 154 | -#block-community-tabs .ui-tabs .ui-tabs-nav li.ui-tabs-active{ | ||
| 155 | - margin-bottom: -3px !important; | ||
| 156 | - padding-bottom: 1px; | ||
| 157 | - border-bottom: 3px solid #FF0366; | ||
| 158 | -} | ||
| 159 | - | ||
| 160 | -#block-community-tabs .ui-tabs .ui-tabs-nav li.ui-tabs-active.ui-state-active:before{ | ||
| 161 | - content:"\f0dd"; | ||
| 162 | - font-family: FontAwesome; | ||
| 163 | - font-size: 16px; | ||
| 164 | - position:absolute; | ||
| 165 | - top:26px; | ||
| 166 | - margin:0px 45%; | ||
| 167 | - color:#FF0366; | ||
| 168 | -} | ||
| 169 | -#block-community-tabs .ui-tabs .ui-tabs-nav li.ui-tabs-active a{ | ||
| 170 | - color: #FF0366; | ||
| 171 | - font-weight: 300; | ||
| 172 | -} | ||
| 173 | - | ||
| 174 | -/* Community's area tabs */ | ||
| 175 | - | ||
| 176 | -#content #discussions-content{ | ||
| 177 | - color:#172738; | ||
| 178 | -} | ||
| 179 | - | ||
| 180 | -#content #discussions-content .pull-left{ | ||
| 181 | - float:none; | ||
| 182 | -} | ||
| 183 | - | ||
| 184 | -#content #discussions-content{ | ||
| 185 | - font-family: Arial; | ||
| 186 | - font-size: 14px; | ||
| 187 | -} | ||
| 188 | - | ||
| 189 | -#content #discussions-content .message-discussion{ | ||
| 190 | - border-bottom: 1px solid #ECEDF1; | ||
| 191 | - margin:0px 0px 8px 0px; | ||
| 192 | - padding:10px 0px 18px 0px; | ||
| 193 | -} | ||
| 194 | - | ||
| 195 | -#content #discussions-content .message-discussion .quiet:last-child{ | ||
| 196 | - font-size: 16px; | ||
| 197 | - max-height: 50px; | ||
| 198 | - overflow: hidden; | ||
| 199 | -} | ||
| 200 | - | ||
| 201 | -#content #discussions-content h4{ | ||
| 202 | - font-size: 22px; | ||
| 203 | - border-bottom: 1px solid #ECEDF1; | ||
| 204 | - padding: 8px 0px 6px 0px; | ||
| 205 | -} | ||
| 206 | - | ||
| 207 | -#discussions-content hr{ | ||
| 208 | - display: none; | ||
| 209 | -} | ||
| 210 | - | ||
| 211 | -#discussions-content .quiet{ | ||
| 212 | - line-height: 21px; | ||
| 213 | -} | ||
| 214 | - | ||
| 215 | -#discussions-content div.quiet:last-child{ | ||
| 216 | - border-top:none; | ||
| 217 | -} | ||
| 218 | - | ||
| 219 | -#discussions-content .text-right{ | ||
| 220 | - padding:6px 0px 25px 0px; | ||
| 221 | -} | ||
| 222 | - | ||
| 223 | -#discussions-content .text-right a{ | ||
| 224 | - text-align: right; | ||
| 225 | - display: block; | ||
| 226 | - text-transform: uppercase; | ||
| 227 | - line-height: 21px; | ||
| 228 | - font-size: 11px; | ||
| 229 | -} | ||
| 230 | - | ||
| 231 | -#discussions-content .text-right a:visited, | ||
| 232 | -#content #discussions-content .text-right a:visited, | ||
| 233 | -#discussions-content .text-right dl.portlet a:visited{ | ||
| 234 | - color: #172738; | ||
| 235 | -} | ||
| 236 | - | ||
| 237 | -#discussions-content .text-right a::after { | ||
| 238 | - content: "\f105"; | ||
| 239 | - font-family: FontAwesome; | ||
| 240 | - padding-left: 7px; | ||
| 241 | - padding-right: 4px; | ||
| 242 | - color: #ffffff; | ||
| 243 | - background: #3E67B1; | ||
| 244 | - border-radius: 4px; | ||
| 245 | - font-size: 18px; | ||
| 246 | - line-height: 20px; | ||
| 247 | - text-align: center; | ||
| 248 | - margin-left: 5px; | ||
| 249 | - position: relative; | ||
| 250 | - top: 2px; | ||
| 251 | -} | ||
| 252 | - | ||
| 253 | -#content #discussions-content .pull-left a{ | ||
| 254 | - color:#3E67B1; | ||
| 255 | - font-weight: 600; | ||
| 256 | -} | ||
| 257 | - | ||
| 258 | -#content #discussions-content .subject{ | ||
| 259 | - font-weight: 800; | ||
| 260 | - font-size: 16px | ||
| 261 | -} | ||
| 262 | - | ||
| 263 | -#repository-feed-tab .event-inline.event-item{ | ||
| 264 | - border-bottom: 1px solid #ECEDF1; | ||
| 265 | - margin-top:30px; | ||
| 266 | - padding: 0px 0px 80px 0px; | ||
| 267 | -} | ||
| 268 | - | ||
| 269 | -#repository-feed-tab .event-inline.event-item img{ | ||
| 270 | - display: none; | ||
| 271 | -} | ||
| 272 | - | ||
| 273 | -#repository-feed-tab .event-item-timestamp{ | ||
| 274 | - border-right: 1px dotted #D3D6DE; | ||
| 275 | - float:left; | ||
| 276 | - width: 112px; | ||
| 277 | - height: 55px; | ||
| 278 | - margin-right: 20px; | ||
| 279 | -} | ||
| 280 | -#repository-feed-tab .event-item-timestamp .time_ago{ | ||
| 281 | - color:#172738; | ||
| 282 | -} | ||
| 283 | - | ||
| 284 | -#repository-feed-tab .event-item-timestamp .time_ago:before{ | ||
| 285 | - content: url("../images/ic-calendar.png"); | ||
| 286 | - margin-right: 10px; | ||
| 287 | - margin-top: 0px; | ||
| 288 | - float: left; | ||
| 289 | -} | ||
| 290 | - | ||
| 291 | -#repository-feed-tab .event-title{ | ||
| 292 | - max-height: 55px; | ||
| 293 | - overflow: hidden; | ||
| 294 | - float:left; | ||
| 295 | - width: 70%; | ||
| 296 | - font-size: 16px; | ||
| 297 | -} | ||
| 298 | - | ||
| 299 | -#content #repository-feed-tab .author_name{ | ||
| 300 | - display: block; | ||
| 301 | - padding-bottom: 5px; | ||
| 302 | - font-size: 12px; | ||
| 303 | -} | ||
| 304 | - | ||
| 305 | -#content #repository-feed-tab .author_name a{ | ||
| 306 | - color:#3E67B1; | ||
| 307 | -} | ||
| 308 | - | ||
| 309 | -#repository-feed-tab .see-more-repository{ | ||
| 310 | - text-align: right; | ||
| 311 | - display: block; | ||
| 312 | - text-transform: uppercase; | ||
| 313 | - line-height: 21px; | ||
| 314 | - font-size: 11px; | ||
| 315 | - margin-top: 15px; | ||
| 316 | -} | ||
| 317 | - | ||
| 318 | -#repository-feed-tab .see-more-repository:after{ | ||
| 319 | - content: "\f105"; | ||
| 320 | - font-family: FontAwesome; | ||
| 321 | - padding-left: 7px; | ||
| 322 | - padding-right: 4px; | ||
| 323 | - color: #ffffff; | ||
| 324 | - background: #3E67B1; | ||
| 325 | - border-radius: 4px; | ||
| 326 | - font-size: 18px; | ||
| 327 | - line-height: 20px; | ||
| 328 | - text-align: center; | ||
| 329 | - margin-left: 5px; | ||
| 330 | - position: relative; | ||
| 331 | - top: 2px; | ||
| 332 | -} | ||
| 333 | - | ||
| 334 | - | ||
| 335 | -#repository-feed-tab .see-more-repository a:visited, | ||
| 336 | -#content #repository-feed-tab .see-more-repository a:visited, | ||
| 337 | -#repository-feed-tab .see-more-repository dl.portlet a:visited{ | ||
| 338 | - color:#172738; | ||
| 339 | -} | ||
| 340 | - | ||
| 341 | -/* Blog tab*/ | ||
| 342 | - | ||
| 343 | -#content #blog-tab .blog-posts{ | ||
| 344 | - margin-top:15px; | ||
| 345 | -} | ||
| 346 | - | ||
| 347 | -#content #blog-tab .blog .blog-post{ | ||
| 348 | - background:none; | ||
| 349 | - border-bottom: 1px solid #ECEDF1; | ||
| 350 | - padding:25px 0px 12px 0px; | ||
| 351 | -} | ||
| 352 | - | ||
| 353 | -#content #blog-tab .blog .blog-post h1{ | ||
| 354 | - margin: 0px 0px 10px 0px; | ||
| 355 | - padding: 0px 0px 0px 0px; | ||
| 356 | - max-width: 555px; | ||
| 357 | - max-height: 40px; | ||
| 358 | - border: none; | ||
| 359 | - font: normal normal bold 16px/20px Arial; | ||
| 360 | - overflow: hidden; | ||
| 361 | - display: inline-block; | ||
| 362 | -} | ||
| 363 | - | ||
| 364 | -#content #blog-tab .blog .blog-post .post-pic{ | ||
| 365 | - margin:0 20px 5px 0px; | ||
| 366 | - border-radius: 4px; | ||
| 367 | - height: 62px; | ||
| 368 | - width: 19%; | ||
| 369 | - background: center/cover no-repeat; | ||
| 370 | - float: left; | ||
| 371 | -} | ||
| 372 | -#content #blog-tab .blog .blog-post .publishing-info { | ||
| 373 | - border-top: none; | ||
| 374 | - color: #172838; | ||
| 375 | - font: 13px/21px Arial; | ||
| 376 | -} | ||
| 377 | - | ||
| 378 | -#content #blog-tab .blog .publishing-info{ | ||
| 379 | - display:inline; | ||
| 380 | - text-align: left; | ||
| 381 | -} | ||
| 382 | -#content #blog-tab .blog .blog-post .publishing-info .date { | ||
| 383 | - margin: 0px 0px 5px 0px; | ||
| 384 | - display: table-cell; | ||
| 385 | - font-size: 11px; | ||
| 386 | -} | ||
| 387 | -#content #blog-tab .blog .blog-post .author { | ||
| 388 | - display: none; | ||
| 389 | -} | ||
| 390 | - | ||
| 391 | -#content #blog-tab .blog .blog-post .comments{ | ||
| 392 | - display: none; | ||
| 393 | -} | ||
| 394 | - | ||
| 395 | -#content #blog-tab .blog .blog-post .short-post { | ||
| 396 | - max-height: 35px; | ||
| 397 | - text-align: justify; | ||
| 398 | - text-overflow: ellipsis; | ||
| 399 | - overflow: hidden; | ||
| 400 | -} | ||
| 401 | - | ||
| 402 | -#content #blog-tab .blog .article-body p { | ||
| 403 | - margin: 0px 0px 5px 0px; | ||
| 404 | - max-height: 25px; | ||
| 405 | - color: #172738; | ||
| 406 | - text-align: left; | ||
| 407 | - text-overflow: ellipsis; | ||
| 408 | - font: 15px/21px Arial; | ||
| 409 | - overflow: hidden; | ||
| 410 | -} | ||
| 411 | - | ||
| 412 | -/*Post Position-1*/ | ||
| 413 | -#content #blog-tab .blog .blog-post.position-1 h1{ | ||
| 414 | - line-height: 37px; | ||
| 415 | - font-size: 22px; | ||
| 416 | - color: #172738; | ||
| 417 | - padding-left:0px; | ||
| 418 | - text-align: left; | ||
| 419 | -} | ||
| 420 | -#content #blog-tab .blog .blog-post.position-1 .date{ | ||
| 421 | - padding-left:0px; | ||
| 422 | -} | ||
| 423 | - | ||
| 424 | -#content #blog-tab .blog .blog-post.position-1 .post-pic { | ||
| 425 | -margin: 0 20px 5px 0px; | ||
| 426 | -border-radius: 4px; | ||
| 427 | -height: 210px; | ||
| 428 | -width: 100%; | ||
| 429 | -background: center/cover no-repeat; | ||
| 430 | -float: left; | ||
| 431 | -} | ||
| 432 | - | ||
| 433 | -/* Read more button*/ | ||
| 434 | -#content #blog-tab .blog .read-more{ | ||
| 435 | - text-align: right; | ||
| 436 | - display: block; | ||
| 437 | - text-transform: uppercase; | ||
| 438 | - line-height: 21px; | ||
| 439 | - font-size: 11px; | ||
| 440 | - margin:15px 0px 20px 0px; | ||
| 441 | -} | ||
| 442 | - | ||
| 443 | -#content #blog-tab .blog .read-more:after{ | ||
| 444 | - content: "\f105"; | ||
| 445 | - font-family: FontAwesome; | ||
| 446 | - padding-left: 7px; | ||
| 447 | - padding-right: 4px; | ||
| 448 | - color: #ffffff; | ||
| 449 | - background: #172738; | ||
| 450 | - border-radius: 2px; | ||
| 451 | - font-size: 19px; | ||
| 452 | - line-height: 20px; | ||
| 453 | - text-align: center; | ||
| 454 | - margin-left: 5px; | ||
| 455 | - position: relative; | ||
| 456 | - top: 2px; | ||
| 457 | -} | ||
| 458 | - | ||
| 459 | -#content #blog-tab .blog .read-more a{ | ||
| 460 | - text-decoration: none; | ||
| 461 | - color:#172735; | ||
| 462 | -} | ||
| 463 | - | ||
| 464 | -/* Software Tab Data - Need to develop solution - Only display on profile page */ | ||
| 465 | - | ||
| 466 | -.profile-type-is-community #content .software-tab-data-block{ | ||
| 467 | - display: none; | ||
| 468 | -} | ||
| 469 | - | ||
| 470 | -.profile-type-is-community .action-profile_design-index #content .software-tab-data-block, | ||
| 471 | -.profile-type-is-community .action-profile-index #content .software-tab-data-block{ | ||
| 472 | - display: block; | ||
| 473 | -} | ||
| 474 | - | ||
| 475 | -/*** Right bar ***/ | ||
| 476 | - | ||
| 477 | -.template-default.profile-type-is-community .action-profile-index #content .box-3 .link-list-block, | ||
| 478 | -.template-lefttopright.profile-type-is-community .action-profile-index #content .box-2 .link-list-block | ||
| 479 | - display: none; | ||
| 480 | -} | ||
| 481 | - | ||
| 482 | -/*Block with Community information - Need to develop solution - Only display on profile page */ | ||
| 483 | - | ||
| 484 | -.profile-type-is-community .community-block{ | ||
| 485 | - display: none; | ||
| 486 | -} | ||
| 487 | - | ||
| 488 | -.profile-type-is-community .action-profile_design-index #content .community-block, | ||
| 489 | -.profile-type-is-community .action-profile-index #content .community-block{ | ||
| 490 | - display: block; | ||
| 491 | - border: 1px solid #ECEDF1; | ||
| 492 | - border-radius: 4px; | ||
| 493 | -} | ||
| 494 | - | ||
| 495 | -.profile-type-is-community #content .community-block-logo{ | ||
| 496 | - border-bottom: 3px solid #3E67B1; | ||
| 497 | -} | ||
| 498 | - | ||
| 499 | -.profile-type-is-community #content .community-block-title{ | ||
| 500 | - padding: 10px; | ||
| 501 | - background-color: #ECEDF1; | ||
| 502 | - border-bottom-right-radius: 4px; | ||
| 503 | - border-bottom-left-radius: 4px; | ||
| 504 | -} | ||
| 505 | - | ||
| 506 | -.profile-type-is-community #content .community-block-title h1{ | ||
| 507 | - margin: 5px auto; | ||
| 508 | - font-size: 14px; | ||
| 509 | - line-height: 20px; | ||
| 510 | -} | ||
| 511 | - | ||
| 512 | -.profile-type-is-community #content .community-block-logo{ | ||
| 513 | - padding: 10px; | ||
| 514 | -} | ||
| 515 | - | ||
| 516 | -.profile-type-is-community #content .community-block-logo img.logo{ | ||
| 517 | - height: auto; | ||
| 518 | - width: 100px; | ||
| 519 | - min-width: 100px; | ||
| 520 | - max-width: 170px; | ||
| 521 | -} | ||
| 522 | - | ||
| 523 | -.profile-type-is-community #content .community-block-logo a{ | ||
| 524 | - display: block; | ||
| 525 | - height: 100px; | ||
| 526 | - overflow: hidden; | ||
| 527 | - text-align: center; | ||
| 528 | -} | ||
| 529 | - | ||
| 530 | -/* Wiki block - Need to develop solution - Only display on profile page */ | ||
| 531 | -.template-default #content .box-3 .wiki-block, | ||
| 532 | -.template-lefttopright #content .box-2 .wiki-block{ | ||
| 533 | - display: none; | ||
| 534 | -} | ||
| 535 | - | ||
| 536 | -.template-default .action-profile-index #content .box-3 .wiki-block, | ||
| 537 | -.template-lefttopright .action-profile-index #content .box-2 .wiki-block, | ||
| 538 | -.template-default .action-profile_design-index #content .box-3 .wiki-block, | ||
| 539 | -.template-lefttopright .action-profile_design-index #content .box-2 .wiki-block{ | ||
| 540 | - display: block; | ||
| 541 | -} | ||
| 542 | - | ||
| 543 | -/* Repository block and wiki block need to look a unique block */ | ||
| 544 | -.action-profile-index #content .box-2 .block-outer .repository-block, | ||
| 545 | -.action-profile-index #content .box-3 .block-outer .repository-block{ | ||
| 546 | - margin-bottom: 20px; | ||
| 547 | -} | ||
| 548 | - | ||
| 549 | -/*Block with Members information - Need to develop solution - Only display on profile page */ | ||
| 550 | - | ||
| 551 | -.profile-type-is-community #content .members-block{ | ||
| 552 | - display: none; | ||
| 553 | - border: 1px solid #D3D6DE; | ||
| 554 | - border-radius: 4px; | ||
| 555 | -} | ||
| 556 | - | ||
| 557 | -.profile-type-is-community .action-profile_design-index #content .members-block, | ||
| 558 | -.profile-type-is-community .action-profile-index #content .members-block{ | ||
| 559 | - display: block; | ||
| 560 | -} | ||
| 561 | - | ||
| 562 | -.profile-type-is-community #content .members-block .block-title{ | ||
| 563 | - padding: 12px; | ||
| 564 | - margin-bottom: 12px; | ||
| 565 | - background-color: #ECEDF1; | ||
| 566 | - color: #172738; | ||
| 567 | - border-bottom: 1px solid #D3D6DE; | ||
| 568 | - border-top: none; | ||
| 569 | - font-size: 14px; | ||
| 570 | -} | ||
| 571 | - | ||
| 572 | -.profile-type-is-community #content .members-block .block-footer-content{ | ||
| 573 | - padding: 8px 10px 15px 0px; | ||
| 574 | - margin-right: 0px; | ||
| 575 | - background-color: #ECEDF1; | ||
| 576 | - border-top: 1px solid #D3D6DE; | ||
| 577 | - text-align: right; | ||
| 578 | -} | ||
| 579 | - | ||
| 580 | -.profile-type-is-community #content .members-block .block-footer-content a{ | ||
| 581 | - padding-right: 0px !important; | ||
| 582 | -} | ||
| 583 | - | ||
| 584 | -.profile-type-is-community #content .members-block .block-footer-content a.view-all{ | ||
| 585 | - background-image: none; | ||
| 586 | - border: none; | ||
| 587 | - text-transform: uppercase; | ||
| 588 | - line-height: 21px; | ||
| 589 | -} | ||
| 590 | - | ||
| 591 | -.profile-type-is-community #content .members-block .block-footer-content a.view-all::after{ | ||
| 592 | - content: "\f105"; | ||
| 593 | - position: relative; | ||
| 594 | - top: 2px; | ||
| 595 | - margin-left: 5px; | ||
| 596 | - padding-left: 7px; | ||
| 597 | - padding-right: 4px; | ||
| 598 | - color: #ffffff; | ||
| 599 | - background: #3E67B1; | ||
| 600 | - border-radius: 4px; | ||
| 601 | - font-family: FontAwesome; | ||
| 602 | - font-size: 18px; | ||
| 603 | - line-height: 20px; | ||
| 604 | - text-align: center; | ||
| 605 | -} | ||
| 606 | - | ||
| 607 | -.profile-type-is-community #content .members-block .common-profile-list-block .vcard{ | ||
| 608 | - border: none; | ||
| 609 | -} | ||
| 610 | - | ||
| 611 | -.profile-type-is-community #content .members-block .common-profile-list-block .vcard:hover{ | ||
| 612 | - background: none; | ||
| 613 | - border: none; | ||
| 614 | -} | ||
| 615 | - | ||
| 616 | -.profile-type-is-community #content .members-block .common-profile-list-block .vcard li a{ | ||
| 617 | - color: #172738; | ||
| 618 | -} | ||
| 619 | - | ||
| 620 | -.profile-type-is-community #content .members-block .common-profile-list-block .vcard a.profile_link{ | ||
| 621 | - /*height: 70px;*/ | ||
| 622 | - height: 100px; | ||
| 623 | - max-height: 100px; | ||
| 624 | -} | ||
| 625 | - | ||
| 626 | -.profile-type-is-community #content .members-block .menu-submenu{ | ||
| 627 | - background: #172738; | ||
| 628 | - border-radius: 4px; | ||
| 629 | - /***side block position***/ | ||
| 630 | - top: -39px; | ||
| 631 | - right: 100%; | ||
| 632 | - width: 131px; | ||
| 633 | - height: 176px; | ||
| 634 | - box-shadow: 2px 2px 2px #ECEDF1; | ||
| 635 | - -webkit-box-shadow: 2px 2px 2px #ECEDF1; | ||
| 636 | - -moz-box-shadow: 2px 2px 2px #ECEDF1; | ||
| 637 | -} | ||
| 638 | - | ||
| 639 | -.profile-type-is-community #content .members-block .menu-submenu.down::before{ | ||
| 640 | - content:"\f0da"; | ||
| 641 | - float: right; | ||
| 642 | - position: relative; | ||
| 643 | - margin: -7px; | ||
| 644 | - margin-top: 30%; | ||
| 645 | - color: #172738; | ||
| 646 | - font-family: FontAwesome; | ||
| 647 | - font-size: 25px; | ||
| 648 | -} | ||
| 649 | - | ||
| 650 | -.profile-type-is-community #content .members-block .menu-submenu-header, | ||
| 651 | -.profile-type-is-community #content .members-block .menu-submenu-content, | ||
| 652 | -.profile-type-is-community #content .members-block .menu-submenu-footer{ | ||
| 653 | - background: none; | ||
| 654 | -} | ||
| 655 | - | ||
| 656 | -.profile-type-is-community #content .members-block .menu-submenu-header, | ||
| 657 | -.profile-type-is-community #content .members-block .menu-submenu-footer{ | ||
| 658 | - display: none; | ||
| 659 | -} | ||
| 660 | - | ||
| 661 | -.profile-type-is-community #content .members-block .menu-submenu-content{ | ||
| 662 | - height: 100%; | ||
| 663 | -} | ||
| 664 | - | ||
| 665 | -.profile-type-is-community #content .members-block .common-profile-list-block li{ | ||
| 666 | - margin: 0px !important; | ||
| 667 | -} | ||
| 668 | - | ||
| 669 | -.profile-type-is-community #content .members-block .common-profile-list-block .vcard .menu-submenu-trigger{ | ||
| 670 | - display: block; | ||
| 671 | - height: 13px; | ||
| 672 | - top: 2px; | ||
| 673 | - left: 3px; | ||
| 674 | - padding-bottom: 0px; | ||
| 675 | - background: #172738; | ||
| 676 | - border: 1px solid #fff; | ||
| 677 | - opacity: 0.7; | ||
| 678 | -} | ||
| 679 | - | ||
| 680 | -.profile-type-is-community #content .members-block .common-profile-list-block .vcard .menu-submenu-trigger::before{ | ||
| 681 | - content: "\f053"; | ||
| 682 | - color: #fff; | ||
| 683 | - font-family: FontAwesome; | ||
| 684 | - font-size: 8px; | ||
| 685 | - line-height: 11px; | ||
| 686 | -} | ||
| 687 | - | ||
| 688 | -.profile-type-is-community #content .members-block .common-profile-list-block .fn { | ||
| 689 | - margin-top: 2px; | ||
| 690 | - color: #172738; | ||
| 691 | - max-height: 34px; | ||
| 692 | - overflow: hidden; | ||
| 693 | -} | ||
| 694 | - | ||
| 695 | -.profile-type-is-community #content .members-block .menu-submenu-content h4{ | ||
| 696 | - max-height: 16px; | ||
| 697 | - padding: 8px 7px 10px 6px; | ||
| 698 | - margin: 0px 0px 2px 0px; | ||
| 699 | - background: #243F59; | ||
| 700 | - color: #fff; | ||
| 701 | - border-bottom: 2px solid #FF0366; | ||
| 702 | - border-radius: 4px 4px 0px 0px; | ||
| 703 | - font-family: Arial; | ||
| 704 | - font-size: 13px; | ||
| 705 | - text-transform: uppercase; | ||
| 706 | - text-align: center; | ||
| 707 | - overflow: hidden; | ||
| 708 | -} | ||
| 709 | - | ||
| 710 | -.profile-type-is-community #content .friends-block ul, #content .members-block ul { | ||
| 711 | - min-width: 196px; | ||
| 712 | - width: 192px; | ||
| 713 | - margin: 0px 0px 0px 0px; | ||
| 714 | - padding: 0px; | ||
| 715 | -} | ||
| 716 | - | ||
| 717 | -.profile-type-is-community #content .members-block .menu-submenu-content .menu-submenu-list li a{ | ||
| 718 | - padding: 2px; | ||
| 719 | - color: #fff; | ||
| 720 | - border-bottom: 1px dotted #2C4B6B; | ||
| 721 | - text-align: center; | ||
| 722 | - line-height: 30px; | ||
| 723 | -} | ||
| 724 | - | ||
| 725 | -.profile-type-is-community #content .members-block .menu-submenu-content .menu-submenu-list li a.add-friend{ | ||
| 726 | - border: none; | ||
| 727 | -} | ||
| 728 | - | ||
| 729 | -.profile-type-is-community #content .members-block .menu-submenu-content .menu-submenu-list li a.add-friend::before{ | ||
| 730 | - content: "\f067"; | ||
| 731 | - padding-right: 6px; | ||
| 732 | - color: #FF0366; | ||
| 733 | - font-family: FontAwesome; | ||
| 734 | - font-size: 11px; | ||
| 735 | -} | ||
| 736 | - | ||
| 737 | -.profile-type-is-community #content .members-block .menu-submenu-content h4:hover, | ||
| 738 | -.profile-type-is-community #content .members-block .menu-submenu-content .menu-submenu-list li a:hover{ | ||
| 739 | - color: #ECEDF1; | ||
| 740 | -} | ||
| 741 | - | ||
| 742 | -.profile-type-is-community #content .members-block .common-profile-list-block img{ | ||
| 743 | - width: 50px; | ||
| 744 | - height: 50px; | ||
| 745 | - max-height: 50px; | ||
| 746 | - max-width: 50px; | ||
| 747 | - border-radius: 4px; | ||
| 748 | -} | ||
| 749 | - | ||
| 750 | -.profile-type-is-community #content .members-block .block-footer-content a.view-all{ | ||
| 751 | - position:relative; | ||
| 752 | -} | ||
| 753 | - | ||
| 754 | -/* Profile info block */ | ||
| 755 | - | ||
| 756 | -#content .profile-image-block .admin-link a{ | ||
| 757 | - color: #2c66ce; | ||
| 758 | -} | ||
| 759 | - | ||
| 760 | -#content .profile-image-block .profile-info-options{ | ||
| 761 | - padding-right: 0; | ||
| 762 | - text-align: center; | ||
| 763 | -} | ||
| 764 | - | ||
| 765 | -#content .profile-image-block .profile-info-options a.button.with-text{ | ||
| 766 | - border-color: #D3D6DE; | ||
| 767 | - font-size: 12px; | ||
| 768 | - text-transform: none; | ||
| 769 | -} | ||
| 770 | - | ||
| 771 | -#content .profile-image-block .profile-info-options a.button.with-text:hover{ | ||
| 772 | - border-color: #3E67B1; | ||
| 773 | -} | ||
| 774 | - | ||
| 775 | -/*** Members Page ***/ | ||
| 776 | - | ||
| 777 | -/* Title of the area members */ | ||
| 778 | -.action-profile-members .box-1{ | ||
| 779 | - width: 560px; | ||
| 780 | -} | ||
| 781 | - | ||
| 782 | -.action-profile-members #content .page-members-header{ | ||
| 783 | - margin-bottom: 45px; | ||
| 784 | - border-bottom: 1px solid #D3D6DE; | ||
| 785 | - font-family: Arial; | ||
| 786 | - height: 150px; | ||
| 787 | -} | ||
| 788 | - | ||
| 789 | -.action-profile-members #content .page-members-header h1{ | ||
| 790 | - margin:20px 0px 8px 0px; | ||
| 791 | -} | ||
| 792 | - | ||
| 793 | -.action-profile-members #content .page-members-header h3.community-name{ | ||
| 794 | - margin: 0px 0px 5px 0px; | ||
| 795 | - font-size: 14px; | ||
| 796 | - font-weight: 300; | ||
| 797 | -} | ||
| 798 | - | ||
| 799 | -.action-profile-members #content .page-members-header ul li{ | ||
| 800 | - float:left; | ||
| 801 | - margin:8px 0px 0px 0px; | ||
| 802 | - width: 36%; | ||
| 803 | - | ||
| 804 | -} | ||
| 805 | - | ||
| 806 | -.action-profile-members #content .page-members-header a.button.with-text{ | ||
| 807 | - padding: 5px 15px; | ||
| 808 | - border: 1px solid #D3D6DE; | ||
| 809 | - text-transform: none; | ||
| 810 | - font-size: 12px; | ||
| 811 | - margin-right: 5px; | ||
| 812 | -} | ||
| 813 | - | ||
| 814 | -.action-profile-members #content .page-members-header a.button.with-text:hover{ | ||
| 815 | - border-color: #3E67B1; | ||
| 816 | -} | ||
| 817 | - | ||
| 818 | - | ||
| 819 | -/* Tabs */ | ||
| 820 | - | ||
| 821 | -.action-profile-members #content .profile-members-tabs-container{ | ||
| 822 | - font-family: Arial; | ||
| 823 | -} | ||
| 824 | - | ||
| 825 | -.action-profile-members #content .profile-members-tabs-container .ui-corner-all{ | ||
| 826 | - overflow: visible; | ||
| 827 | - padding: 0; | ||
| 828 | -} | ||
| 829 | - | ||
| 830 | -.action-profile-members #content .profile-members-tabs-container .iu-widget{ | ||
| 831 | - font-size: 0px ; | ||
| 832 | -} | ||
| 833 | - | ||
| 834 | -.action-profile-members #content .profile-members-tabs-container .ui-widget-header{ | ||
| 835 | - background: #ECEDF1; | ||
| 836 | - border: none; | ||
| 837 | - border-bottom: 3px solid #D3D6DE; | ||
| 838 | -} | ||
| 839 | - | ||
| 840 | -.action-profile-members #content .profile-members-tabs-container .ui-widget-content{ | ||
| 841 | - background: none; | ||
| 842 | - border: none; | ||
| 843 | -} | ||
| 844 | - | ||
| 845 | -.action-profile-members #content .profile-members-tabs-container .ui-corner-all, | ||
| 846 | -.action-profile-members #content .profile-members-tabs-container .ui-corner-bl, | ||
| 847 | -.action-profile-members #content .profile-members-tabs-container .ui-corner-top, | ||
| 848 | -.action-profile-members #content .profile-members-tabs-container .ui-corner-right, | ||
| 849 | -.action-profile-members #content .profile-members-tabs-container .ui-corner-bottom, | ||
| 850 | -.action-profile-members #content .profile-members-tabs-container .ui-corner-left, | ||
| 851 | -.action-profile-members #content .profile-members-tabs-container .ui-corner-tr, | ||
| 852 | -.action-profile-members #content .profile-members-tabs-container .ui-corner-tl{ | ||
| 853 | - border-radius: 0px; | ||
| 854 | -} | ||
| 855 | - | ||
| 856 | -.action-profile-members #content .profile-members-tabs-container .ui-state-default, | ||
| 857 | -.action-profile-members #content .profile-members-tabs-container .ui-widget-content .ui-state-default, | ||
| 858 | -.action-profile-members #content .profile-members-tabs-container .ui-widget-header .ui-state-default{ | ||
| 859 | - border: none; | ||
| 860 | - background: #ECEDF1; | ||
| 861 | - font-weight: normal; | ||
| 862 | - color: #172738; | ||
| 863 | -} | ||
| 864 | - | ||
| 865 | -.action-profile-members #content .profile-members-tabs-container .ui-tabs .ui-tabs-nav { | ||
| 866 | - font-size: 15px; | ||
| 867 | -} | ||
| 868 | - | ||
| 869 | -.action-profile-members #content .profile-members-tabs-container .ui-tabs .ui-tabs-nav .ui-tabs-anchor{ | ||
| 870 | - float: none; | ||
| 871 | - display: table; | ||
| 872 | -} | ||
| 873 | - | ||
| 874 | -.action-profile-members #content .profile-members-tabs-container .ui-tabs .ui-tabs-nav li{ | ||
| 875 | - padding-right: 3px; | ||
| 876 | -} | ||
| 877 | - | ||
| 878 | -.action-profile-members #content .profile-members-tabs-container .ui-tabs .ui-tabs-nav li a:visited{ | ||
| 879 | - color: #172738; | ||
| 880 | -} | ||
| 881 | - | ||
| 882 | -.action-profile-members #content .profile-members-tabs-container .ui-tabs .ui-tabs-nav li.ui-tabs-active { | ||
| 883 | - margin-bottom: -3px; | ||
| 884 | - padding-bottom: 1px; | ||
| 885 | - border-bottom: 3px solid #FF0366; | ||
| 886 | -} | ||
| 887 | - | ||
| 888 | -.action-profile-members #content .profile-members-tabs-container .ui-tabs .ui-tabs-nav li.ui-tabs-active.ui-state-active:before{ | ||
| 889 | - content:"\f0dd"; | ||
| 890 | - font-family: FontAwesome; | ||
| 891 | - font-size: 16px; | ||
| 892 | - position:absolute; | ||
| 893 | - top:26px; | ||
| 894 | - margin:0px 45%; | ||
| 895 | - color:#FF0366; | ||
| 896 | -} | ||
| 897 | - | ||
| 898 | -.action-profile-members #content .profile-members-tabs-container .ui-tabs .ui-tabs-nav li.ui-tabs-active a { | ||
| 899 | - color: #FF0366; | ||
| 900 | - font-weight: 300; | ||
| 901 | -} | ||
| 902 | - | ||
| 903 | -/* Sort selection */ | ||
| 904 | -.action-profile-members #profile-members-sort-options{ | ||
| 905 | - font-size: 14px; | ||
| 906 | - text-align: right; | ||
| 907 | - margin:16px 15px 17px 6px; | ||
| 908 | - border-bottom: 1px solid #ECEDF1; | ||
| 909 | - padding-bottom:8px; | ||
| 910 | -} | ||
| 911 | - | ||
| 912 | -.action-profile-members #profile-members-sort-options label{ | ||
| 913 | - font-weight: 700; | ||
| 914 | - color:#172738; | ||
| 915 | -} | ||
| 916 | - | ||
| 917 | -.action-profile-members #profile-members-sort-options select{ | ||
| 918 | - background: none; | ||
| 919 | - border: 1px solid #D3D6DE; | ||
| 920 | - border-radius: 4px; | ||
| 921 | - padding: 4px 15px 4px 4px; | ||
| 922 | - margin: 0px 0px 0px 10px; | ||
| 923 | - font-size: 14px; | ||
| 924 | -} | ||
| 925 | - | ||
| 926 | -/* Members Tab */ | ||
| 927 | -.action-profile-members .profile-members-tabs-container .profile-members{ | ||
| 928 | - padding-left: 5px; | ||
| 929 | -} | ||
| 930 | - | ||
| 931 | -/* Admins Tab */ | ||
| 932 | -.action-profile-members .profile-members-tabs-container .profile-admins{ | ||
| 933 | - padding-left: 5px; | ||
| 934 | -} | ||
| 935 | - | ||
| 936 | -/* Profiles list*/ | ||
| 937 | -.action-profile-members .common-profile-list-block .vcard{ | ||
| 938 | - border: none; | ||
| 939 | -} | ||
| 940 | - | ||
| 941 | -.action-profile-members .common-profile-list-block .vcard:hover{ | ||
| 942 | - border: none; | ||
| 943 | - background: none; | ||
| 944 | -} | ||
| 945 | - | ||
| 946 | -.action-profile-members .common-profile-list-block .vcard a{ | ||
| 947 | - padding-bottom: 30px; | ||
| 948 | -} | ||
| 949 | - | ||
| 950 | -.action-profile-members .box-1 .common-profile-list-block span{ | ||
| 951 | - margin-right: 9px; | ||
| 952 | - width: 90px; | ||
| 953 | - height: 86px; | ||
| 954 | -} | ||
| 955 | - | ||
| 956 | -.action-profile-members .common-profile-list-block img{ | ||
| 957 | - border-radius: 4px; | ||
| 958 | - width: 82px; | ||
| 959 | - height: 82px; | ||
| 960 | - max-width: 150px; | ||
| 961 | - max-height: 150px; | ||
| 962 | -} | ||
| 963 | - | ||
| 964 | -.action-profile-members .menu-submenu{ | ||
| 965 | - background:#172738; | ||
| 966 | - border-radius: 4px; | ||
| 967 | - /***side block position***/ | ||
| 968 | - bottom:0px; | ||
| 969 | - right: 105%; | ||
| 970 | - width: 131px; | ||
| 971 | - height: 178px; | ||
| 972 | - box-shadow: 2px 2px 2px #ECEDF1; | ||
| 973 | - -webkit-box-shadow: 2px 2px 2px #ECEDF1; | ||
| 974 | - -moz-box-shadow: 2px 2px 2px #ECEDF1; | ||
| 975 | -} | ||
| 976 | - | ||
| 977 | -.action-profile-members .menu-submenu.down::before { | ||
| 978 | - content:"\f0da"; | ||
| 979 | - color:#172738; | ||
| 980 | - font-family: FontAwesome; | ||
| 981 | - font-size: 25px; | ||
| 982 | - float: right; | ||
| 983 | - position: relative; | ||
| 984 | - margin:-7px; | ||
| 985 | - margin-top: 30%; | ||
| 986 | -} | ||
| 987 | - | ||
| 988 | -.action-profile-members .menu-submenu-header, | ||
| 989 | -.action-profile-members .menu-submenu-content, | ||
| 990 | -.action-profile-members .menu-submenu-footer{ | ||
| 991 | - background:none; | ||
| 992 | -} | ||
| 993 | - | ||
| 994 | -.action-profile-members .menu-submenu-header, | ||
| 995 | -.action-profile-members .menu-submenu-footer{ | ||
| 996 | - display: none; | ||
| 997 | -} | ||
| 998 | - | ||
| 999 | -.action-profile-members .menu-submenu-content{ | ||
| 1000 | - height: 100%; | ||
| 1001 | -} | ||
| 1002 | - | ||
| 1003 | -.action-profile-members #content .menu-submenu-content h4{ | ||
| 1004 | - color:#fff; | ||
| 1005 | - font-size: 13px; | ||
| 1006 | - background:#243F59; | ||
| 1007 | - border-top-right-radius: 4px; | ||
| 1008 | - border-top-left-radius: 4px; | ||
| 1009 | - border-bottom: 2px solid #FF0366; | ||
| 1010 | - text-transform: uppercase; | ||
| 1011 | - padding:8px 7px 10px 6px; | ||
| 1012 | - margin:0px 0px 2px 0px; | ||
| 1013 | - text-align: center; | ||
| 1014 | - max-height: 16px; | ||
| 1015 | - overflow: hidden; | ||
| 1016 | -} | ||
| 1017 | - | ||
| 1018 | -.action-profile-members #content .menu-submenu-content ul a{ | ||
| 1019 | - padding-left: 0px; | ||
| 1020 | -} | ||
| 1021 | - | ||
| 1022 | -.action-profile-members #content .menu-submenu-content .menu-submenu-list .add-friend::before{ | ||
| 1023 | - content:"\f067"; | ||
| 1024 | - font-family: FontAwesome; | ||
| 1025 | - color:#FF0366; | ||
| 1026 | - font-size: 11px; | ||
| 1027 | - padding-right: 6px; | ||
| 1028 | -} | ||
| 1029 | - | ||
| 1030 | -.action-profile-members #content .menu-submenu-content .menu-submenu-list .add-friend:last-child{ | ||
| 1031 | - border-bottom:none; | ||
| 1032 | -} | ||
| 1033 | - | ||
| 1034 | -.action-profile-members #content .menu-submenu-content .menu-submenu-list li a { | ||
| 1035 | - color:#fff; | ||
| 1036 | - font-family: Arial; | ||
| 1037 | - font-size: 14px; | ||
| 1038 | - border-bottom:1px dotted #2C4B6B; | ||
| 1039 | - text-align: center; | ||
| 1040 | - padding-top:8px; | ||
| 1041 | - padding-bottom:10px; | ||
| 1042 | - margin-right: 1px; | ||
| 1043 | -} | ||
| 1044 | - | ||
| 1045 | -.action-profile-members .common-profile-list-block .vcard .menu-submenu-trigger{ | ||
| 1046 | - display: block; | ||
| 1047 | - background:#172738; | ||
| 1048 | - top:5px; | ||
| 1049 | - left:4px; | ||
| 1050 | - border:1px solid #172738; | ||
| 1051 | - padding-bottom: 0px; | ||
| 1052 | - border-radius: 5px; | ||
| 1053 | - -moz-border-radius:5px; | ||
| 1054 | - -webkit-border-radius:5px; | ||
| 1055 | - height: 15px; | ||
| 1056 | -} | ||
| 1057 | - | ||
| 1058 | -.action-profile-members .common-profile-list-block .vcard .menu-submenu-trigger::before{ | ||
| 1059 | - content:"\f053"; | ||
| 1060 | - color:#fff; | ||
| 1061 | - font-family: FontAwesome; | ||
| 1062 | - font-size: 10px; | ||
| 1063 | - line-height: 11px; | ||
| 1064 | -} | ||
| 1065 | - | ||
| 1066 | -.action-profile-members .box-1 .common-profile-list-block .fn{ | ||
| 1067 | - font-size: 14px; | ||
| 1068 | - color:#172738; | ||
| 1069 | - margin-bottom: 27px; | ||
| 1070 | - margin-top:2px; | ||
| 1071 | - height: 35px; | ||
| 1072 | - max-height: 35px; | ||
| 1073 | - overflow: hidden; | ||
| 1074 | -} | ||
| 1075 | - | ||
| 1076 | -/*** Events ***/ | ||
| 1077 | - | ||
| 1078 | -#content .article-body-event .event-card{ | ||
| 1079 | - border-top: 1px dotted #D3D6D3; | ||
| 1080 | - background-repeat: no-repeat; | ||
| 1081 | - width: 494px; | ||
| 1082 | - height: 116px; | ||
| 1083 | - margin-bottom: 30px; | ||
| 1084 | -} | ||
| 1085 | - | ||
| 1086 | -#content .article-body-event .event-image{ | ||
| 1087 | - border-right: 1px dotted #D3D6DE; | ||
| 1088 | -} | ||
| 1089 | - | ||
| 1090 | -#content .article-body-event .about-event > span{ | ||
| 1091 | - font-family: Arial; | ||
| 1092 | - line-height: 13px; | ||
| 1093 | -} | ||
| 1094 | - | ||
| 1095 | -#content .article-body-event .about-event .event-date{ | ||
| 1096 | - font-weight: bold; | ||
| 1097 | - letter-spacing: 0.49px; | ||
| 1098 | -} | ||
| 1099 | - | ||
| 1100 | -#content .article-body-event .about-event .event-address{ | ||
| 1101 | - margin-top: 19px; | ||
| 1102 | -} | ||
| 1103 | - | ||
| 1104 | -#content .article-body-event .about-event .event-address span{ | ||
| 1105 | - margin-top: 4.4px; | ||
| 1106 | - line-height: 14px; | ||
| 1107 | - letter-spacing: 0.5px; | ||
| 1108 | -} | ||
| 1109 | - | ||
| 1110 | -#content .article-body-event .event-link{ | ||
| 1111 | - letter-spacing: 0.48px; | ||
| 1112 | -} | ||
| 1113 | - | ||
| 1114 | -#content .article-body-event .event-link a{ | ||
| 1115 | - text-decoration: underline; | ||
| 1116 | -} | ||
| 1117 | - | ||
| 1118 | -#content .article-body-event .event-body .event-lead p{ | ||
| 1119 | - font-size: 16px; | ||
| 1120 | - font-family: Arial; | ||
| 1121 | - font-weight: bold; | ||
| 1122 | - letter-spacing: -0.4px; | ||
| 1123 | - line-height: 21px; | ||
| 1124 | -} | ||
| 1125 | - | ||
| 1126 | -#content .article-body-event .event-body .event-content p{ | ||
| 1127 | - font-size: 15px; | ||
| 1128 | - font-family: Arial; | ||
| 1129 | - line-height: 22px; | ||
| 1130 | -} |
src/noosfero-spb-theme/css/edition-pages.css
| @@ -1,477 +0,0 @@ | @@ -1,477 +0,0 @@ | ||
| 1 | -/*** General Form Fields ***/ | ||
| 2 | - | ||
| 3 | -/*** Edit Blog and Articles ***/ | ||
| 4 | - | ||
| 5 | -.controller-cms #content .main-content h1{ | ||
| 6 | - margin: 0 0 10px 0; | ||
| 7 | - padding: 0; | ||
| 8 | - color: #172738; | ||
| 9 | - border-bottom: none; | ||
| 10 | - font-family: Arial; | ||
| 11 | - font-size: 32px; | ||
| 12 | - font-weight: bold; | ||
| 13 | - font-variant: normal; | ||
| 14 | -} | ||
| 15 | - | ||
| 16 | -.controller-cms #content .main-content form{ | ||
| 17 | - font-size: 14px; | ||
| 18 | - font-family: Arial; | ||
| 19 | -} | ||
| 20 | - | ||
| 21 | -.controller-cms #content .main-content form .required-field .pseudoformlabel, | ||
| 22 | -.controller-cms #content .main-content form .required-field label.formlabel:after { | ||
| 23 | - color: #FF0366; | ||
| 24 | - font-size: 14px; | ||
| 25 | - font-weight: 500; | ||
| 26 | -} | ||
| 27 | - | ||
| 28 | -.controller-cms #content .main-content .formlabel{ | ||
| 29 | - display: inline-block; | ||
| 30 | - max-width: 100%; | ||
| 31 | - margin-bottom: 5px; | ||
| 32 | - padding: 10px 0 5px 0; | ||
| 33 | - color: #231f20; | ||
| 34 | - font-size: 14px; | ||
| 35 | -} | ||
| 36 | - | ||
| 37 | -.controller-cms #content .main-content .formfieldline .formfield code{ | ||
| 38 | - display: block; | ||
| 39 | - width: auto; | ||
| 40 | - height: 30px; | ||
| 41 | - padding: 2px 0px 2px 0px; | ||
| 42 | - border: none; | ||
| 43 | - border-radius: 4px; | ||
| 44 | - font-size: 15px; | ||
| 45 | - font-family: Arial, helvetica; | ||
| 46 | -} | ||
| 47 | - | ||
| 48 | -.controller-cms #content .main-content .formfieldline .formfield code *{ | ||
| 49 | - display: inline; | ||
| 50 | -} | ||
| 51 | - | ||
| 52 | -.controller-cms #content .main-content .formfieldline .formfield input[type="text"]{ | ||
| 53 | - padding: 6px; | ||
| 54 | - color: #585858; | ||
| 55 | - background: #FFF; | ||
| 56 | - border: 1px solid #ccc; | ||
| 57 | - border-radius: 4px; | ||
| 58 | - font-size: 15px; | ||
| 59 | - font-family: Arial, helvetica; | ||
| 60 | -} | ||
| 61 | - | ||
| 62 | -.controller-cms #content .main-content .formfieldline textarea{ | ||
| 63 | - padding: 6px; | ||
| 64 | - color: #585858; | ||
| 65 | - background: none; | ||
| 66 | - border: 1px solid #ccc; | ||
| 67 | - border-radius: 4px; | ||
| 68 | - font-family: Arial, helvetica; | ||
| 69 | - font-size: 15px; | ||
| 70 | -} | ||
| 71 | - | ||
| 72 | -.controller-cms #content .main-content .formfieldline .formfield code input[type="text"]:hover, | ||
| 73 | -.controller-cms #content .main-content .formfieldline .formfield code input[type="text"]:focus, | ||
| 74 | -.controller-cms #content .main-content .formfieldline textarea:hover, | ||
| 75 | -.controller-cms #content .main-content .formfieldline textarea:focus{ | ||
| 76 | - border: 1px solid #172738; | ||
| 77 | -} | ||
| 78 | - | ||
| 79 | -.controller-cms #content .main-content .formfieldline .type-file .type-file .formlabel{ | ||
| 80 | - display: none; | ||
| 81 | -} | ||
| 82 | - | ||
| 83 | -.controller-cms #content .main-content .formfieldline .type-file .type-file .type-text .formlabel{ | ||
| 84 | - display: block; | ||
| 85 | -} | ||
| 86 | - | ||
| 87 | -.controller-cms #content .formfield #article_image_builder_uploaded_data, | ||
| 88 | -.controller-cms #content .formfield #article_image_builder_label{ | ||
| 89 | - height: 19px; | ||
| 90 | - padding: 6px; | ||
| 91 | - background: none; | ||
| 92 | - border: 1px solid #ccc; | ||
| 93 | - border-radius: 4px; | ||
| 94 | - font-size: 12px; | ||
| 95 | - text-indent: 0px; | ||
| 96 | -} | ||
| 97 | - | ||
| 98 | -.controller-cms #content .formfield #article_image_builder_uploaded_data:hover, | ||
| 99 | -.controller-cms #content .formfield #article_image_builder_label:hover, | ||
| 100 | -.controller-cms #content .formfield #article_image_builder_uploaded_data:focus, | ||
| 101 | -.controller-cms #content .formfield #article_image_builder_label:focus{ | ||
| 102 | - border: 1px solid #172738; | ||
| 103 | -} | ||
| 104 | - | ||
| 105 | -.controller-cms #content .formfield #fetch-external-feed{ | ||
| 106 | - padding-left: 20px; | ||
| 107 | - border-radius: 4px; | ||
| 108 | -} | ||
| 109 | - | ||
| 110 | -.controller-cms #content .formfield #fetch-external-feed > input{ | ||
| 111 | - height: 13px; | ||
| 112 | - margin: 8px 8px 8px 0px; | ||
| 113 | - vertical-align: middle; | ||
| 114 | - width: 13px; | ||
| 115 | -} | ||
| 116 | - | ||
| 117 | -.controller-cms #content .formfield #fetch-external-feed #external-feed-options #external-feed-options-only-once input{ | ||
| 118 | - margin-right: 3px; | ||
| 119 | - width: 13px; | ||
| 120 | - vertical-align: middle; | ||
| 121 | -} | ||
| 122 | - | ||
| 123 | -.controller-cms #content .formfield #fetch-external-feed #external-feed-options #external-feed-options-only-once label{ | ||
| 124 | - margin-right: 250px; | ||
| 125 | -} | ||
| 126 | - | ||
| 127 | -.controller-cms #content .main-content form label.formlabel, | ||
| 128 | -.controller-cms #content .main-content form .article-translation-field { | ||
| 129 | - font-size: 14px; | ||
| 130 | - margin-bottom: 5px; | ||
| 131 | - color: #231f20; | ||
| 132 | -} | ||
| 133 | - | ||
| 134 | -.controller-cms #content .main-content form .article-translation-field { | ||
| 135 | - margin-top: 25px; | ||
| 136 | - margin-bottom: 15px; | ||
| 137 | -} | ||
| 138 | - | ||
| 139 | -.controller-cms #content .main-content form .button-bar input{ | ||
| 140 | - height: 30px; | ||
| 141 | - padding: 2px 15px; | ||
| 142 | - margin-right: 10px; | ||
| 143 | - color: #FFF; | ||
| 144 | - background: #3E67B1; | ||
| 145 | - font-size: 15px; | ||
| 146 | -} | ||
| 147 | - | ||
| 148 | -.controller-cms #content .main-content form .button-bar input:hover{ | ||
| 149 | - background: #5E82C6; | ||
| 150 | - border: none; | ||
| 151 | -} | ||
| 152 | - | ||
| 153 | -.controller-cms #content .main-content form .button-bar input.button.with-text{ | ||
| 154 | - height: 36px; | ||
| 155 | -} | ||
| 156 | - | ||
| 157 | -.controller-cms #content .main-content form .button-bar a.button{ | ||
| 158 | - height: 30px; | ||
| 159 | - padding: 2px 15px; | ||
| 160 | - color: #3E67B1; | ||
| 161 | - background: #FFF; | ||
| 162 | - border: 1px solid #3E67B1; | ||
| 163 | - font-size: 14px; | ||
| 164 | - text-align: center; | ||
| 165 | -} | ||
| 166 | - | ||
| 167 | -.controller-cms #content .main-content form .button-bar a.button:hover{ | ||
| 168 | - background: none; | ||
| 169 | - color: #3E67B1; | ||
| 170 | - border-color: #3E67B1; | ||
| 171 | -} | ||
| 172 | - | ||
| 173 | -.controller-cms #content .main-content form .box-title{ | ||
| 174 | - font-size: 15px; | ||
| 175 | - font-family: Arial, helvetica; | ||
| 176 | -} | ||
| 177 | - | ||
| 178 | -.controller-cms #content .main-content #category-ajax-selector{ | ||
| 179 | - border-style: dotted; | ||
| 180 | -} | ||
| 181 | - | ||
| 182 | -.controller-cms #content .main-content #category-ajax-selector label{ | ||
| 183 | - font-size: 14px; | ||
| 184 | -} | ||
| 185 | - | ||
| 186 | -.controller-cms #content .main-content #category-ajax-selector .select-subcategory-link{ | ||
| 187 | - background: #FFF; | ||
| 188 | - border: 1px solid #2C66CE; | ||
| 189 | - color: #2C66CE; | ||
| 190 | - padding: 3px; | ||
| 191 | -} | ||
| 192 | - | ||
| 193 | -.controller-cms #content .main-content #category-ajax-selector .select-subcategory-link:hover{ | ||
| 194 | - background: #2C66CE; | ||
| 195 | - color: #FFF; | ||
| 196 | -} | ||
| 197 | - | ||
| 198 | -.controller-cms #content .main-content .inputosaurus-required{ | ||
| 199 | - background: none; | ||
| 200 | - border: 1px solid #ccc; | ||
| 201 | -} | ||
| 202 | - | ||
| 203 | -.controller-cms #content .main-content .inputosaurus-required:hover, | ||
| 204 | -.controller-cms #content .main-content .inputosaurus-required:focus{ | ||
| 205 | - border: 1px solid #172738; | ||
| 206 | -} | ||
| 207 | - | ||
| 208 | -.controller-cms #content .main-content .inputosaurus-required input:hover{ | ||
| 209 | - background: none; | ||
| 210 | -} | ||
| 211 | - | ||
| 212 | -#content #edit-article-options h4 { | ||
| 213 | - font-family: "open_sansbold", Arial, Helvetica, sans-serif; | ||
| 214 | - font-size: 14px; | ||
| 215 | -} | ||
| 216 | - | ||
| 217 | -#content #edit-article-options div div { | ||
| 218 | - margin-top: 13px; | ||
| 219 | - margin-bottom: 13px; | ||
| 220 | -} | ||
| 221 | - | ||
| 222 | -/*** Article's edition page ***/ | ||
| 223 | - | ||
| 224 | -#content .text-editor-sidebar .header{ | ||
| 225 | - padding: 13px 10px; | ||
| 226 | - color: #172738; | ||
| 227 | - background: #D3D6DE; | ||
| 228 | - border-radius: 4px; | ||
| 229 | - font-size: 14px; | ||
| 230 | - font-weight: 300; | ||
| 231 | - font-family: Arial; | ||
| 232 | -} | ||
| 233 | - | ||
| 234 | -#content .text-editor-sidebar .header a.button.icon-vertical-toggle{ | ||
| 235 | - padding: 0 15px; | ||
| 236 | - background: #3E67B1; | ||
| 237 | - color: #FFF; | ||
| 238 | - font-size: 14px; | ||
| 239 | - font-weight: 300; | ||
| 240 | - font-family: Arial; | ||
| 241 | -} | ||
| 242 | - | ||
| 243 | -#content .text-editor-sidebar .header a.button.icon-vertical-toggle:hover{ | ||
| 244 | - background: #5E82C6; | ||
| 245 | -} | ||
| 246 | - | ||
| 247 | -#content .text-editor-sidebar-box{ | ||
| 248 | - background: #ECEDF1; | ||
| 249 | - border-radius: 4px; | ||
| 250 | - border: 1px solid #D3D6DE; | ||
| 251 | -} | ||
| 252 | - | ||
| 253 | -/*New Software form*/ | ||
| 254 | - | ||
| 255 | -.action-software_communities_plugin_myprofile-new_software #content.current-step h3 { | ||
| 256 | - color: #F50054; | ||
| 257 | -} | ||
| 258 | - | ||
| 259 | -.action-software_communities_plugin_myprofile-new_software #content .main-block form input[type="text"] { | ||
| 260 | - display: block; | ||
| 261 | - height: 19px; | ||
| 262 | - padding: 6px; | ||
| 263 | - border: 1px solid #ccc; | ||
| 264 | - border-radius: 4px; | ||
| 265 | - width: 384px; | ||
| 266 | - font-size: 15px; | ||
| 267 | - font-family: arial, helvetica; | ||
| 268 | - color: #585858; | ||
| 269 | -} | ||
| 270 | - | ||
| 271 | -.action-software_communities_plugin_myprofile-new_software #content .formfield input{ | ||
| 272 | - background: none #FFFFFF; | ||
| 273 | - border: 1px solid #DDDDDD; | ||
| 274 | - color: #585858; | ||
| 275 | - font-size: 16px; | ||
| 276 | - width: 76%; | ||
| 277 | - word-wrap: break-word; | ||
| 278 | - border-radius: 4px; | ||
| 279 | -} | ||
| 280 | -.action-software_communities_plugin_myprofile-new_software #content .main-content form label.formlabel.mandatory{ | ||
| 281 | - font-size: 14px; | ||
| 282 | - margin-bottom: 5px; | ||
| 283 | - color: #231f20; | ||
| 284 | - font-weight: 300; | ||
| 285 | -} | ||
| 286 | - | ||
| 287 | -.action-software_communities_plugin_myprofile-new_software #content .main-content form .required-field .formlabel.mandatory:after{ | ||
| 288 | - color: #FF0366; | ||
| 289 | - font-weight: 500; | ||
| 290 | -} | ||
| 291 | - | ||
| 292 | -.action-software_communities_plugin_myprofile-new_software #content .formfield textarea{ | ||
| 293 | - background: none #FFFFFF; | ||
| 294 | - border: 1px solid #DDDDDD; | ||
| 295 | - color: #585858; | ||
| 296 | - font-size: 16px; | ||
| 297 | - width: 100%; | ||
| 298 | - word-wrap: break-word; | ||
| 299 | -} | ||
| 300 | - | ||
| 301 | -.action-software_communities_plugin_myprofile-new_software #content #finality textarea { | ||
| 302 | - resize: none; | ||
| 303 | - height: 100px; | ||
| 304 | -} | ||
| 305 | - | ||
| 306 | -.action-software_communities_plugin_myprofile-new_software #content #software-hostname { | ||
| 307 | - float: left; | ||
| 308 | - display: inline-block; | ||
| 309 | - vertical-align: middle; | ||
| 310 | - background: #EEE; | ||
| 311 | - border: 1px solid #CFCFCF; | ||
| 312 | - line-height: 22px; | ||
| 313 | - padding: 0px 7px; | ||
| 314 | - color: #4A4A4A; | ||
| 315 | - font-size: 20px; | ||
| 316 | - text-transform: lowercase; | ||
| 317 | - min-width: 190px; | ||
| 318 | - border-spacing: 20px; | ||
| 319 | -} | ||
| 320 | - | ||
| 321 | -.action-software_communities_plugin_myprofile-new_software #content .main-block form #profile_change_picture { | ||
| 322 | - padding: 0 15px 15px 15px; | ||
| 323 | - border: 1px dotted #ddd; | ||
| 324 | - margin-top: 10px; | ||
| 325 | -} | ||
| 326 | - | ||
| 327 | -.action-software_communities_plugin_myprofile-new_software #content .main-content form p .required-field { | ||
| 328 | - max-width: 500px; | ||
| 329 | - padding: 15px 20px; | ||
| 330 | - margin: 20px 0 30px 0; | ||
| 331 | - border: 1px dotted #ccc; | ||
| 332 | - border-left: 5px solid #FF0366; | ||
| 333 | - border-radius: 3px; | ||
| 334 | - display: block; | ||
| 335 | - background: #fff; | ||
| 336 | - line-height: 20px; | ||
| 337 | - font-size: 13px; | ||
| 338 | -} | ||
| 339 | - | ||
| 340 | -.action-software_communities_plugin_myprofile-new_software .explanation { | ||
| 341 | -font-style: italic; | ||
| 342 | -font-size: 10px; | ||
| 343 | -} | ||
| 344 | - | ||
| 345 | -/* new community form*/ | ||
| 346 | - | ||
| 347 | -.action-memberships-new_community #content .main-block form input[type="text"] { | ||
| 348 | - display: block; | ||
| 349 | - height: 19px; | ||
| 350 | - padding: 6px; | ||
| 351 | - border: 1px solid #ccc; | ||
| 352 | - border-radius: 4px; | ||
| 353 | - width: 384px; | ||
| 354 | - font-size: 15px; | ||
| 355 | - font-family: arial, helvetica; | ||
| 356 | - color: #585858; | ||
| 357 | -} | ||
| 358 | - | ||
| 359 | -.action-memberships-new_community .formfield input{ | ||
| 360 | - background: none #FFFFFF; | ||
| 361 | - border: 1px solid #DDDDDD; | ||
| 362 | - color: #585858; | ||
| 363 | - font-size: 16px; | ||
| 364 | - width: 76%; | ||
| 365 | - word-wrap: break-word; | ||
| 366 | - border-radius: 4px; | ||
| 367 | -} | ||
| 368 | - | ||
| 369 | -.action-memberships-new_community #content .main-content form label.formlabel{ | ||
| 370 | - font-size: 14px; | ||
| 371 | - margin-bottom: 5px; | ||
| 372 | - color:#231f20; | ||
| 373 | - font-weight: 300; | ||
| 374 | -} | ||
| 375 | - | ||
| 376 | -.action-memberships-new_community #content .main-content form .required-field .formlabel:after { | ||
| 377 | - color: #FF0366; | ||
| 378 | - font-weight: 500; | ||
| 379 | -} | ||
| 380 | - | ||
| 381 | -.action-memberships-new_community .formfield textarea{ | ||
| 382 | - background: none #FFFFFF; | ||
| 383 | - border: 1px solid #DDDDDD; | ||
| 384 | - color: #585858; | ||
| 385 | - font-size: 16px; | ||
| 386 | - width: 100%; | ||
| 387 | - word-wrap: break-word; | ||
| 388 | -} | ||
| 389 | - | ||
| 390 | -.action-memberships-new_community #content .main-block form #profile_change_picture { | ||
| 391 | - padding: 0 15px 15px 15px; | ||
| 392 | - border: 1px dotted #ddd; | ||
| 393 | - margin-top: 10px; | ||
| 394 | -} | ||
| 395 | - | ||
| 396 | -.action-memberships-new_community #content .main-content form p .required-field { | ||
| 397 | - max-width: 500px; | ||
| 398 | - padding: 15px 20px; | ||
| 399 | - margin: 20px 0 30px 0; | ||
| 400 | - border: 1px dotted #ccc; | ||
| 401 | - border-left: 5px solid #FF0366; | ||
| 402 | - border-radius: 3px; | ||
| 403 | - display: block; | ||
| 404 | - background: #fff; | ||
| 405 | - line-height: 20px; | ||
| 406 | - font-size: 13px; | ||
| 407 | -} | ||
| 408 | - | ||
| 409 | -/*Contact new form*/ | ||
| 410 | - | ||
| 411 | -.action-contact-new #content .main-block form input[type="text"] { | ||
| 412 | - display: block; | ||
| 413 | - height: 19px; | ||
| 414 | - padding: 6px; | ||
| 415 | - border: 1px solid #ccc; | ||
| 416 | - border-radius: 4px; | ||
| 417 | - width: 384px; | ||
| 418 | - font-size: 15px; | ||
| 419 | - font-family: arial, helvetica; | ||
| 420 | - color: #585858; | ||
| 421 | -} | ||
| 422 | - | ||
| 423 | -.action-contact-new .formfield input{ | ||
| 424 | - background: none #FFFFFF; | ||
| 425 | - border: 1px solid #DDDDDD; | ||
| 426 | - color: #585858; | ||
| 427 | - font-size: 16px; | ||
| 428 | - width: 76%; | ||
| 429 | - word-wrap: break-word; | ||
| 430 | - border-radius: 4px; | ||
| 431 | -} | ||
| 432 | - | ||
| 433 | -.action-contact-new #content .main-content form label.formlabel{ | ||
| 434 | - font-size: 14px; | ||
| 435 | - margin-bottom: 5px; | ||
| 436 | - color:#231f20; | ||
| 437 | - font-weight: 300; | ||
| 438 | -} | ||
| 439 | - | ||
| 440 | -.action-contact-new #content .main-content form .required-field .formlabel:after { | ||
| 441 | - color: #FF0366; | ||
| 442 | - font-weight: 500; | ||
| 443 | -} | ||
| 444 | -.action-contact-new #content .main-content form label.formlabel{ | ||
| 445 | - font-size: 14px; | ||
| 446 | - margin-bottom: 5px; | ||
| 447 | - color:#231f20; | ||
| 448 | - font-weight: 300; | ||
| 449 | -} | ||
| 450 | - | ||
| 451 | -.action-contact-new #content .main-content form .required-field .formlabel:after { | ||
| 452 | - color: #FF0366; | ||
| 453 | - font-weight: 500; | ||
| 454 | -} | ||
| 455 | - | ||
| 456 | - | ||
| 457 | -.action-contact-new .formfield textarea{ | ||
| 458 | - background: none #FFFFFF; | ||
| 459 | - border: 1px solid #DDDDDD; | ||
| 460 | - color: #585858; | ||
| 461 | - font-size: 16px; | ||
| 462 | - width: 100%; | ||
| 463 | - word-wrap: break-word; | ||
| 464 | -} | ||
| 465 | - | ||
| 466 | -.action-contact-new #content .main-content form p .required-field { | ||
| 467 | - max-width: 500px; | ||
| 468 | - padding: 15px 20px; | ||
| 469 | - margin: 20px 0 30px 0; | ||
| 470 | - border: 1px dotted #ccc; | ||
| 471 | - border-left: 5px solid #FF0366; | ||
| 472 | - border-radius: 3px; | ||
| 473 | - display: block; | ||
| 474 | - background: #fff; | ||
| 475 | - line-height: 20px; | ||
| 476 | - font-size: 13px; | ||
| 477 | -} | ||
| 478 | \ No newline at end of file | 0 | \ No newline at end of file |
src/noosfero-spb-theme/css/footer.css
| @@ -1,208 +0,0 @@ | @@ -1,208 +0,0 @@ | ||
| 1 | -/******************Footer-Rodapé**********************************/ | ||
| 2 | -#theme-footer { | ||
| 3 | - width: 100%; | ||
| 4 | - min-width: 960px; | ||
| 5 | -} | ||
| 6 | - | ||
| 7 | -#theme-footer a{ | ||
| 8 | - color: #2c66ce; | ||
| 9 | -} | ||
| 10 | - | ||
| 11 | -#theme-footer a:hover{ | ||
| 12 | - color: #2c66ce; | ||
| 13 | -} | ||
| 14 | - | ||
| 15 | -#theme-footer #footer-content { | ||
| 16 | - background: #fff; | ||
| 17 | -} | ||
| 18 | - | ||
| 19 | -#theme-footer #footer-logos { | ||
| 20 | - background: #0042b2; | ||
| 21 | - max-width: 100%; | ||
| 22 | - padding: 2em 0; | ||
| 23 | - height: 49px; | ||
| 24 | -} | ||
| 25 | - | ||
| 26 | -#theme-footer #footer-logos > div { | ||
| 27 | - max-width: 960px; | ||
| 28 | - margin: 0 auto; | ||
| 29 | -} | ||
| 30 | - | ||
| 31 | -#theme-footer #footer-logos a { | ||
| 32 | - display: block; | ||
| 33 | - height: 49px; | ||
| 34 | - float: left; | ||
| 35 | -} | ||
| 36 | - | ||
| 37 | -#theme-footer #footer-logos span { | ||
| 38 | - display: none; | ||
| 39 | -} | ||
| 40 | - | ||
| 41 | -#theme-footer #footer-logos .logo-acesso { | ||
| 42 | - background: transparent url(images/acesso-a-informacao.png) center center no-repeat; | ||
| 43 | - width: 107px; | ||
| 44 | -} | ||
| 45 | - | ||
| 46 | -#theme-footer #footer-logos .logo-brasil { | ||
| 47 | - background: transparent url(images/brasil.png) center center no-repeat; | ||
| 48 | - width: 153px; | ||
| 49 | -} | ||
| 50 | - | ||
| 51 | -#footer-logos .logo-sgpr { | ||
| 52 | - background: transparent url(images/sgpr.png) center center no-repeat; | ||
| 53 | - width: 187px; | ||
| 54 | - margin-right: 30px; | ||
| 55 | -} | ||
| 56 | - | ||
| 57 | -#theme-footer #footer-logos .institucionais { | ||
| 58 | - float: right; | ||
| 59 | -} | ||
| 60 | - | ||
| 61 | -#theme-footer #footer-license { | ||
| 62 | - max-width: 960px; | ||
| 63 | - margin: 0 auto; | ||
| 64 | - text-align: left; | ||
| 65 | - padding: 5px; | ||
| 66 | -} | ||
| 67 | - | ||
| 68 | -#theme-footer #footer-license p { | ||
| 69 | - color: #0d4094; | ||
| 70 | - text-align: left; | ||
| 71 | -} | ||
| 72 | - | ||
| 73 | -/***********Rodape Colab *********************/ | ||
| 74 | - | ||
| 75 | -#theme-footer footer{ | ||
| 76 | - display:block | ||
| 77 | -} | ||
| 78 | - | ||
| 79 | -#theme-footer footer { | ||
| 80 | - background:#d5d5d5; | ||
| 81 | -} | ||
| 82 | - | ||
| 83 | -#theme-footer footer .footer-atalhos { | ||
| 84 | - background:#fff; | ||
| 85 | - border-bottom: 2px; | ||
| 86 | -} | ||
| 87 | - | ||
| 88 | -#theme-footer footer .container2{ | ||
| 89 | - width: 100%; | ||
| 90 | - margin-right:auto; | ||
| 91 | - margin-left:auto; | ||
| 92 | - *zoom:1; | ||
| 93 | - max-width: 960px; | ||
| 94 | -} | ||
| 95 | - | ||
| 96 | -#theme-footer .container2:before, | ||
| 97 | -#theme-footer .container2:after { | ||
| 98 | - display:table; | ||
| 99 | - content:""; | ||
| 100 | - line-height:0; | ||
| 101 | -} | ||
| 102 | - | ||
| 103 | -#theme-footer .container2:after { | ||
| 104 | - clear:both; | ||
| 105 | -} | ||
| 106 | - | ||
| 107 | -#theme-footer .voltar-ao-topo { | ||
| 108 | - margin-top: 1.915em; | ||
| 109 | - text-align: right; | ||
| 110 | -} | ||
| 111 | - | ||
| 112 | -#theme-footer footer .footer-atalhos a { | ||
| 113 | - margin-right:12px | ||
| 114 | -} | ||
| 115 | - | ||
| 116 | -#theme-footer footer .footer-atalhos .voltar-ao-topo a { | ||
| 117 | - color:#717782; | ||
| 118 | - padding-left: 20px; | ||
| 119 | - background: url(images/voltar-topo.png) no-repeat left center; | ||
| 120 | - color: #777; | ||
| 121 | - font-size: 15px; | ||
| 122 | -} | ||
| 123 | - | ||
| 124 | -#theme-footer footer .footer-atalhos .voltar-ao-topo a:hover { | ||
| 125 | - text-decoration:underline; | ||
| 126 | -} | ||
| 127 | - | ||
| 128 | -#theme-footer footer .row { | ||
| 129 | - margin-bottom: 20px; | ||
| 130 | - margin-left: auto; | ||
| 131 | - *zoom: 1; | ||
| 132 | - margin-right: auto; | ||
| 133 | -} | ||
| 134 | - | ||
| 135 | -#theme-footer .row:before, | ||
| 136 | -#theme-footer .row:after { | ||
| 137 | - display: table; | ||
| 138 | - content: ""; | ||
| 139 | - line-height: 0; | ||
| 140 | -} | ||
| 141 | - | ||
| 142 | -#theme-footer .row:after { | ||
| 143 | - clear:both; | ||
| 144 | -} | ||
| 145 | - | ||
| 146 | -#theme-footer footer nav { | ||
| 147 | - border-left: 1px dotted #2c66ce; | ||
| 148 | - padding: 0 5px 0 10px | ||
| 149 | -} | ||
| 150 | - | ||
| 151 | -#theme-footer footer nav h2 { | ||
| 152 | - font-size: 18px; | ||
| 153 | - font-weight: bold; | ||
| 154 | - color: #2c66ce; | ||
| 155 | - line-height: 1.3em; | ||
| 156 | - padding: 0px; | ||
| 157 | - margin: 0 0 8px 0; | ||
| 158 | -} | ||
| 159 | - | ||
| 160 | -#theme-footer footer nav ul { | ||
| 161 | - margin-left: 0px; | ||
| 162 | -} | ||
| 163 | - | ||
| 164 | -#theme-footer footer nav li { | ||
| 165 | - display: block; | ||
| 166 | - padding-bottom: 3px; | ||
| 167 | -} | ||
| 168 | - | ||
| 169 | -#theme-footer footer nav a { | ||
| 170 | - font-size: 13px; | ||
| 171 | - color: #2c66ce; | ||
| 172 | - line-height: 1.7em; | ||
| 173 | - font-family: "open_sansregular", Arial, Helvetica, sans-serif; | ||
| 174 | -} | ||
| 175 | - | ||
| 176 | -#theme-footer footer nav a:hover { | ||
| 177 | - color: #2c66ce; | ||
| 178 | - text-decoration: underline; | ||
| 179 | -} | ||
| 180 | - | ||
| 181 | -#theme-footer footer .footer-menus { | ||
| 182 | - padding-bottom: 10px; | ||
| 183 | -} | ||
| 184 | - | ||
| 185 | -#theme-footer .span2 { | ||
| 186 | - width: 104px; | ||
| 187 | -} | ||
| 188 | - | ||
| 189 | -#theme-footer [class*="span"] { | ||
| 190 | - float:left; | ||
| 191 | - min-height: 1px; | ||
| 192 | - margin-left: 30px; | ||
| 193 | - margin-top: 30px; | ||
| 194 | -} | ||
| 195 | - | ||
| 196 | -#theme-footer .span3 { | ||
| 197 | - width:210px; | ||
| 198 | -} | ||
| 199 | - | ||
| 200 | -#theme-footer .hide { | ||
| 201 | - display:none; | ||
| 202 | -} | ||
| 203 | - | ||
| 204 | -#theme-footer .visible-phone { | ||
| 205 | - display:none !important; | ||
| 206 | -} | ||
| 207 | - | ||
| 208 | -/*****fim footer Colab*****/ |
src/noosfero-spb-theme/css/header.css
| @@ -1,301 +0,0 @@ | @@ -1,301 +0,0 @@ | ||
| 1 | -#theme-header { | ||
| 2 | - height: auto; | ||
| 3 | -} | ||
| 4 | - | ||
| 5 | -.header-content * { | ||
| 6 | - margin: 0; | ||
| 7 | - padding: 0; | ||
| 8 | - list-style: none; | ||
| 9 | - vertical-align: baseline; | ||
| 10 | -} | ||
| 11 | - | ||
| 12 | -.header-content li { display: inline; } | ||
| 13 | - | ||
| 14 | -.header-content #header { | ||
| 15 | - padding: 15px 0 0 0; | ||
| 16 | - color: #000; | ||
| 17 | - background-color:#f0f2f1; | ||
| 18 | - background-color:#ecedf1; | ||
| 19 | - background-image: -webkit-radial-gradient(center, ellipse cover, #f0f2f1 1%, #ecedf1 100%) | ||
| 20 | -} | ||
| 21 | - | ||
| 22 | -.header-content #header > div { | ||
| 23 | - max-width: 960px; | ||
| 24 | - min-width: 960px; | ||
| 25 | - margin: 0 auto; | ||
| 26 | -} | ||
| 27 | - | ||
| 28 | -.header-content #accessibility { | ||
| 29 | - display: block; | ||
| 30 | - float: left; | ||
| 31 | - font-family: arial; | ||
| 32 | - font-size: 10px; | ||
| 33 | - width: 50%; | ||
| 34 | -} | ||
| 35 | - | ||
| 36 | -.header-content #accessibility a { | ||
| 37 | - margin-right: 8px; | ||
| 38 | - color: #2c66ce; | ||
| 39 | -} | ||
| 40 | - | ||
| 41 | -.header-content #accessibility span { | ||
| 42 | - background: none repeat scroll 0 0 #2c66ce; | ||
| 43 | - color: #FFFFFF; | ||
| 44 | - padding: 0 3px; | ||
| 45 | -} | ||
| 46 | - | ||
| 47 | -/* logo */ | ||
| 48 | -.header-content #logo { | ||
| 49 | - padding: 0; | ||
| 50 | - float: left; | ||
| 51 | - width: 50%; | ||
| 52 | -} | ||
| 53 | - | ||
| 54 | -.header-content #logo span { | ||
| 55 | - display: block; | ||
| 56 | -} | ||
| 57 | - | ||
| 58 | -.header-content #logo a { | ||
| 59 | - display: block; | ||
| 60 | - width: 100%; | ||
| 61 | - color: #03316f; | ||
| 62 | - margin: 1em 0px; | ||
| 63 | -} | ||
| 64 | - | ||
| 65 | -.header-content #logo a, | ||
| 66 | -.header-content #logo #portal-title { | ||
| 67 | - color: #03316f; | ||
| 68 | -} | ||
| 69 | - | ||
| 70 | -.header-content #logo #portal-title { | ||
| 71 | - background-image: url("../images/logotipo_spb_beta.svg"); | ||
| 72 | - background-repeat: no-repeat; | ||
| 73 | - background-size: 370px; | ||
| 74 | - height: 78px; | ||
| 75 | - width: 374px; | ||
| 76 | - margin: 10px 0px 10px 0px; | ||
| 77 | -} | ||
| 78 | - | ||
| 79 | -.header-content #logo #portal-description { | ||
| 80 | - font-size: 1.2em; | ||
| 81 | - text-transform: uppercase; | ||
| 82 | -} | ||
| 83 | - | ||
| 84 | -/* Site Actions */ | ||
| 85 | -.header-content #portal-siteactions { | ||
| 86 | - display: block; | ||
| 87 | - float: right; | ||
| 88 | - clear: left; | ||
| 89 | - padding-bottom: 2px; | ||
| 90 | - margin-top: -15px; | ||
| 91 | - font-size: 10px; | ||
| 92 | - text-align: center; | ||
| 93 | -} | ||
| 94 | - | ||
| 95 | -.header-content #portal-siteactions a { | ||
| 96 | - color:#2c66ce; | ||
| 97 | - text-decoration: none; | ||
| 98 | - padding: 4px 0 4px 10px; | ||
| 99 | - text-transform: uppercase; | ||
| 100 | - font-family: 'open_sansregular', Arial, Helvetica, sans-serif; | ||
| 101 | -} | ||
| 102 | - | ||
| 103 | -.header-content #portal-siteactions a:hover { | ||
| 104 | - color: #03316f; | ||
| 105 | -} | ||
| 106 | - | ||
| 107 | -.header-content #portal-siteactions li { | ||
| 108 | - display: inline; | ||
| 109 | - margin: 0 5px 0 0; | ||
| 110 | - border-bottom: 1px dotted #2c66ce; | ||
| 111 | -} | ||
| 112 | - | ||
| 113 | -.header-content #portal-siteactions li a { | ||
| 114 | - padding: 4px 0px; | ||
| 115 | -} | ||
| 116 | - | ||
| 117 | -.header-content #siteaction-accessibility, | ||
| 118 | -.header-content #siteaction-contraste, | ||
| 119 | -.header-content li#siteaction-mapadosite { | ||
| 120 | - margin: 0px 48px 0px 0px; | ||
| 121 | -} | ||
| 122 | - | ||
| 123 | -/* Top links */ | ||
| 124 | -.header-content #header #sobre { | ||
| 125 | - line-height: 30px; | ||
| 126 | - font-size: 12px; | ||
| 127 | - height: 30px; | ||
| 128 | - clear: both; | ||
| 129 | - background-color:#CFD0D2; | ||
| 130 | - max-width: 100%; | ||
| 131 | - margin: 0px auto; | ||
| 132 | - text-align: right; | ||
| 133 | - padding: 0 0 0 10px; | ||
| 134 | - border-right: none; | ||
| 135 | -} | ||
| 136 | - | ||
| 137 | -.header-content #sobre a { | ||
| 138 | - color: #2c66ce; | ||
| 139 | - font-family: 'Open Sans', Arial, Helvetica, sans-serif; | ||
| 140 | -} | ||
| 141 | - | ||
| 142 | -.header-content #links-rapidos{ | ||
| 143 | - width: 960px; | ||
| 144 | - margin: 0 auto; | ||
| 145 | - font-color:#fff; | ||
| 146 | -} | ||
| 147 | - | ||
| 148 | -.header-content #link-faq a { | ||
| 149 | - border-right: 1px solid #2c66ce; | ||
| 150 | - padding: 0 10px; | ||
| 151 | -} | ||
| 152 | - | ||
| 153 | -.header-content #link-contact a { | ||
| 154 | - padding-left: 10px; | ||
| 155 | -} | ||
| 156 | - | ||
| 157 | -/* Searchbox */ | ||
| 158 | -.header-content .LSBox { | ||
| 159 | - margin: 0; | ||
| 160 | - padding: 0; | ||
| 161 | - border: none; | ||
| 162 | -} | ||
| 163 | - | ||
| 164 | -.header-content input.searchField { | ||
| 165 | - -moz-appearance: none; | ||
| 166 | -} | ||
| 167 | - | ||
| 168 | -.header-content #portal-searchbox { | ||
| 169 | - clear: right; | ||
| 170 | - float: right; | ||
| 171 | - font-size: 80%; | ||
| 172 | - margin: 30px 0 15px; | ||
| 173 | - text-align: right; | ||
| 174 | - border-radius: 5px; | ||
| 175 | - -moz-border-radius: 5px; | ||
| 176 | - -webkit-border-radius: 5px; | ||
| 177 | - border: 1px solid #CCCCCC; | ||
| 178 | - background: #fff; | ||
| 179 | - padding: 2px; | ||
| 180 | -} | ||
| 181 | - | ||
| 182 | -.header-content #portal-searchbox .searchField { | ||
| 183 | - padding: 0.45em; | ||
| 184 | - border-right: none; | ||
| 185 | - border: none; | ||
| 186 | - width: 171px; | ||
| 187 | -} | ||
| 188 | - | ||
| 189 | -.header-content #portal-searchbox form { | ||
| 190 | - white-space: nowrap; | ||
| 191 | -} | ||
| 192 | - | ||
| 193 | -.header-content #portal-searchbox label { | ||
| 194 | - font-weight: normal; | ||
| 195 | -} | ||
| 196 | - | ||
| 197 | -.header-content #searchGadget { | ||
| 198 | - width: 13em; | ||
| 199 | -} | ||
| 200 | - | ||
| 201 | -.header-content #header input.searchButton { | ||
| 202 | - padding: 0.3em; | ||
| 203 | - background: transparent; | ||
| 204 | - text-indent: -2000px; | ||
| 205 | - padding: 4px 15px; | ||
| 206 | - border: none; | ||
| 207 | -} | ||
| 208 | - | ||
| 209 | -.header-content #content input.searchField { | ||
| 210 | - margin-bottom: 1em; | ||
| 211 | -} | ||
| 212 | - | ||
| 213 | -.header-content #header input.searchButton { | ||
| 214 | - background-image: url("../images/search-button.png"); | ||
| 215 | - background-position: 8px 2px; | ||
| 216 | - background-repeat: no-repeat; | ||
| 217 | - background-color: #ffffff; | ||
| 218 | -} | ||
| 219 | - | ||
| 220 | -.header-content #LSResult { | ||
| 221 | - z-index: 1; | ||
| 222 | - margin-top: 0.5%; | ||
| 223 | -} | ||
| 224 | - | ||
| 225 | -/* Social Icons */ | ||
| 226 | - | ||
| 227 | -.header-content #social-icons { | ||
| 228 | - float: right; | ||
| 229 | - clear: right; | ||
| 230 | - margin: 0px 0px 17px; | ||
| 231 | -} | ||
| 232 | - | ||
| 233 | -.header-content #social-icons ul { | ||
| 234 | - display: table-row; | ||
| 235 | -} | ||
| 236 | - | ||
| 237 | -.header-content #social-icons li { | ||
| 238 | - float: right; | ||
| 239 | - width: 20px; | ||
| 240 | - margin-left: 4px; | ||
| 241 | - display: table-cell; | ||
| 242 | -} | ||
| 243 | - | ||
| 244 | -.header-content #social-icons li a { | ||
| 245 | - width: 20px; | ||
| 246 | - height: 20px; | ||
| 247 | - padding: 0px; | ||
| 248 | - display: inline-block; | ||
| 249 | - opacity: .85; | ||
| 250 | - border: none; | ||
| 251 | - background-repeat: no-repeat; | ||
| 252 | -} | ||
| 253 | - | ||
| 254 | -.header-content #social-icons span { | ||
| 255 | - display: none; | ||
| 256 | -} | ||
| 257 | - | ||
| 258 | -.header-content #sb_face, | ||
| 259 | -.header-content #sb_tweet, | ||
| 260 | -.header-content #sb_youtb, | ||
| 261 | -.header-content #sb_flickr { | ||
| 262 | - background: url(images/icones_home_branco.jpg) 0px; | ||
| 263 | -} | ||
| 264 | - | ||
| 265 | -.header-content #sb_flickr { | ||
| 266 | - background-position: -100px; | ||
| 267 | -} | ||
| 268 | - | ||
| 269 | -.header-content #sb_face { | ||
| 270 | - background-position: -12px; | ||
| 271 | -} | ||
| 272 | - | ||
| 273 | -.header-content #sb_tweet { | ||
| 274 | - background-position: -42px; | ||
| 275 | -} | ||
| 276 | - | ||
| 277 | -.header-content #sb_youtb { | ||
| 278 | - background-position: -71px; | ||
| 279 | -} | ||
| 280 | - | ||
| 281 | -.header-content #social-icons a:focus, | ||
| 282 | -.header-content #social-icons a:hover { | ||
| 283 | - opacity: 1; | ||
| 284 | - filter: alpha(opacity=100); | ||
| 285 | -} | ||
| 286 | - | ||
| 287 | -/* end of Social Icons */ | ||
| 288 | - | ||
| 289 | -/**** disable html****/ | ||
| 290 | -#barra-psocial { | ||
| 291 | - position: relative; | ||
| 292 | - height: 40px; | ||
| 293 | - margin: -3px 0px 0px 0px; | ||
| 294 | - border: none; | ||
| 295 | - background-color:rgb(236,237,241); | ||
| 296 | -} | ||
| 297 | - | ||
| 298 | -#barra-psocial li { | ||
| 299 | - float: left; | ||
| 300 | -} | ||
| 301 | -/********** end disable html *************/ |
src/noosfero-spb-theme/css/home-page.css
| @@ -1,526 +0,0 @@ | @@ -1,526 +0,0 @@ | ||
| 1 | -/*** boxes sizes definition **/ | ||
| 2 | -.action-home-index .box-1 { | ||
| 3 | - margin: 0px 0px 0px 210px; | ||
| 4 | - width: 490px; | ||
| 5 | -} | ||
| 6 | - | ||
| 7 | -.action-home-index .box-3 { | ||
| 8 | - width: 230px; | ||
| 9 | -} | ||
| 10 | - | ||
| 11 | -/*** end of boxes sizes definition **/ | ||
| 12 | - | ||
| 13 | -/*** Box's patterns ***/ | ||
| 14 | - | ||
| 15 | -.action-home-index .block-outer{ | ||
| 16 | - margin-bottom: 45px; | ||
| 17 | -} | ||
| 18 | - | ||
| 19 | -/* Read More pattern */ | ||
| 20 | - | ||
| 21 | -.action-home-index #content .box .block-outer .read-more{ | ||
| 22 | - border-bottom: none; | ||
| 23 | - background: #eee; | ||
| 24 | - font: normal normal normal 10px 'open_sansregular', arial, helvetica, sans-serif; | ||
| 25 | - text-transform: uppercase; | ||
| 26 | - text-align: right; | ||
| 27 | -} | ||
| 28 | - | ||
| 29 | -.action-home-index #content .box .block-outer .read-more a{ | ||
| 30 | - padding: 8px; | ||
| 31 | - line-height: 20px; | ||
| 32 | - color: #000000; | ||
| 33 | - display: block; | ||
| 34 | -} | ||
| 35 | - | ||
| 36 | -.action-home-index #content .box .block-outer .read-more a:hover{ | ||
| 37 | - background: #dedede; | ||
| 38 | -} | ||
| 39 | - | ||
| 40 | -.action-home-index #content .box .block-outer .read-more a::after{ | ||
| 41 | - margin-left: 7px; | ||
| 42 | - border-radius: 4px; | ||
| 43 | - padding: 0px 5px 0px 8px; | ||
| 44 | - line-height: 20px; | ||
| 45 | - color: #FFFFFF; | ||
| 46 | - font: 14px 'open_sansbold', arial, helvetica, sans-serif; | ||
| 47 | - text-align: center; | ||
| 48 | - content: url('../images/right-arrow.png'); | ||
| 49 | -} | ||
| 50 | - | ||
| 51 | - | ||
| 52 | -/*** end of box patterns ***/ | ||
| 53 | - | ||
| 54 | -/******************** Box-1 ********************/ | ||
| 55 | - | ||
| 56 | -/*** Software catalog search block **/ | ||
| 57 | - | ||
| 58 | -.action-home-index #content #catalogo-software-search{ | ||
| 59 | - width: 100%; | ||
| 60 | - background-color: #1A397D; | ||
| 61 | - border-radius: 4px; | ||
| 62 | -} | ||
| 63 | - | ||
| 64 | -.action-home-index #content #catalogo-software-search h1{ | ||
| 65 | - margin: 0px 15px 10px 15px; | ||
| 66 | - border-bottom: none; | ||
| 67 | - padding: 10px 0px 0px 0px; | ||
| 68 | - line-height: 1.3em; | ||
| 69 | - color: #FFFFFF; | ||
| 70 | - font: normal normal normal 22px 'open_sansregular', arial; | ||
| 71 | - text-align: left; | ||
| 72 | -} | ||
| 73 | - | ||
| 74 | -.action-home-index #content #catalogo-software-search #search-Gadget{ | ||
| 75 | - margin: 0px 15px 9px 15px; | ||
| 76 | - border: none; | ||
| 77 | - border-radius: 4px; | ||
| 78 | - padding: 7px; | ||
| 79 | - width: 90%; | ||
| 80 | -} | ||
| 81 | - | ||
| 82 | -.action-home-index #content #catalogo-software-search .searchButton-catalog{ | ||
| 83 | - cursor: pointer; | ||
| 84 | - margin: 0px 0px 15px 15px; | ||
| 85 | - padding: 6px 25px; | ||
| 86 | - border: 1px solid #FFFFFF; | ||
| 87 | - border-radius: 4px; | ||
| 88 | - background-color: #1A397D; | ||
| 89 | - color: #FFFFFF; | ||
| 90 | - font-weight: bold; | ||
| 91 | - font-size: 14px; | ||
| 92 | - text-transform: uppercase; | ||
| 93 | -} | ||
| 94 | - | ||
| 95 | -.action-home-index #content #catalogo-software-search #search-catalog-footer{ | ||
| 96 | - border-top: 1px solid; | ||
| 97 | - border-bottom-left-radius: 4px; | ||
| 98 | - border-bottom-right-radius: 4px; | ||
| 99 | - background-color: #192758; | ||
| 100 | - color: #FFFFFF; | ||
| 101 | -} | ||
| 102 | - | ||
| 103 | -.action-home-index #content #catalogo-software-search #search-catalog-footer p{ | ||
| 104 | - margin: 0px; | ||
| 105 | - font-size: 11px; | ||
| 106 | - text-align: right; | ||
| 107 | - text-transform: uppercase; | ||
| 108 | -} | ||
| 109 | - | ||
| 110 | -.action-home-index #content #catalogo-software-search #search-catalog-footer a{ | ||
| 111 | - padding: 7px 0px 12px 0px; | ||
| 112 | - color: #FFF; | ||
| 113 | - display: block; | ||
| 114 | -} | ||
| 115 | - | ||
| 116 | -.action-home-index #content #catalogo-software-search #search-catalog-footer a:hover{ | ||
| 117 | - background-color: #101A38; | ||
| 118 | -} | ||
| 119 | - | ||
| 120 | -.action-home-index #content #catalogo-software-search #bt_catalog-search::after{ | ||
| 121 | - margin: 0px 15px 0 5px; | ||
| 122 | - border-radius: 4px; | ||
| 123 | - padding: 0px 4px 0 7px; | ||
| 124 | - top: 2px; | ||
| 125 | - line-height: 20px; | ||
| 126 | - background: #eee; | ||
| 127 | - color: #172857; | ||
| 128 | - font-size: 15px; | ||
| 129 | - text-align: center; | ||
| 130 | - position: relative; | ||
| 131 | - content: url('../images/right-arrow-black.png'); | ||
| 132 | -} | ||
| 133 | - | ||
| 134 | -/*** Softwares block **/ | ||
| 135 | -.action-home-index #content .softwares-block{ | ||
| 136 | - margin: 0px; | ||
| 137 | - overflow: auto; | ||
| 138 | -} | ||
| 139 | - | ||
| 140 | -.action-home-index #content .softwares-block .block-title{ | ||
| 141 | - margin: 0px 0px 25px 0px; | ||
| 142 | - border-top: 4px solid #2c66ce; | ||
| 143 | - background: #eee; | ||
| 144 | - color: #2c66ce; | ||
| 145 | - font-weight: 300; | ||
| 146 | -} | ||
| 147 | - | ||
| 148 | -.action-home-index #content .softwares-block .block-footer-content a{ | ||
| 149 | - display:none; | ||
| 150 | -} | ||
| 151 | - | ||
| 152 | -.action-home-index #content .software-block{ | ||
| 153 | - width: 145px; | ||
| 154 | - height: 218px; | ||
| 155 | - margin: 0px 18px 14px 0px; | ||
| 156 | -} | ||
| 157 | - | ||
| 158 | -.action-home-index #content .software-block .software-block-logo{ | ||
| 159 | - border: 1px solid #ccc; | ||
| 160 | - border-radius: 8px; | ||
| 161 | - width: 140px; | ||
| 162 | - height: 150px; | ||
| 163 | - text-align: center; | ||
| 164 | - overflow: hidden; | ||
| 165 | - vertical-align: middle; | ||
| 166 | - display: table-cell; | ||
| 167 | -} | ||
| 168 | - | ||
| 169 | -.action-home-index #content .software-block .software-block-logo img{ | ||
| 170 | - height: auto; | ||
| 171 | - max-width: 90px; | ||
| 172 | -} | ||
| 173 | - | ||
| 174 | -.action-home-index #content .software-block .software-block-info{ | ||
| 175 | - height: 85px; | ||
| 176 | - overflow: hidden; | ||
| 177 | -} | ||
| 178 | - | ||
| 179 | -.action-home-index #content .software-block .software-block-title{ | ||
| 180 | - height: 50px; | ||
| 181 | - font-weight: 300; | ||
| 182 | - font-size: 14px; | ||
| 183 | - text-align: center; | ||
| 184 | - overflow: hidden; | ||
| 185 | -} | ||
| 186 | - | ||
| 187 | -.action-home-index #content .software-block .software-block-title h3{ | ||
| 188 | - margin: 10px 0px 10px 0px; | ||
| 189 | - color: #2C66CE; | ||
| 190 | - font: normal normal 300 14px 'open_sansregular', arial, helvetica, sans-serif; | ||
| 191 | -} | ||
| 192 | - | ||
| 193 | -.action-home-index #content .software-block-description{ | ||
| 194 | - display: none; | ||
| 195 | -} | ||
| 196 | - | ||
| 197 | -.action-home-index #content .software-block .software-block-finality, | ||
| 198 | -.action-home-index #content .software-block .software-block-content{ | ||
| 199 | - text-align: right; | ||
| 200 | -} | ||
| 201 | - | ||
| 202 | -.action-home-index #content .software-block .software-block-finality{ | ||
| 203 | - border: solid 1px #D7D7D7; | ||
| 204 | - border-radius: 8px; | ||
| 205 | - width:142px; | ||
| 206 | - height: 216px; | ||
| 207 | - left: 0px; | ||
| 208 | - background-color: #f4f4f4; | ||
| 209 | - text-transform: uppercase; | ||
| 210 | -} | ||
| 211 | - | ||
| 212 | -.action-home-index #content .software-block .software-block-finality::after{ | ||
| 213 | - margin: 0px 7px 0px 3px; | ||
| 214 | - border-radius: 4px; | ||
| 215 | - padding: 0 4px 0 7px; | ||
| 216 | - line-height: 20px; | ||
| 217 | - background: #2c65cd; | ||
| 218 | - color: #FFF; | ||
| 219 | - font-size: 15px; | ||
| 220 | - text-align: center; | ||
| 221 | - position: relative; | ||
| 222 | - content: url('../images/right-arrow.png'); | ||
| 223 | -} | ||
| 224 | - | ||
| 225 | -.action-home-index #content .software-block .software-block-finality p{ | ||
| 226 | - margin: 0px 0px 7px 0px; | ||
| 227 | - border-bottom: solid 1px #D7D7D7; | ||
| 228 | - padding: 12px 12px 0px 12px; | ||
| 229 | - height: 170px; | ||
| 230 | - color: #172738; | ||
| 231 | - font-size: 12px; | ||
| 232 | - text-align: left; | ||
| 233 | - text-transform: none; | ||
| 234 | - overflow: hidden; | ||
| 235 | -} | ||
| 236 | - | ||
| 237 | -/*** News block - display content block **/ | ||
| 238 | - | ||
| 239 | -.action-home-index #content .display-content-block .block-title{ | ||
| 240 | - margin: 0px; | ||
| 241 | - border-top: 4px solid #643C67; | ||
| 242 | - background: #eee; | ||
| 243 | - color: #643C67; | ||
| 244 | - font-weight: 300; | ||
| 245 | -} | ||
| 246 | - | ||
| 247 | -.action-home-index #content .display-content-block li{ | ||
| 248 | - border-top: 1px solid #eee; | ||
| 249 | - padding: 15px 0px 0px 0px; | ||
| 250 | - min-height: 150px; | ||
| 251 | -} | ||
| 252 | - | ||
| 253 | -.action-home-index #content .display-content-block li:first-child{ | ||
| 254 | - border-top: 0px solid #eee; | ||
| 255 | -} | ||
| 256 | - | ||
| 257 | -.action-home-index #content .display-content-block .published-at{ | ||
| 258 | - padding: 0px 0px 15px 0px; | ||
| 259 | - color: #643C67; | ||
| 260 | -} | ||
| 261 | - | ||
| 262 | -.action-home-index #content .display-content-block .image{ | ||
| 263 | - padding-right: 25px; | ||
| 264 | - padding: 0px 25px 0px 0px; | ||
| 265 | - border: 0px solid #c0c1c1; | ||
| 266 | - width: 150px; | ||
| 267 | - display: table-cell; | ||
| 268 | -} | ||
| 269 | - | ||
| 270 | -.action-home-index #content .display-content-block .image a{ | ||
| 271 | - border-radius: 8px; | ||
| 272 | - height: 90px; | ||
| 273 | - overflow: hidden; | ||
| 274 | - display: block; | ||
| 275 | -} | ||
| 276 | - | ||
| 277 | -.action-home-index #content .display-content-block .image img{ | ||
| 278 | - border: 0px solid #c0c1c1; | ||
| 279 | - max-width: 150px; | ||
| 280 | -} | ||
| 281 | - | ||
| 282 | -.action-home-index #content .display-content-block .title{ | ||
| 283 | - margin: 2px 0px 4px 0px; | ||
| 284 | - padding-right: 0px; | ||
| 285 | - max-height: 40px; | ||
| 286 | - text-align: justify; | ||
| 287 | - overflow: hidden; | ||
| 288 | -} | ||
| 289 | - | ||
| 290 | -.action-home-index #content .display-content-block .title a{ | ||
| 291 | - padding: 0px; | ||
| 292 | - color: #172738; | ||
| 293 | - font: normal normal bold 16px/1.3em arial, helvetica, sans-serif; | ||
| 294 | -} | ||
| 295 | - | ||
| 296 | -.action-home-index #content .display-content-block .lead{ | ||
| 297 | - max-height: 47px; | ||
| 298 | - overflow: hidden; | ||
| 299 | -} | ||
| 300 | - | ||
| 301 | -.action-home-index #content .display-content-block .lead a{ | ||
| 302 | - color: #000000; | ||
| 303 | - font: 15px/1.3em arial; | ||
| 304 | -} | ||
| 305 | - | ||
| 306 | -.action-home-index #content .display-content-block .lead a:visited, | ||
| 307 | -.action-home-index #content .lead a:visited, | ||
| 308 | -.action-home-index #content .lead dl.portlet a:visited{ | ||
| 309 | - color: #172738; | ||
| 310 | -} | ||
| 311 | - | ||
| 312 | -.action-home-index #content .display-content-block .notice-info{ | ||
| 313 | - display: table-cell; | ||
| 314 | - vertical-align: top; | ||
| 315 | -} | ||
| 316 | - | ||
| 317 | -.action-home-index #content .display-content-block .read_more{ | ||
| 318 | - display: none; | ||
| 319 | -} | ||
| 320 | - | ||
| 321 | -.action-home-index #content .display-content-block .read-more{ | ||
| 322 | - border-top: 1px solid #643C67; | ||
| 323 | -} | ||
| 324 | - | ||
| 325 | -.action-home-index #content .display-content-block .read-more a::after{ | ||
| 326 | - background: #643C67; | ||
| 327 | -} | ||
| 328 | - | ||
| 329 | -/******************** End Box-1 ********************/ | ||
| 330 | - | ||
| 331 | -/******************** Box-3 ********************/ | ||
| 332 | - | ||
| 333 | -/*** What Is block - Article block **/ | ||
| 334 | - | ||
| 335 | -.template-default .action-home-index #content .box-3 .article-block .block-title{ | ||
| 336 | - border-top: 4px solid #08A649; | ||
| 337 | - border-bottom: none; | ||
| 338 | - padding: 6px 8px 22px 10px; | ||
| 339 | - background: #eee; | ||
| 340 | - color: #08A649; | ||
| 341 | - font: normal normal 300 18px/1.3em 'open_sansregular', arial, helvetica, sans-serif; | ||
| 342 | - text-align: left; | ||
| 343 | - text-transform: none; | ||
| 344 | -} | ||
| 345 | - | ||
| 346 | -.template-default .action-home-index #content .box-3 .article-block .read-more{ | ||
| 347 | - margin-top: 30px; | ||
| 348 | - border-top: 1px solid #08A649; | ||
| 349 | -} | ||
| 350 | - | ||
| 351 | -.template-default .action-home-index #content .box-3 .article-block .read-more a::after{ | ||
| 352 | - background: #08A649; | ||
| 353 | -} | ||
| 354 | - | ||
| 355 | -.template-default .action-home-index #content .box-3 .article-block .short-post{ | ||
| 356 | - padding-top: 23px; | ||
| 357 | -} | ||
| 358 | - | ||
| 359 | -.template-default .action-home-index #content .box-3 .article-block p{ | ||
| 360 | - margin: 0px 0px 14px 0px; | ||
| 361 | - padding: 0px; | ||
| 362 | - font: 15px/18px arial, helvetica, sans-serif; | ||
| 363 | - text-align: left; | ||
| 364 | - text-transform: none; | ||
| 365 | -} | ||
| 366 | - | ||
| 367 | -/******* See As Well Block - Highlights block *******/ | ||
| 368 | - | ||
| 369 | -.action-home-index #content .highlights-block .block-title{ | ||
| 370 | - display: none; | ||
| 371 | -} | ||
| 372 | - | ||
| 373 | -.action-home-index #content .highlights-border{ | ||
| 374 | - border: 1px solid #c0c1c1; | ||
| 375 | - border-radius: 8px; | ||
| 376 | - width: auto; | ||
| 377 | - height: 248px; | ||
| 378 | - max-height: 250px; | ||
| 379 | - background-color: #e8e9ec; | ||
| 380 | - background-image: linear-gradient( | ||
| 381 | - 0deg, | ||
| 382 | - transparent 45%, | ||
| 383 | - #fff 55%); | ||
| 384 | - background-size: 100% 100%; | ||
| 385 | -} | ||
| 386 | - | ||
| 387 | -.action-home-index #content .highlights-container{ | ||
| 388 | - border-radius: 8px; | ||
| 389 | - border-width: 0px 0px 1px 0px; | ||
| 390 | - border-bottom: none; | ||
| 391 | - padding: 0; | ||
| 392 | - width: 100% !important; | ||
| 393 | - max-height: 230px; | ||
| 394 | - background: transparent; | ||
| 395 | - position: relative; | ||
| 396 | - top: 0; | ||
| 397 | -} | ||
| 398 | - | ||
| 399 | -.action-home-index #content .highlights-image-link{ | ||
| 400 | - padding: 18px 0px 0px 0px; | ||
| 401 | - border-radius: 0px 0px 8px 8px; | ||
| 402 | - width: 220px; | ||
| 403 | - max-height: 217px; | ||
| 404 | - background-color: #fff; | ||
| 405 | -} | ||
| 406 | - | ||
| 407 | -.action-home-index #content .highlights-image-link img{ | ||
| 408 | - height: 100px; | ||
| 409 | - max-width: 200px; | ||
| 410 | -} | ||
| 411 | - | ||
| 412 | -.action-home-index #content .highlights-label{ | ||
| 413 | - border-top: 4px solid #3b61a7; | ||
| 414 | - padding: 23px 20px 46px 20px; | ||
| 415 | - max-height: 60px; | ||
| 416 | - width: 190px; | ||
| 417 | - position: relative; | ||
| 418 | - bottom: -18px; | ||
| 419 | - background: #e8e9ec; | ||
| 420 | - color: #172638; | ||
| 421 | - text-align: center; | ||
| 422 | - font: normal normal normal 16px/1.5em 'open_sansbold', arial, helvetica, sans-serif; | ||
| 423 | - vertical-align: middle; | ||
| 424 | -} | ||
| 425 | - | ||
| 426 | -.action-home-index #content .highlights-block-pager{ | ||
| 427 | - float: none; | ||
| 428 | - display: block; | ||
| 429 | - text-align: center; | ||
| 430 | -} | ||
| 431 | - | ||
| 432 | -.action-home-index #content .highlights-block-pager a{ | ||
| 433 | - margin: 0 4px; | ||
| 434 | - border-color: transparent; | ||
| 435 | - border-radius: 50%; | ||
| 436 | - height: 6px; | ||
| 437 | - width: 6px; | ||
| 438 | - background: #c0c1c1 center center no-repeat; | ||
| 439 | - color: transparent; | ||
| 440 | - text-indent: -5000px; | ||
| 441 | - z-index: 1000; | ||
| 442 | - overflow: hidden; | ||
| 443 | - display: inline-block; | ||
| 444 | -} | ||
| 445 | - | ||
| 446 | -.action-home-index #content .highlights-block-pager a.activeSlide{ | ||
| 447 | - border-color: transparent; | ||
| 448 | - background: #3e67b1; | ||
| 449 | - color: transparent; | ||
| 450 | -} | ||
| 451 | - | ||
| 452 | -/*** software highlights block ***/ | ||
| 453 | - | ||
| 454 | -.action-home-index #content a.toggle-popover, | ||
| 455 | -.action-home-index #content a.toggle-popover:hover{ | ||
| 456 | - margin: 0 0 0 55px; | ||
| 457 | - color: #3867b7; | ||
| 458 | - cursor: pointer; | ||
| 459 | -} | ||
| 460 | - | ||
| 461 | -.action-home-index #content span.popover-span{ | ||
| 462 | - padding: 1px 6px; | ||
| 463 | - border-radius: 50%; | ||
| 464 | - background-color: #3867b7; | ||
| 465 | - color: #ffffff; | ||
| 466 | - font-weight: bold; | ||
| 467 | - cursor: pointer; | ||
| 468 | -} | ||
| 469 | - | ||
| 470 | -/*** mais software block **/ | ||
| 471 | -.action-home-index #content #mais-software-block{ | ||
| 472 | - margin: 11px 0px; | ||
| 473 | - border: 1px solid #c0c1c1; | ||
| 474 | - border-radius: 8px; | ||
| 475 | - padding: 5px 0px; | ||
| 476 | - width: auto; | ||
| 477 | - background-color: #eeeff1; | ||
| 478 | - font: 14px arial; | ||
| 479 | -} | ||
| 480 | - | ||
| 481 | -.action-home-index #content #mais-software-block #sbp-information-softwares h2{ | ||
| 482 | - margin: 10px 0px 0px 0px; | ||
| 483 | - padding: 0px 0px 17px 15px; | ||
| 484 | - border-bottom: 1px solid #c0c1c1; | ||
| 485 | - color: #454545; | ||
| 486 | - font: normal normal normal 16px/21px 'open_sansbold', arial, helvetica, sans-serif; | ||
| 487 | - text-align: left; | ||
| 488 | - text-transform: uppercase; | ||
| 489 | -} | ||
| 490 | - | ||
| 491 | -.action-home-index #content #mais-software-block #list-categories{ | ||
| 492 | - margin: 14px 14px 14px 14px; | ||
| 493 | -} | ||
| 494 | - | ||
| 495 | -.action-home-index #content #mais-software-block #list-categories p{ | ||
| 496 | - margin: 0 0 16px 0; | ||
| 497 | - color: #464A55; | ||
| 498 | -} | ||
| 499 | - | ||
| 500 | -.action-home-index #content #mais-software-block #list-categories ul li{ | ||
| 501 | - margin: 18px 5px 5px 5px; | ||
| 502 | -} | ||
| 503 | - | ||
| 504 | -.action-home-index #content #mais-software-block #list-categories li a{ | ||
| 505 | - color: #335277; | ||
| 506 | - font-weight: bold; | ||
| 507 | -} | ||
| 508 | - | ||
| 509 | -.action-home-index #content #mais-software-block #list-categories a:hover{ | ||
| 510 | - text-decoration: none; | ||
| 511 | -} | ||
| 512 | - | ||
| 513 | -.action-home-index #content #mais-software-block #footer-mais-software{ | ||
| 514 | - margin: 0px; | ||
| 515 | - border-top: 1px solid #c0c1c1; | ||
| 516 | - padding: 10px 10px 0px 3px; | ||
| 517 | - font-size: 11px; | ||
| 518 | - text-align: right; | ||
| 519 | - text-transform: uppercase; | ||
| 520 | -} | ||
| 521 | - | ||
| 522 | -.action-home-index #content #mais-software-block #footer-mais-software a{ | ||
| 523 | - color: #464A55; | ||
| 524 | -} | ||
| 525 | - | ||
| 526 | -/******************** End Box-3 ********************/ |
src/noosfero-spb-theme/css/left-bar.css
| @@ -1,184 +0,0 @@ | @@ -1,184 +0,0 @@ | ||
| 1 | -/******************** Box-2 ********************/ | ||
| 2 | - | ||
| 3 | -/*** WARNING - WITHOUT BOX-4 ***/ | ||
| 4 | - | ||
| 5 | -.template-leftbar .box-2, | ||
| 6 | -.template-default .box-2 { | ||
| 7 | - width:150px; | ||
| 8 | -} | ||
| 9 | - | ||
| 10 | -.template-leftbar #content .box-2 .block-outer .block-title, | ||
| 11 | -.template-default #content .box-2 .block-outer .block-title { | ||
| 12 | - background: #eee; | ||
| 13 | - color: #4562b1; | ||
| 14 | - border-top: 4px solid #4562b1; | ||
| 15 | - line-height: 15px; | ||
| 16 | -} | ||
| 17 | - | ||
| 18 | -/*** Menus - Link list block ***/ | ||
| 19 | - | ||
| 20 | -.template-leftbar #content .box-2 .link-list-block li, | ||
| 21 | -.template-default #content .box-2 .link-list-block li { | ||
| 22 | - margin: 0; | ||
| 23 | - padding: 0; | ||
| 24 | - border-bottom: 1px solid #ddd; | ||
| 25 | - border-top: none; | ||
| 26 | -} | ||
| 27 | - | ||
| 28 | -.template-leftbar #content .box-2 .link-list-block li a, | ||
| 29 | -.template-default #content .box-2 .link-list-block li a { | ||
| 30 | - width: auto; | ||
| 31 | - padding: 6px 5px 8px 18px; | ||
| 32 | - background-color: #fff; | ||
| 33 | - background-position: 0px 50%; | ||
| 34 | - color: #2C66CE; | ||
| 35 | - border-right: none; | ||
| 36 | - border-top: 0px solid #64946E; | ||
| 37 | - border-radius: 0 0 0 0; | ||
| 38 | - font-weight: normal; | ||
| 39 | - font-size: 14px; | ||
| 40 | - line-height: 17px; | ||
| 41 | -} | ||
| 42 | - | ||
| 43 | -.template-leftbar #content .box-2 .link-list-block h3.empty + ul, | ||
| 44 | -.template-default #content .box-2 .link-list-block h3.empty + ul { | ||
| 45 | - border-top: 1px solid #ddd; | ||
| 46 | -} | ||
| 47 | - | ||
| 48 | -.template-leftbar #content .box-2 .link-list-block h3.empty + ul li a, | ||
| 49 | -.template-default #content .box-2 .link-list-block h3.empty + ul li a { | ||
| 50 | - padding-left: 0px; | ||
| 51 | - padding-right: 0px; | ||
| 52 | - background-image: none; | ||
| 53 | -} | ||
| 54 | - | ||
| 55 | -.template-leftbar #content .box-2 .link-list-block li a.link-this-page, | ||
| 56 | -.template-leftbar #content .box-2 .link-list-block li a.link-this-page:hover , | ||
| 57 | -.template-default #content .box-2 .link-list-block li a.link-this-page, | ||
| 58 | -.template-default #content .box-2 .link-list-block li a.link-this-page:hover { | ||
| 59 | - border-right: none; | ||
| 60 | -} | ||
| 61 | - | ||
| 62 | -.template-leftbar #content .box-2 .link-list-block li a:hover, | ||
| 63 | -.template-default #content .box-2 .link-list-block li a:hover { | ||
| 64 | - background-color: #FFFFFF; | ||
| 65 | - color: #000; | ||
| 66 | -} | ||
| 67 | - | ||
| 68 | -.template-leftbar #content .box-2 .link-list-block li a.link-this-page, | ||
| 69 | -.template-default #content .box-2 .link-list-block li a.link-this-page { | ||
| 70 | - width: auto; | ||
| 71 | - margin-left: 0px; | ||
| 72 | - background-color: #ffffff; | ||
| 73 | - font-weight: bold; | ||
| 74 | -} | ||
| 75 | - | ||
| 76 | -/*** END OF WARNING - WITHOUT BOX-4 ***/ | ||
| 77 | - | ||
| 78 | -/*** WARNING - WITH BOX-4 ***/ | ||
| 79 | - | ||
| 80 | -/************ DUPLICATE ************ | ||
| 81 | - | ||
| 82 | - This part of the code is duplicated because, if there is | ||
| 83 | - a change of layout from template-default to lefttopright | ||
| 84 | - the CSS fit without many complication. | ||
| 85 | - | ||
| 86 | - */ | ||
| 87 | - | ||
| 88 | -.template-lefttopright .box-3 { | ||
| 89 | - width:150px; | ||
| 90 | -} | ||
| 91 | - | ||
| 92 | -.template-lefttopright #content .box-3 .block-outer .block-title { | ||
| 93 | - background: #eee; | ||
| 94 | - color: #4562b1; | ||
| 95 | - border-top: 4px solid #4562b1; | ||
| 96 | - line-height: 15px; | ||
| 97 | -} | ||
| 98 | - | ||
| 99 | -/*** Menus - Link list block ***/ | ||
| 100 | - | ||
| 101 | -.template-lefttopright #content .box-3 .link-list-block li { | ||
| 102 | - margin: 0; | ||
| 103 | - padding: 0; | ||
| 104 | - border-bottom: 1px solid #ddd; | ||
| 105 | - border-top: none; | ||
| 106 | -} | ||
| 107 | - | ||
| 108 | -.template-lefttopright #content .box-3 .link-list-block li a { | ||
| 109 | - width: auto; | ||
| 110 | - padding: 6px 5px 8px 18px; | ||
| 111 | - background-color: #fff; | ||
| 112 | - background-position: 0px 50%; | ||
| 113 | - color: #2C66CE; | ||
| 114 | - border-right: none; | ||
| 115 | - border-top: 0px solid #64946E; | ||
| 116 | - border-radius: 0 0 0 0; | ||
| 117 | - font-weight: normal; | ||
| 118 | - font-size: 14px; | ||
| 119 | - line-height: 17px; | ||
| 120 | -} | ||
| 121 | - | ||
| 122 | -.template-lefttopright #content .box-3 .link-list-block h3.empty + ul { | ||
| 123 | - border-top: 1px solid #ddd; | ||
| 124 | -} | ||
| 125 | - | ||
| 126 | -.template-lefttopright #content .box-3 .link-list-block h3.empty + ul li a { | ||
| 127 | - padding-left: 0px; | ||
| 128 | - padding-right: 0px; | ||
| 129 | - background-image: none; | ||
| 130 | -} | ||
| 131 | - | ||
| 132 | -.template-lefttopright #content .box-3 .link-list-block li a.link-this-page, | ||
| 133 | -.template-lefttopright #content .box-3 .link-list-block li a.link-this-page:hover { | ||
| 134 | - border-right: none; | ||
| 135 | -} | ||
| 136 | - | ||
| 137 | -.template-lefttopright #content .box-3 .link-list-block li a:hover { | ||
| 138 | - background-color: #FFFFFF; | ||
| 139 | - color: #000; | ||
| 140 | -} | ||
| 141 | -.template-lefttopright #content .box-3 .link-list-block li a.link-this-page { | ||
| 142 | - width: auto; | ||
| 143 | - margin-left: 0px; | ||
| 144 | - background-color: #ffffff; | ||
| 145 | - font-weight: bold; | ||
| 146 | -} | ||
| 147 | - | ||
| 148 | -/************ END OF DUPLICATE ************ | ||
| 149 | - | ||
| 150 | -/*** END OF WARNING - WITH BOX-4 ***/ | ||
| 151 | - | ||
| 152 | -/*** Statistics block **/ | ||
| 153 | -.template-default #content .box-2 .statistics-block { | ||
| 154 | - padding: 10px 0px 10px 10px | ||
| 155 | -} | ||
| 156 | - | ||
| 157 | -.statistics-block-data ul { | ||
| 158 | - margin-top: 10px; | ||
| 159 | -} | ||
| 160 | - | ||
| 161 | -.statistics-block-data ul li { | ||
| 162 | - margin-left: 18px; | ||
| 163 | - margin-top: 6px; | ||
| 164 | - line-height: 17px; | ||
| 165 | -} | ||
| 166 | - | ||
| 167 | -.statistics-block-data ul li.users span { | ||
| 168 | - font-size: 14px; | ||
| 169 | -} | ||
| 170 | - | ||
| 171 | -span.amount { | ||
| 172 | - font-size: 14px; | ||
| 173 | - font-weight: 700; | ||
| 174 | -} | ||
| 175 | - | ||
| 176 | -span.label { | ||
| 177 | - font-size: 14px; | ||
| 178 | -} | ||
| 179 | - | ||
| 180 | -/*** end of statistics block **/ | ||
| 181 | - | ||
| 182 | -/*** WARNING - WITH BOX-4 ***/ | ||
| 183 | - | ||
| 184 | -/******************** end Box-2 ********************/ |
src/noosfero-spb-theme/css/main-content.css
| @@ -1,174 +0,0 @@ | @@ -1,174 +0,0 @@ | ||
| 1 | -/*** Box ***/ | ||
| 2 | - | ||
| 3 | -.no-boxes .block { | ||
| 4 | - margin-top: 50px; | ||
| 5 | -} | ||
| 6 | - | ||
| 7 | -#content .box-2 .block-outer .block, | ||
| 8 | -#content .box-3 .block-outer .block{ | ||
| 9 | - margin-bottom: 45px; | ||
| 10 | - clear: both; | ||
| 11 | -} | ||
| 12 | - | ||
| 13 | -/*** Block Title ***/ | ||
| 14 | -#content .block-outer .block-title { | ||
| 15 | - padding: 5px 8px 18px 7px; | ||
| 16 | - margin: 0px 0px 2px 0px; | ||
| 17 | - background: #eee; | ||
| 18 | - border-bottom: none; | ||
| 19 | - font-size: 12px; | ||
| 20 | - font-family: "open_sansbold", Arial, Helvetica, sans-serif; | ||
| 21 | - font-variant: normal; | ||
| 22 | - text-transform: uppercase; | ||
| 23 | - text-align: left; | ||
| 24 | - font-weight: 300; | ||
| 25 | -} | ||
| 26 | - | ||
| 27 | -#content .box-1 .block-title { | ||
| 28 | - padding: 5px 8px 20px 10px; | ||
| 29 | - font-size: 18px; | ||
| 30 | - font-family: "open_sansregular", Arial, Helvetica, sans-serif; | ||
| 31 | - text-transform: none; | ||
| 32 | -} | ||
| 33 | - | ||
| 34 | -/*** Pagination ***/ | ||
| 35 | - | ||
| 36 | -#content .pagination { | ||
| 37 | - margin: 48px auto 30px auto; | ||
| 38 | - border-top: 0 none; | ||
| 39 | - font-family: "open_sansregular", Arial, Helvetica, sans-serif; | ||
| 40 | -} | ||
| 41 | - | ||
| 42 | -#content .pagination a, | ||
| 43 | -#content .pagination em, | ||
| 44 | -#content .pagination span{ | ||
| 45 | - padding: 5px 9px; | ||
| 46 | - margin-right: 4px; | ||
| 47 | - color: #172738; | ||
| 48 | - border: 1px solid #D3D6DE; | ||
| 49 | - border-radius: 4px; | ||
| 50 | - letter-spacing: 0.6px; | ||
| 51 | - font-size: 12px; | ||
| 52 | - font-weight: 700; | ||
| 53 | - text-decoration: none; | ||
| 54 | - display: inline-table; | ||
| 55 | -} | ||
| 56 | - | ||
| 57 | -#content .pagination .current { | ||
| 58 | - background-color: #ECEDF1; | ||
| 59 | - font-style: normal; | ||
| 60 | -} | ||
| 61 | - | ||
| 62 | -#content .pagination .previous_page{ | ||
| 63 | - float: left; | ||
| 64 | -} | ||
| 65 | - | ||
| 66 | -#content .pagination .next_page{ | ||
| 67 | - float: right; | ||
| 68 | -} | ||
| 69 | - | ||
| 70 | -#content .pagination .previous_page, | ||
| 71 | -#content .pagination .next_page{ | ||
| 72 | - width: auto; | ||
| 73 | - position: relative; | ||
| 74 | - background-image: none; | ||
| 75 | - font-weight: 500; | ||
| 76 | -} | ||
| 77 | - | ||
| 78 | -#content .pagination .disabled{ | ||
| 79 | - opacity: 0.5; | ||
| 80 | -} | ||
| 81 | - | ||
| 82 | -/*** Button ***/ | ||
| 83 | - | ||
| 84 | -#content .button-bar a.button, | ||
| 85 | -#content .button-bar input { | ||
| 86 | - margin: 0 10px 10px 0; | ||
| 87 | -} | ||
| 88 | - | ||
| 89 | -#content a.button.with-text{ | ||
| 90 | - height: 32px; | ||
| 91 | - padding: 5px 15px; | ||
| 92 | - background: #FFF none; | ||
| 93 | - color: #3E67B1; | ||
| 94 | - border-radius: 4px; | ||
| 95 | - border: 1px solid #3E67B1; | ||
| 96 | - font-size: 14px; | ||
| 97 | - line-height: 32px; | ||
| 98 | - text-transform: uppercase; | ||
| 99 | -} | ||
| 100 | - | ||
| 101 | -#content #article-actions a.button.with-text{ | ||
| 102 | - display: inline-block; | ||
| 103 | - height: 18px; | ||
| 104 | - padding: 5px 10px; | ||
| 105 | - margin-bottom: 5px; | ||
| 106 | - background: #FFF none; | ||
| 107 | - color: #3E67B1; | ||
| 108 | - border-radius: 4px; | ||
| 109 | - border: 1px solid #3E67B1; | ||
| 110 | - font-size: 12px; | ||
| 111 | - line-height: 18px; | ||
| 112 | - text-transform: none; | ||
| 113 | -} | ||
| 114 | - | ||
| 115 | -#content #article-actions a.button.with-text span{ | ||
| 116 | - padding: 0; | ||
| 117 | -} | ||
| 118 | - | ||
| 119 | -.action-profile-members #content .button-bar a.button.with-text{ | ||
| 120 | - height: auto; | ||
| 121 | - border: 1px solid #D3D6DE; | ||
| 122 | - font-size: 12px; | ||
| 123 | - line-height: normal; | ||
| 124 | - text-transform: none; | ||
| 125 | -} | ||
| 126 | -.action-profile-members #content .page-profile-header a.button.with-text{ | ||
| 127 | - border:none; | ||
| 128 | -} | ||
| 129 | -.action-profile-members #content .button-bar a.button.with-text:hover{ | ||
| 130 | - border-color: #3E67B1; | ||
| 131 | -} | ||
| 132 | - | ||
| 133 | -#content form input.button.with-text{ | ||
| 134 | - height: 42px; | ||
| 135 | - max-height: 42px; | ||
| 136 | - padding: 5px 15px; | ||
| 137 | - background: #FFF none; | ||
| 138 | - color: #3E67B1; | ||
| 139 | - border-radius: 4px; | ||
| 140 | - border: 1px solid #3E67B1; | ||
| 141 | - font-size: 14px; | ||
| 142 | - line-height: 32px; | ||
| 143 | - text-transform: uppercase; | ||
| 144 | -} | ||
| 145 | - | ||
| 146 | -#content a.button:hover, | ||
| 147 | -#content #article-actions a.button.with-text:hover, | ||
| 148 | -#content input.button.with-text:hover{ | ||
| 149 | - background-color: #3E67B1; | ||
| 150 | - color: #FFF; | ||
| 151 | -} | ||
| 152 | - | ||
| 153 | -/* This is a temporary solution until noosfero deals with logged-out comments in a better manner. */ | ||
| 154 | -.comment-replies .comment-logged-out .comment-text, | ||
| 155 | -.comment-logged-out .comment-picture, | ||
| 156 | -.comment-logged-out h4 { | ||
| 157 | - opacity: 1.0; | ||
| 158 | -} | ||
| 159 | - | ||
| 160 | -.comment-logged-out .comment-text, | ||
| 161 | -.comment-info { | ||
| 162 | - color: black; | ||
| 163 | -} | ||
| 164 | -/**/ | ||
| 165 | - | ||
| 166 | -/* Temporary solution to code block in tutorial page. */ | ||
| 167 | -.article-body td { | ||
| 168 | - background-color: white; | ||
| 169 | -} | ||
| 170 | - | ||
| 171 | -.article-body td:hover { | ||
| 172 | - background-color: white; | ||
| 173 | -} | ||
| 174 | -/* End of temporary solution to code block in tutorial page. */ |