software_information.html.erb
1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<div class="vcard">
<% if block.owner.software_info.nil? %>
<%= _("This community needs a software to use this block") %>
<% else %>
<table id="software-information-block-table">
<tr>
<td width="30%" id="col-profile-big-image">
<div class="profile-big-image">
<div class="profile-big-image-inner1">
<span class="profile-big-image-inner2">
<%= link_to profile_image(block.owner, :big) +"\n", profile.url %>
</span>
<div class='admin-link'>
<% if current_user && block.owner.admins.include?(current_user.person) %>
<%= link_to _('Control panel'), block.owner.admin_url %>
<% end %>
</div>
</div>
</div>
</td>
<td width="70%" id="col-software-name">
<h1>
<%= _("#{block.owner.software_info.acronym} - ") unless block.owner.software_info.acronym.blank? %>
<%= _("#{block.owner.name}") %>
</h1>
<b>
<%= block.owner.software_info.finality %>
</b>
<div class="community-average-rating-container">
<% if average_rating %>
<div class="star-rate-text"><%= _("Rate") %></div>
<div class="star-container">
<% (1..5).each do |star_number| %>
<% if star_number <= average_rating %>
<div class="medium-star-positive"></div>
<% else %>
<div class="medium-star-negative"></div>
<% end %>
<% end %>
</div>
<% else %>
<%= _("Be the first to rate this software") %>
<% end %>
<div class="rate-this-software">
<%= link_to _('Rate this software'), url_for(:controller => 'communities_ratings_plugin_profile', :action => 'new_rating', :profile=>block.owner.identifier) %>
</div>
</div>
</td>
</tr>
</table>
<% end %>
</div>