_full_community.html.erb 2.04 KB
<% software = community.software_info %>
<li class="search-profile-item">
  <div class="search-enterprise-item">
    <div class="search-enterprise-item-column-left">
      <%= profile_image_link community, :portrait, 'div', community.send(@filter + '_label') + show_date(community.created_at) %>
    </div>

    <div class="search-enterprise-item-column-right">

      <div class="search-community-content-block">
        <span>
          <% link_name = software.acronym.blank? ? community.name : "#{software.acronym} - #{community.name}" %>
          <h4>
            <%= link_to_homepage(link_name, community.identifier) %>
          </h4>
        </span>

        <span>
          <% body_stripped = strip_tags(software.finality) %>
          <b>
            <%= _("Finality") + ":" if body_stripped %>
          </b>
          <%= excerpt(body_stripped, body_stripped.first(3), 200) if body_stripped %>
        </span>
      </div>

      <div class="search-community-content-block">
        <span>
          <b>
            <%= _("Software licence") %>:
          </b>
          <%= link_to(software.license_info.version, software.license_info.link, :target=>"blank") %>
        </span>
      </div>

      <div class="search-community-content-block">
        <span>
          <b>
            <%= _("Link software repository") %>:
          </b>
          <%= link_to(software.repository_link, software.repository_link, :target=>"blank") %>
        </span>
      </div>

      <div class="search-community-content-block">
        <span>
          <b>
            <%= _("Software Categories") %>:
          </b>
        </span>

        <% if !community.categories.empty? %>
          <ul id="categories-list">
            <% community.categories.each do |category| %>
              <li>
                <%= category.name %>
              </li>
            <% end %>
          </ul>
        <% else %>
          <span>
            <%= _("This software doesn't have categories") %>
          </span>
        <% end %>
      </div>
    </div>

    <hr class="clearfix" />
  </div>
</li>