Commit 86d9f95208e03cdedceafb26da4f03e338b073bf

Authored by Tallys Martins
Committed by Daniela Feitosa
1 parent b8b38926
Exists in master and in 70 other branches add_sisp_to_chef, add_super_archives_plugin, api_for_colab, automates_core_packing, backup_not_prod, changes_in_buttons_on_content_panel, colab_automated_login, colab_spb_plugin_recipe, colab_widgets_settings, design_validation, disable_email_dev, fix_breadcrumbs_position, fix_categories_software_link, fix_edit_institution, fix_edit_software_with_another_license, fix_get_license_info, fix_gitlab_assets_permission, fix_list_style_inside_article, fix_list_style_on_folder_elements, fix_members_pagination, fix_merge_request_url, fix_models_translations, fix_no_license, fix_software_block_migration, fix_software_communities_translations, fix_software_communities_unit_test, fix_style_create_institution_admin_panel, fix_superarchives_imports, fix_sym_links_noosfero, focus_search_field_theme, gov-user-refactoring, gov-user-refactoring-rails4, header_fix, institution_modal_on_rating, kalibro-conf-refactoring, kalibro-processor-package, lxc_settings, margin_fix, mezuro_cookbook, prezento, refactor_download_block, refactor_software_communities, refactor_software_for_sisp, register_page, release-process, release-process-v2, remove_broken_theme, remove_secondary_email_from_user, remove_sisp_buttons, removing_super_archives_email, review_message, scope2method, signals_user_noosfero, sisp_catalog_header, sisp_dev_master, software_as_organization, software_catalog_style_fix, software_communities_html_refactor, software_infos_api, spb_to_rails4, spec_refactor, stable-4.1, stable-4.2, temp_soft_comm_refactoring, theme_header, theme_javascript_refactory, thread_dropdown, thread_page, update_search_by_categories, update_softwares_boxes

Add join leave button on communities page

This closes #303

Signed-off-by: Marcos Ronaldo <marcos.rpj2@gmail.com>
Signed-off-by: Juliana <julianahdesousa@gmail.com>
src/noosfero-spb/noosfero-spb-theme/css/community-pages.css
... ... @@ -8,6 +8,19 @@
8 8 padding-bottom:30px;
9 9 margin-bottom: 30px;
10 10 }
  11 +
  12 +.action-profile-index #content .page-profile-header{
  13 + margin-bottom: 40px;
  14 + border-bottom: 1px solid #D3D6DE;
  15 + font-family: Arial;
  16 + height: 40px;
  17 +}
  18 +
  19 +.action-profile-index .page-profile-header .control-panel-button{
  20 + float:left;
  21 + margin-right: 4px;
  22 +}
  23 +
11 24 .action-profile-index .page-profile-header .join-leave-button.require-login-popup{
12 25 float:left;
13 26 width: 35%;
... ... @@ -838,10 +851,10 @@ float: left;
838 851 }
839 852  
840 853 .action-profile-members #content .page-members-header{
841   - margin-bottom: 45px;
  854 + margin-bottom: 40px;
842 855 border-bottom: 1px solid #D3D6DE;
843 856 font-family: Arial;
844   - height: 150px;
  857 + height: 140px;
845 858 }
846 859  
847 860 .action-profile-members #content .page-members-header h1{
... ... @@ -857,7 +870,6 @@ float: left;
857 870 .action-profile-members #content .page-members-header ul li{
858 871 float:left;
859 872 margin:8px 0px 0px 0px;
860   - width: 36%;
861 873  
862 874 }
863 875  
... ...
src/noosfero-spb/software_communities/views/profile/index.html.erb
... ... @@ -11,12 +11,15 @@
11 11 <% end %>
12 12  
13 13 <div class="page-profile-header">
14   - <%= render "blocks/profile_info_actions/join_leave_community" if profile.class == "Community" %>
  14 +
15 15 <% if !user.nil? && user.has_permission?('edit_profile', profile) %>
16 16 <div class="control-panel-button">
17 17 <%= button :control_panel, _('Control Panel'), profile.admin_url %>
18 18 </div>
19 19 <% end %>
  20 + <% if profile.is_a? Community %>
  21 + <%= render "blocks/profile_info_actions/join_leave_community" %>
  22 + <% end %>
20 23 </div>
21 24  
22 25 <% if @profile.public? || (logged_in? && current_person.follows?(@profile)) %>
... ...