Commit 48a6c1f887bd008cf693372f661c633dfecbc540
1 parent
76b05779
Exists in
master
and in
2 other branches
Hotfix homepage main-area softwares
Signed-off-by: Álvaro Fernando <alvarofernandoms@gmail.com> Signed-off-by: Joenio Costa <joenio@colivre.coop.br>
Showing
3 changed files
with
48 additions
and
14 deletions
Show diff stats
src/noosfero-spb/software_communities/lib/software_communities_plugin/softwares_block.rb
| ... | ... | @@ -70,9 +70,16 @@ class SoftwareCommunitiesPlugin::SoftwaresBlock < CommunitiesBlock |
| 70 | 70 | |
| 71 | 71 | def content(arg={}) |
| 72 | 72 | block = self |
| 73 | - proc do | |
| 74 | - render :file => 'blocks/main_area_softwares', | |
| 75 | - :locals => {:profiles=> block.profile_list(), :block => block} | |
| 73 | + if self.box.owner_type == "Environment" && self.box.position == 1 | |
| 74 | + proc do | |
| 75 | + render :file => 'blocks/main_area_softwares', | |
| 76 | + :locals => {:profiles=> block.profile_list(), :block => block} | |
| 77 | + end | |
| 78 | + else | |
| 79 | + proc do | |
| 80 | + render :file => 'blocks/side_area_softwares', | |
| 81 | + :locals => {:profiles=> block.profile_list(), :block => block} | |
| 82 | + end | |
| 76 | 83 | end |
| 77 | 84 | end |
| 78 | 85 | ... | ... |
src/noosfero-spb/software_communities/views/blocks/main_area_softwares.html.erb
| 1 | -<% extend PeopleBlockHelper %> | |
| 1 | +<%= block_title(block.title) %> | |
| 2 | +<% profiles.each do |profile| %> | |
| 3 | + <%= link_to profile.url do %> | |
| 4 | + <div class="software-block"> | |
| 5 | + <div class="software-block-content"> | |
| 6 | + <div class="software-block-logo"> | |
| 7 | + <%= profile_image(profile, :big) %> | |
| 8 | + </div> | |
| 2 | 9 | |
| 3 | -<%= block_title(block.view_title) %> | |
| 10 | + <div class="software-block-info"> | |
| 11 | + <div class="software-block-title"> | |
| 12 | + <h3> <%=profile.name%> </h3> | |
| 13 | + </div> | |
| 14 | + <div class="software-block-description"><%= profile.description %></div> | |
| 15 | + </div> | |
| 16 | + </div> | |
| 4 | 17 | |
| 5 | -<div> | |
| 6 | - <% unless block.profile_count == 0 %> | |
| 7 | - <ul> | |
| 8 | - <%= profiles_images_list(block.profile_list) %> | |
| 9 | - </ul> | |
| 10 | - <% else %> | |
| 11 | - <div class="common-profile-list-block-none"><%= c_('None') %></div> | |
| 18 | + <div class="software-block-finality"> | |
| 19 | + <p> | |
| 20 | + <%= profile.software_info.finality %> | |
| 21 | + </p> | |
| 22 | + | |
| 23 | + <%= _("See More") %> | |
| 24 | + </div> | |
| 25 | + </div> | |
| 12 | 26 | <% end %> |
| 13 | - <br style="clear:both" /> | |
| 14 | -</div> | |
| 27 | +<% end %> | ... | ... |
src/noosfero-spb/software_communities/views/blocks/side_area_softwares.html.erb
0 → 100644
| ... | ... | @@ -0,0 +1,14 @@ |
| 1 | +<% extend PeopleBlockHelper %> | |
| 2 | + | |
| 3 | +<%= block_title(block.view_title) %> | |
| 4 | + | |
| 5 | +<div> | |
| 6 | + <% unless block.profile_count == 0 %> | |
| 7 | + <ul> | |
| 8 | + <%= profiles_images_list(block.profile_list) %> | |
| 9 | + </ul> | |
| 10 | + <% else %> | |
| 11 | + <div class="common-profile-list-block-none"><%= c_('None') %></div> | |
| 12 | + <% end %> | |
| 13 | + <br style="clear:both" /> | |
| 14 | +</div> | ... | ... |