Commit 86d9f95208e03cdedceafb26da4f03e338b073bf

Authored by Tallys Martins
Committed by Daniela Feitosa
1 parent b8b38926

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,6 +8,19 @@
8 padding-bottom:30px; 8 padding-bottom:30px;
9 margin-bottom: 30px; 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 .action-profile-index .page-profile-header .join-leave-button.require-login-popup{ 24 .action-profile-index .page-profile-header .join-leave-button.require-login-popup{
12 float:left; 25 float:left;
13 width: 35%; 26 width: 35%;
@@ -838,10 +851,10 @@ float: left; @@ -838,10 +851,10 @@ float: left;
838 } 851 }
839 852
840 .action-profile-members #content .page-members-header{ 853 .action-profile-members #content .page-members-header{
841 - margin-bottom: 45px; 854 + margin-bottom: 40px;
842 border-bottom: 1px solid #D3D6DE; 855 border-bottom: 1px solid #D3D6DE;
843 font-family: Arial; 856 font-family: Arial;
844 - height: 150px; 857 + height: 140px;
845 } 858 }
846 859
847 .action-profile-members #content .page-members-header h1{ 860 .action-profile-members #content .page-members-header h1{
@@ -857,7 +870,6 @@ float: left; @@ -857,7 +870,6 @@ float: left;
857 .action-profile-members #content .page-members-header ul li{ 870 .action-profile-members #content .page-members-header ul li{
858 float:left; 871 float:left;
859 margin:8px 0px 0px 0px; 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,12 +11,15 @@
11 <% end %> 11 <% end %>
12 12
13 <div class="page-profile-header"> 13 <div class="page-profile-header">
14 - <%= render "blocks/profile_info_actions/join_leave_community" if profile.class == "Community" %> 14 +
15 <% if !user.nil? && user.has_permission?('edit_profile', profile) %> 15 <% if !user.nil? && user.has_permission?('edit_profile', profile) %>
16 <div class="control-panel-button"> 16 <div class="control-panel-button">
17 <%= button :control_panel, _('Control Panel'), profile.admin_url %> 17 <%= button :control_panel, _('Control Panel'), profile.admin_url %>
18 </div> 18 </div>
19 <% end %> 19 <% end %>
  20 + <% if profile.is_a? Community %>
  21 + <%= render "blocks/profile_info_actions/join_leave_community" %>
  22 + <% end %>
20 </div> 23 </div>
21 24
22 <% if @profile.public? || (logged_in? && current_person.follows?(@profile)) %> 25 <% if @profile.public? || (logged_in? && current_person.follows?(@profile)) %>