Commit a6e8c7faf38b895b1b3a1bb43956dc3d767149d2
Committed by
Antonio Terceiro
1 parent
f92f835b
Exists in
master
and in
28 other branches
Changed profiles list blocks to have 3 columns
ActionItem1773 Signed-off-by: Antonio Terceiro <terceiro@colivre.coop.br>
Showing
5 changed files
with
19 additions
and
9 deletions
Show diff stats
app/helpers/application_helper.rb
... | ... | @@ -555,7 +555,7 @@ module ApplicationHelper |
555 | 555 | # displays a link to the community homepage with its image (as generated by |
556 | 556 | # #profile_image) and its name and number of members beside it. |
557 | 557 | def community_image_link( profile, size=:portrait, tag='li' ) |
558 | - name = h(profile.name) | |
558 | + name = h(profile.short_name) | |
559 | 559 | links = links_for_balloon(profile) |
560 | 560 | url = url_for(profile.check_membership_url) |
561 | 561 | content_tag tag, | ... | ... |
app/models/profile_list_block.rb
... | ... | @@ -38,7 +38,7 @@ class ProfileListBlock < Block |
38 | 38 | count=0 |
39 | 39 | list = profiles.map {|item| |
40 | 40 | count+=1 |
41 | - send(link_method, item ) #+ | |
41 | + send(link_method, item, :minor ) | |
42 | 42 | }.join("\n ") |
43 | 43 | if list.empty? |
44 | 44 | list = '<div class="common-profile-list-block-none">'+ _('None') +'</div>' | ... | ... |
public/stylesheets/application.css
... | ... | @@ -1430,8 +1430,6 @@ input.disabled { |
1430 | 1430 | float: none; |
1431 | 1431 | padding-left: 0px; |
1432 | 1432 | max-width: none; |
1433 | - width: 92px; | |
1434 | - height: 64px; | |
1435 | 1433 | } |
1436 | 1434 | |
1437 | 1435 | #content .communities-block .vcard .profile_link { |
... | ... | @@ -1721,6 +1719,18 @@ input.disabled { |
1721 | 1719 | border: none; |
1722 | 1720 | } |
1723 | 1721 | |
1722 | +.box-2 .common-profile-list-block span, | |
1723 | +.box-3 .common-profile-list-block span, | |
1724 | +.box-2 .common-profile-list-block .profile-image, | |
1725 | +.box-3 .common-profile-list-block .profile-image { | |
1726 | + width: 58px; | |
1727 | +} | |
1728 | + | |
1729 | +.box-2 .common-profile-list-block .profile-image, | |
1730 | +.box-3 .common-profile-list-block .profile-image { | |
1731 | + height: 50px; | |
1732 | +} | |
1733 | + | |
1724 | 1734 | .common-profile-list-block .locality { |
1725 | 1735 | font-size: 9px; |
1726 | 1736 | opacity: 0.5; | ... | ... |
test/unit/people_block_test.rb
... | ... | @@ -25,8 +25,8 @@ class PeopleBlockTest < ActiveSupport::TestCase |
25 | 25 | person1 = fast_create(Person, :environment_id => owner.id) |
26 | 26 | person2 = fast_create(Person, :environment_id => owner.id) |
27 | 27 | |
28 | - expects(:profile_image_link).with(person1).returns(person1.name) | |
29 | - expects(:profile_image_link).with(person2).returns(person2.name) | |
28 | + expects(:profile_image_link).with(person1, :minor).returns(person1.name) | |
29 | + expects(:profile_image_link).with(person2, :minor).returns(person2.name) | |
30 | 30 | expects(:block_title).with(anything).returns('') |
31 | 31 | |
32 | 32 | content = instance_eval(&block.content) | ... | ... |
test/unit/profile_list_block_test.rb
... | ... | @@ -28,9 +28,9 @@ class ProfileListBlockTest < Test::Unit::TestCase |
28 | 28 | block = ProfileListBlock.new |
29 | 29 | block.stubs(:owner).returns(env) |
30 | 30 | |
31 | - self.expects(:profile_image_link).with(person1).once | |
32 | - self.expects(:profile_image_link).with(person2).once | |
33 | - self.expects(:profile_image_link).with(person3).once | |
31 | + self.expects(:profile_image_link).with(person1, :minor).once | |
32 | + self.expects(:profile_image_link).with(person2, :minor).once | |
33 | + self.expects(:profile_image_link).with(person3, :minor).once | |
34 | 34 | |
35 | 35 | self.expects(:content_tag).returns('<div></div>').at_least_once |
36 | 36 | self.expects(:block_title).returns('block title').at_least_once | ... | ... |