Commit 6abdae0ad98615913582c67502a39b906445f0a3
1 parent
c6410e3e
Exists in
master
and in
29 other branches
profile-connections: changes css to connections block
Makes the connections shown in the community / people block less crowded. (ActionItem3234)
Showing
5 changed files
with
71 additions
and
53 deletions
Show diff stats
app/helpers/application_helper.rb
@@ -1419,9 +1419,13 @@ module ApplicationHelper | @@ -1419,9 +1419,13 @@ module ApplicationHelper | ||
1419 | text_field_tag name, default, options.merge({:id => 'search-input', 'data-asset' => asset}) | 1419 | text_field_tag name, default, options.merge({:id => 'search-input', 'data-asset' => asset}) |
1420 | end | 1420 | end |
1421 | 1421 | ||
1422 | - def profile_suggestion_categories(suggestion) | ||
1423 | - suggestion.categories.map do |cat| | ||
1424 | - content_tag(:p, content_tag(:span, "#{suggestion.category_label(cat[0])}: #{cat[1]}", :class => suggestion.category_icon(cat[0]))) | 1422 | + def profile_suggestion_profile_connections(suggestion) |
1423 | + suggestion.profile_connections.map do |cat| | ||
1424 | + end.join | ||
1425 | + end | ||
1426 | + | ||
1427 | + def profile_suggestion_tag_connections(suggestion) | ||
1428 | + suggestion.tag_connections.map do |cat| | ||
1425 | end.join | 1429 | end.join |
1426 | end | 1430 | end |
1427 | end | 1431 | end |
app/views/shared/_profile_suggestions_list.html.erb
@@ -8,32 +8,27 @@ | @@ -8,32 +8,27 @@ | ||
8 | <ul class="profile-list"> | 8 | <ul class="profile-list"> |
9 | <% suggestions.each do |s| %> | 9 | <% suggestions.each do |s| %> |
10 | <li> | 10 | <li> |
11 | - <%= link_to_profile profile_image(s.suggestion, :minor) + '<br/>' + s.suggestion.short_name, | 11 | + <%= link_to_profile profile_image(s.suggestion, :minor), |
12 | s.suggestion.identifier, :class => 'profile-link' %> | 12 | s.suggestion.identifier, :class => 'profile-link' %> |
13 | - <%= button_without_text :help, content_tag('span',_('info about suggestion')), | ||
14 | - '#', | ||
15 | - :class => 'explain-suggestion', | ||
16 | - :title => _('Why this suggestion?') %> | ||
17 | - <div class='extra_info' style='display:none'> | 13 | + <% if collection == :friends_suggestions %> |
14 | + <%= link_to _('Add %s') % s.suggestion.short_name, | ||
15 | + s.suggestion.add_url, :class => 'accept-suggestion' %> | ||
16 | + <% elsif collection == :communities_suggestions %> | ||
17 | + <%= link_to _('Join %s') % s.suggestion.name, | ||
18 | + s.suggestion.add_url, :class => 'accept-suggestion' %> | ||
19 | + <% end %> | ||
20 | + <div class='extra_info'> | ||
18 | <%= profile_suggestion_categories(s) %> | 21 | <%= profile_suggestion_categories(s) %> |
19 | </div> | 22 | </div> |
20 | <div class="controll"> | 23 | <div class="controll"> |
21 | <% if collection == :friends_suggestions %> | 24 | <% if collection == :friends_suggestions %> |
22 | - <%= button_without_text :add, content_tag('span',_('add')), | ||
23 | - s.suggestion.add_url, | ||
24 | - :class => 'add-friend accept-suggestion', | ||
25 | - :title => _('Add friend') %> | ||
26 | - <%= button_without_text :remove, content_tag('span',_('remove')), | 25 | + <%= link_to 'x', |
27 | { :controller => 'friends', :action => 'remove_suggestion', :id => s.suggestion.identifier }, | 26 | { :controller => 'friends', :action => 'remove_suggestion', :id => s.suggestion.identifier }, |
28 | :class => 'remove-suggestion', | 27 | :class => 'remove-suggestion', |
29 | :title => _('Remove suggestion'), | 28 | :title => _('Remove suggestion'), |
30 | :confirm => _('Are you sure you want to remove this suggestion?') %> | 29 | :confirm => _('Are you sure you want to remove this suggestion?') %> |
31 | <% elsif collection == :communities_suggestions %> | 30 | <% elsif collection == :communities_suggestions %> |
32 | - <%= button_without_text :add, content_tag('span',_('join')), | ||
33 | - s.suggestion.join_url, | ||
34 | - :class => 'join-community accept-suggestion', | ||
35 | - :title => _("Join %s") % s.suggestion.name %> | ||
36 | - <%= button_without_text :remove, content_tag('span',_('remove')), | 31 | + <%= link_to 'x', |
37 | { :controller => 'memberships', :action => 'remove_suggestion', :id => s.suggestion.identifier }, | 32 | { :controller => 'memberships', :action => 'remove_suggestion', :id => s.suggestion.identifier }, |
38 | :class => 'remove-suggestion', | 33 | :class => 'remove-suggestion', |
39 | :title => _('Remove suggestion'), | 34 | :title => _('Remove suggestion'), |
plugins/people_block/public/style.css
@@ -107,9 +107,6 @@ | @@ -107,9 +107,6 @@ | ||
107 | #content .friends-block .block-footer-content a.more-suggestions { | 107 | #content .friends-block .block-footer-content a.more-suggestions { |
108 | position: relative; | 108 | position: relative; |
109 | } | 109 | } |
110 | -#content .friends-block .block-footer-content .profiles-suggestions a.explain-suggestion { | ||
111 | - position: absolute; | ||
112 | -} | ||
113 | 110 | ||
114 | #content .common-profile-list-block .profiles-suggestions .profile-list .extra_info { | 111 | #content .common-profile-list-block .profiles-suggestions .profile-list .extra_info { |
115 | top: 20px; | 112 | top: 20px; |
@@ -123,8 +120,7 @@ | @@ -123,8 +120,7 @@ | ||
123 | top: 0px; | 120 | top: 0px; |
124 | right: 0px; | 121 | right: 0px; |
125 | } | 122 | } |
126 | -#content .common-profile-list-block .profiles-suggestions .controll a, | ||
127 | -#content .friends-block .block-footer-content .profiles-suggestions a.explain-suggestion { | 123 | +#content .common-profile-list-block .profiles-suggestions .controll a { |
128 | width: 16px; | 124 | width: 16px; |
129 | padding: 1px; | 125 | padding: 1px; |
130 | } | 126 | } |
public/designs/themes/base/style.css
@@ -405,8 +405,7 @@ div#notice { | @@ -405,8 +405,7 @@ div#notice { | ||
405 | } | 405 | } |
406 | 406 | ||
407 | 407 | ||
408 | -#content .block-title, | ||
409 | -#content .block-subtitle { | 408 | +#content .block-title { |
410 | font-variant: small-caps; | 409 | font-variant: small-caps; |
411 | color: #AAA; | 410 | color: #AAA; |
412 | font-size: 14px; | 411 | font-size: 14px; |
@@ -414,7 +413,12 @@ div#notice { | @@ -414,7 +413,12 @@ div#notice { | ||
414 | border-bottom: 2px solid #AAA; | 413 | border-bottom: 2px solid #AAA; |
415 | } | 414 | } |
416 | #content .block-subtitle { | 415 | #content .block-subtitle { |
417 | - font-size: 13px; | 416 | + font-variant: normal; |
417 | + color: #AAA; | ||
418 | + font-size: 11px; | ||
419 | + text-align: left; | ||
420 | + border-bottom: 1px solid #AAA; | ||
421 | + padding: 2px 0; | ||
418 | } | 422 | } |
419 | 423 | ||
420 | /*************************** Login block *****************************/ | 424 | /*************************** Login block *****************************/ |
public/stylesheets/application.css
@@ -1668,17 +1668,43 @@ a.button.disabled, input.disabled { | @@ -1668,17 +1668,43 @@ a.button.disabled, input.disabled { | ||
1668 | padding-bottom: 0px; | 1668 | padding-bottom: 0px; |
1669 | } | 1669 | } |
1670 | 1670 | ||
1671 | -#content .communities-block .block-footer-content .profiles-suggestions a.explain-suggestion { | ||
1672 | - padding: 1px; | ||
1673 | - width: 16px; | ||
1674 | -} | ||
1675 | - | ||
1676 | #content .communities-block .block-footer-content .profiles-suggestions a.accept-suggestion, | 1671 | #content .communities-block .block-footer-content .profiles-suggestions a.accept-suggestion, |
1677 | #content .communities-block .block-footer-content .profiles-suggestions a.remove-suggestion { | 1672 | #content .communities-block .block-footer-content .profiles-suggestions a.remove-suggestion { |
1678 | position: relative; | 1673 | position: relative; |
1679 | z-index: 5; | 1674 | z-index: 5; |
1680 | } | 1675 | } |
1681 | 1676 | ||
1677 | +#content .block-footer-content .profiles-suggestions a.accept-suggestion { | ||
1678 | + padding-bottom: 3px; | ||
1679 | + display: block; | ||
1680 | + color: #333; | ||
1681 | +} | ||
1682 | + | ||
1683 | +#content .profiles-suggestions .profile-list a.remove-suggestion { | ||
1684 | + display: block; | ||
1685 | + width: 15px !important; | ||
1686 | + height: 15px; | ||
1687 | + color: #888; | ||
1688 | + border-radius: 10px; | ||
1689 | + line-height: 14px; | ||
1690 | + font-size: 14px; | ||
1691 | + text-align: center; | ||
1692 | + font-weight: bold; | ||
1693 | +} | ||
1694 | + | ||
1695 | +#content .profiles-suggestions .profile-list a.remove-suggestion:hover { | ||
1696 | + display: block; | ||
1697 | + width: 15px; | ||
1698 | + height: 15px; | ||
1699 | + background: #888; | ||
1700 | + color: #fff; | ||
1701 | + border-radius: 10px; | ||
1702 | + line-height: 14px; | ||
1703 | + font-size: 14px; | ||
1704 | + text-align: center; | ||
1705 | + font-weight: bold; | ||
1706 | +} | ||
1707 | + | ||
1682 | #content .communities-block .profiles-suggestions .profile-list .extra_info { | 1708 | #content .communities-block .profiles-suggestions .profile-list .extra_info { |
1683 | z-index: 10; | 1709 | z-index: 10; |
1684 | } | 1710 | } |
@@ -4029,15 +4055,6 @@ h1#agenda-title { | @@ -4029,15 +4055,6 @@ h1#agenda-title { | ||
4029 | .profiles-suggestions .profile-list { | 4055 | .profiles-suggestions .profile-list { |
4030 | position: relative; | 4056 | position: relative; |
4031 | } | 4057 | } |
4032 | -.profiles-suggestions .profile-list .explain-suggestion { | ||
4033 | - position: absolute; | ||
4034 | - top: 7px; | ||
4035 | - left: -5px; | ||
4036 | - z-index: 10; | ||
4037 | -} | ||
4038 | -#content .profiles-suggestions .profile-list .explain-suggestion.active { | ||
4039 | - border-bottom-color: transparent; | ||
4040 | -} | ||
4041 | 4058 | ||
4042 | .controller-favorite_enterprises .profile-list .controll, | 4059 | .controller-favorite_enterprises .profile-list .controll, |
4043 | .controller-friends .profile-list .controll, | 4060 | .controller-friends .profile-list .controll, |
@@ -4064,18 +4081,6 @@ h1#agenda-title { | @@ -4064,18 +4081,6 @@ h1#agenda-title { | ||
4064 | padding-top: 20px; | 4081 | padding-top: 20px; |
4065 | } | 4082 | } |
4066 | 4083 | ||
4067 | -.profiles-suggestions .profile-list .extra_info { | ||
4068 | - background: url("/images/down-arrow.png") no-repeat scroll center top #eee; | ||
4069 | - border: 1px solid #ccc; | ||
4070 | - left: -66px; | ||
4071 | - min-width: 135px; | ||
4072 | - padding: 5px; | ||
4073 | - position: absolute; | ||
4074 | - top: 29px; | ||
4075 | - opacity: 0.9; | ||
4076 | - z-index: 5; | ||
4077 | -} | ||
4078 | - | ||
4079 | .profiles-suggestions .profile-list .extra_info p { | 4084 | .profiles-suggestions .profile-list .extra_info p { |
4080 | margin: 0px; | 4085 | margin: 0px; |
4081 | } | 4086 | } |
@@ -4100,6 +4105,20 @@ h1#agenda-title { | @@ -4100,6 +4105,20 @@ h1#agenda-title { | ||
4100 | border: 2px solid transparent; | 4105 | border: 2px solid transparent; |
4101 | } | 4106 | } |
4102 | 4107 | ||
4108 | +.common-profile-list-block .profiles-suggestions .profile-list li { | ||
4109 | + width: 100%; | ||
4110 | + max-width: 100%; | ||
4111 | +} | ||
4112 | + | ||
4113 | +.common-profile-list-block .profiles-suggestions .profile-list li img { | ||
4114 | + float: left; | ||
4115 | +} | ||
4116 | + | ||
4117 | +#content .common-profile-list-block .profiles-suggestions .profile-list a.profile-link { | ||
4118 | + text-align: left; | ||
4119 | + position: relative; | ||
4120 | +} | ||
4121 | + | ||
4103 | /* ==> public/stylesheets/controller_friends.css <== */ | 4122 | /* ==> public/stylesheets/controller_friends.css <== */ |
4104 | 4123 | ||
4105 | .controller-friends #remove_friend .friend_picture, | 4124 | .controller-friends #remove_friend .friend_picture, |