Commit d99faa27fa0fb063b0b06132458b9367e48a7869
1 parent
52f0d711
Exists in
master
and in
5 other branches
Added community buttons to profile page
Showing
2 changed files
with
27 additions
and
1 deletions
Show diff stats
views/blocks/software_information.html.erb
@@ -12,7 +12,7 @@ | @@ -12,7 +12,7 @@ | ||
12 | <%= link_to profile_image(block.owner, :big) +"\n", profile.url %> | 12 | <%= link_to profile_image(block.owner, :big) +"\n", profile.url %> |
13 | </span> | 13 | </span> |
14 | <div class='admin-link'> | 14 | <div class='admin-link'> |
15 | - <% if current_user && block.owner.admins.include?(current_user.person) %> | 15 | + <% if !user.nil? && user.has_permission?('edit_profile', profile) %> |
16 | <%= link_to _('Control panel'), block.owner.admin_url %> | 16 | <%= link_to _('Control panel'), block.owner.admin_url %> |
17 | <% end %> | 17 | <% end %> |
18 | </div> | 18 | </div> |
@@ -0,0 +1,26 @@ | @@ -0,0 +1,26 @@ | ||
1 | +<h1><%= h profile.name %></h1> | ||
2 | + | ||
3 | +<% if @action %> | ||
4 | + <%= render :partial => 'private_profile' %> | ||
5 | +<% else %> | ||
6 | + <% unless profile.description.blank? %> | ||
7 | + <div class='public-profile-description'> | ||
8 | + <%= profile.description %> | ||
9 | + </div> | ||
10 | + <% end %> | ||
11 | +<% end %> | ||
12 | + | ||
13 | +<div class="page-profile-header"> | ||
14 | + <%= render "blocks/profile_info_actions/join_leave_community" %> | ||
15 | + <% if !user.nil? && user.has_permission?('edit_profile', profile) %> | ||
16 | + <div class="control-panel-button"> | ||
17 | + <%= button :control_panel, _('Control Panel'), profile.admin_url %> | ||
18 | + </div> | ||
19 | + <% end %> | ||
20 | +</div> | ||
21 | + | ||
22 | +<% if @profile.public? || (logged_in? && current_person.follows?(@profile)) %> | ||
23 | + <table class='profile'> | ||
24 | + | ||
25 | + </table> | ||
26 | +<% end %> |