software_information.html.erb 1.94 KB
<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>