Commit 4266eb25d63fa2f67092e8c47147be25dd46d95a
Committed by
Daniela Feitosa
1 parent
5014ab2a
Exists in
master
and in
41 other branches
Software catalog bug fixes
Signed-off-by: ArthurJahn <stutrzbecher@gmail.com> Signed-off-by: Fabio Teixeira <fabio1079@gmail.com> Closes #561
Showing
4 changed files
with
68 additions
and
61 deletions
Show diff stats
src/noosfero-spb/noosfero-spb-theme/css/software-catalog-page.css
... | ... | @@ -347,13 +347,6 @@ |
347 | 347 | margin-top: 35px; |
348 | 348 | } |
349 | 349 | |
350 | -.action-search-software_infos #search-results .search-software-item-column-left .vcard img { | |
351 | - max-width: 90px; | |
352 | - max-height: 130px; | |
353 | - height: auto; | |
354 | - margin-left:170px; | |
355 | -} | |
356 | - | |
357 | 350 | .action-search-software_infos #search-results .search-software-item-column-left .org { |
358 | 351 | display: none; |
359 | 352 | } |
... | ... | @@ -395,12 +388,32 @@ |
395 | 388 | .action-search-software_infos #search-results .search-software-item-column-right { |
396 | 389 | width: 65%; |
397 | 390 | float: left; |
398 | - margin-left: 140px; | |
391 | + margin-left: 20px; | |
399 | 392 | padding: 0 0 0 8px; |
400 | 393 | font-size: 15px; |
401 | 394 | font-family: Arial; |
402 | 395 | } |
403 | 396 | |
397 | +.action-search-software_infos #search-results .search-software-item-column-right .search-software-profile-img { | |
398 | + position: relative; | |
399 | + float: left; | |
400 | + width: 20%; | |
401 | + margin-top: 8px; | |
402 | +} | |
403 | + | |
404 | +.action-search-software_infos #search-results .search-software-item-column-right .search-software-profile-img img { | |
405 | + max-width: 90px; | |
406 | + max-height: 130px; | |
407 | + height: auto; | |
408 | +} | |
409 | + | |
410 | +.action-search-software_infos #search-results .search-software-item-column-right .search-software-content-block { | |
411 | + position: relative; | |
412 | + float: left; | |
413 | + width: 79%; | |
414 | + margin-top: 8px; | |
415 | +} | |
416 | + | |
404 | 417 | .action-search-software_infos #search-results .search-software-item-column-right .search-software-content-block h4{ |
405 | 418 | margin-top: 0; |
406 | 419 | } |
... | ... | @@ -410,22 +423,15 @@ |
410 | 423 | font-size: 19px; |
411 | 424 | } |
412 | 425 | |
413 | -.action-search-software_infos #search-results .search-software-item-column-right .search-software-content-block:last-child { | |
414 | - margin-top: 30px; | |
415 | -} | |
416 | - | |
417 | -.action-search-software_infos #search-results .search-software-item-column-right span{ | |
418 | - width: 100%; | |
419 | -} | |
420 | - | |
421 | -.action-search-software_infos #search-results .search-software-item-column-right span b{ | |
426 | +.action-search-software_infos #search-results .search-software-item-column-right .search-software-categories span { | |
427 | + width: auto; | |
428 | + float: left; | |
422 | 429 | font-weight: normal; |
423 | 430 | font-size: 13px; |
424 | 431 | } |
425 | 432 | |
426 | -.action-search-software_infos #search-results .search-software-item-column-right .search-software-content-block:last-child span{ | |
427 | - width: auto; | |
428 | - float: left; | |
433 | +.action-search-software_infos #search-results .search-software-item-column-right .search-software-categories { | |
434 | + margin-top: 30px; | |
429 | 435 | } |
430 | 436 | |
431 | 437 | .action-search-software_infos #search-results .search-software-content-block #categories-list li { | ... | ... |
src/noosfero-spb/software_communities/lib/ext/search_controller.rb
... | ... | @@ -4,6 +4,8 @@ require_dependency 'search_controller' |
4 | 4 | |
5 | 5 | class SearchController |
6 | 6 | |
7 | + DEFAULT_SOFTWARE_SORT = 'rating' | |
8 | + | |
7 | 9 | def self.catalog_list |
8 | 10 | { :public_software => ["Software Público", "software_infos"], |
9 | 11 | :sisp_software => ["SISP", "sisp"] } |
... | ... | @@ -144,6 +146,8 @@ class SearchController |
144 | 146 | |
145 | 147 | def prepare_software_infos_params title |
146 | 148 | @titles[title.to_sym] = _("Result Search") |
149 | + params[:sort] ||= DEFAULT_SOFTWARE_SORT | |
150 | + | |
147 | 151 | @selected_categories_id = params[:selected_categories_id] |
148 | 152 | @selected_categories_id ||= [] |
149 | 153 | @selected_categories_id = @selected_categories_id.map(&:to_i) | ... | ... |
src/noosfero-spb/software_communities/views/search/_full_community.html.erb
1 | 1 | <% software = community.software_info %> |
2 | 2 | <li class="search-software-item"> |
3 | - <% organization_average_rating = '' %> | |
4 | - <% unless community.organization_ratings.empty?%> | |
5 | - <% organization_average_rating = render :partial => 'shared/organization_average_rating_block', :locals => {:community => community}%> | |
6 | - <% end %> | |
7 | - | |
8 | - <% software_publish_date = render :partial => 'shared/software_publish_date', :locals => {:community => community, :order => @order} %> | |
9 | - | |
10 | 3 | <div class="search-software-item-column-left"> |
11 | - <%= profile_image_link community, :portrait, 'div', organization_average_rating + software_publish_date %> | |
4 | + <div class="vcard"> | |
5 | + <% unless community.organization_ratings.empty?%> | |
6 | + <%= render :partial => 'shared/organization_average_rating_block', :locals => {:community => community}%> | |
7 | + <% end %> | |
8 | + | |
9 | + <%=render :partial => 'shared/software_publish_date', :locals => {:community => community, :order => @order} %> | |
10 | + </div> | |
12 | 11 | </div> |
13 | 12 | |
14 | 13 | <div class="search-software-item-column-right"> |
14 | + <div class="search-software-profile-img"> | |
15 | + <%= link_to_homepage(profile_image(community, :portrait), community.identifier) %> | |
16 | + </div> | |
15 | 17 | |
16 | 18 | <div class="search-software-content-block"> |
17 | - <span> | |
18 | 19 | <% link_name = software.acronym.blank? ? community.name : "#{software.acronym} - #{community.name}" %> |
19 | 20 | <h4> |
20 | 21 | <%= link_to_homepage(link_name, community.identifier) %> |
21 | 22 | </h4> |
22 | - </span> | |
23 | - <span class="search-content-result"> | |
24 | - <% body_stripped = strip_tags(software.finality) %> | |
25 | - <%= excerpt(body_stripped, body_stripped.first(3), 200) if body_stripped %> | |
26 | - </span> | |
27 | - </div> | |
28 | 23 | |
29 | - <br /> | |
24 | + <div class="search-content-description"> | |
25 | + <% body_stripped = strip_tags(software.finality) %> | |
26 | + <%= link_to_homepage(excerpt(body_stripped, body_stripped.first(3), 200), community.identifier) if body_stripped %> | |
27 | + </div> | |
30 | 28 | |
31 | - <div class="search-software-content-block"> | |
32 | - <span> | |
33 | - <b> | |
34 | - <%= _("Software Categories") %>: | |
35 | - </b> | |
36 | - </span> | |
37 | - | |
38 | - <% if !community.categories.empty? %> | |
39 | - <ul id="categories-list"> | |
40 | - <% community.categories.each do |category| %> | |
41 | - <li> | |
42 | - <%= link_to _("#{category.name}"), { | |
43 | - :controller => :search, | |
44 | - :action => :software_infos, | |
45 | - :selected_categories_id => [category.id], | |
46 | - :software_type => params[:software_type] | |
47 | - } %> | |
48 | - </li> | |
49 | - <% end %> | |
50 | - </ul> | |
51 | - <% else %> | |
29 | + <div class="search-software-categories"> | |
52 | 30 | <span> |
53 | - <%= _("This software doesn't have categories") %> | |
31 | + <%= _("Software Categories") %>: | |
54 | 32 | </span> |
55 | - <% end %> | |
56 | - </div> | |
33 | + | |
34 | + <% if !community.categories.empty? %> | |
35 | + <ul id="categories-list"> | |
36 | + <% community.categories.each do |category| %> | |
37 | + <li> | |
38 | + <%= link_to _("#{category.name}"), { | |
39 | + :controller => :search, | |
40 | + :action => :software_infos, | |
41 | + :selected_categories_id => [category.id], | |
42 | + :software_type => params[:software_type] | |
43 | + } %> | |
44 | + </li> | |
45 | + <% end %> | |
46 | + </ul> | |
47 | + <% else %> | |
48 | + <span> | |
49 | + <%= _("This software doesn't have categories") %> | |
50 | + </span> | |
51 | + <% end %> | |
52 | + </div> | |
53 | + </div><!-- /.content-block --> | |
57 | 54 | </div> |
58 | 55 | |
59 | 56 | <hr class="clearfix" /> | ... | ... |
src/noosfero-spb/software_communities/views/search/_software_search_form.html.erb