Commit 0a577775184738b0294c81763b79810eb43f043e
1 parent
496d5a24
Exists in
master
and in
28 other branches
join_button: added class to style join button
(ActionItem2844)
Showing
2 changed files
with
34 additions
and
35 deletions
Show diff stats
app/views/blocks/profile_info_actions/_join_leave_community.rhtml
1 | -<% if logged_in? %> | ||
2 | - <% if profile.members.include?(user) %> | ||
3 | - <%= button(:delete, content_tag('span', __('Leave community')), profile.leave_url, | ||
4 | - :class => 'leave-community', | ||
5 | - :title => _("Leave community"), | ||
6 | - :style => 'position: relative;') %> | ||
7 | - <%= button(:add, content_tag('span', __('Join')), profile.join_url, | ||
8 | - :class => 'join-community', | ||
9 | - :title => _("Join community"), | ||
10 | - :style => 'position: relative; display: none;') %> | ||
11 | - <% else %> | ||
12 | - <% unless profile.already_request_membership?(user) %> | 1 | +<div class='join-leave-button'> |
2 | + <% if logged_in? %> | ||
3 | + <% if profile.members.include?(user) %> | ||
13 | <%= button(:delete, content_tag('span', __('Leave community')), profile.leave_url, | 4 | <%= button(:delete, content_tag('span', __('Leave community')), profile.leave_url, |
14 | :class => 'leave-community', | 5 | :class => 'leave-community', |
15 | :title => _("Leave community"), | 6 | :title => _("Leave community"), |
16 | - :style => 'position: relative; display: none;') %> | 7 | + :style => 'position: relative;') %> |
17 | <%= button(:add, content_tag('span', __('Join')), profile.join_url, | 8 | <%= button(:add, content_tag('span', __('Join')), profile.join_url, |
18 | :class => 'join-community', | 9 | :class => 'join-community', |
19 | :title => _("Join community"), | 10 | :title => _("Join community"), |
20 | - :style => 'position: relative;') %> | 11 | + :style => 'position: relative; display: none;') %> |
12 | + <% else %> | ||
13 | + <% unless profile.already_request_membership?(user) %> | ||
14 | + <%= button(:delete, content_tag('span', __('Leave community')), profile.leave_url, | ||
15 | + :class => 'leave-community', | ||
16 | + :title => _("Leave community"), | ||
17 | + :style => 'position: relative; display: none;') %> | ||
18 | + <%= button(:add, content_tag('span', __('Join')), profile.join_url, | ||
19 | + :class => 'join-community', | ||
20 | + :title => _("Join community"), | ||
21 | + :style => 'position: relative;') %> | ||
22 | + <% end %> | ||
21 | <% end %> | 23 | <% end %> |
24 | + <% else %> | ||
25 | + <%= link_to content_tag('span', _('Join')), profile.join_not_logged_url, | ||
26 | + :class => 'button with-text icon-add', | ||
27 | + :title => _('Join this community') %> | ||
22 | <% end %> | 28 | <% end %> |
23 | -<% else %> | ||
24 | - <%= link_to content_tag('span', _('Join')), profile.join_not_logged_url, | ||
25 | - :class => 'button with-text icon-add', | ||
26 | - :title => _('Join this community') %> | ||
27 | -<% end %> | 29 | +</div> |
public/designs/themes/base/style.css
@@ -506,6 +506,7 @@ div#notice { | @@ -506,6 +506,7 @@ div#notice { | ||
506 | #content .people-block .block-footer-content a, | 506 | #content .people-block .block-footer-content a, |
507 | #content .profile-list-block .block-footer-content a, | 507 | #content .profile-list-block .block-footer-content a, |
508 | #content .enterprises-block .block-footer-content a, | 508 | #content .enterprises-block .block-footer-content a, |
509 | +#content .members-block .block-footer-content a, | ||
509 | #content .communities-block .block-footer-content a, | 510 | #content .communities-block .block-footer-content a, |
510 | #content .friends-block .block-footer-content a { | 511 | #content .friends-block .block-footer-content a { |
511 | position: absolute; | 512 | position: absolute; |
@@ -515,34 +516,30 @@ div#notice { | @@ -515,34 +516,30 @@ div#notice { | ||
515 | color: #000; | 516 | color: #000; |
516 | text-decoration: none; | 517 | text-decoration: none; |
517 | padding-right: 15px; | 518 | padding-right: 15px; |
518 | - background: url(imgs/arrow-right-p.png) 100% 50% no-repeat; | ||
519 | } | 519 | } |
520 | -#content .members-block .block-footer-content a { | ||
521 | - position: absolute; | ||
522 | - top: 2px; | ||
523 | - right: 0px; | ||
524 | - font-size: 11px; | ||
525 | - color: #000; | ||
526 | - text-decoration: none; | ||
527 | - padding-right: 15px; | 520 | +#content .tags-block .block-footer-content a, |
521 | +#content .people-block .block-footer-content a, | ||
522 | +#content .profile-list-block .block-footer-content a, | ||
523 | +#content .enterprises-block .block-footer-content a, | ||
524 | +#content .communities-block .block-footer-content a, | ||
525 | +#content .friends-block .block-footer-content a { | ||
526 | + background: url(imgs/arrow-right-p.png) 100% 50% no-repeat; | ||
528 | } | 527 | } |
529 | -#content .members-block .block-footer-content a.button { | 528 | + |
529 | +#content .members-block .block-footer-content .join-leave-button a { | ||
530 | position: relative; | 530 | position: relative; |
531 | - padding-left: 10px; | ||
532 | background-color: #EEE; | 531 | background-color: #EEE; |
533 | border: 1px solid #CCC; | 532 | border: 1px solid #CCC; |
534 | color: #555; | 533 | color: #555; |
534 | + padding-right: inherit; | ||
535 | } | 535 | } |
536 | -#content .members-block .block-footer-content a.button:hover { | 536 | + |
537 | +#content .members-block .block-footer-content .join-leave-button a:hover { | ||
537 | color: #FFF; | 538 | color: #FFF; |
538 | background-color: #555; | 539 | background-color: #555; |
539 | border: 1px solid #2e3436; | 540 | border: 1px solid #2e3436; |
540 | text-decoration: none; | 541 | text-decoration: none; |
541 | } | 542 | } |
542 | -#content .members-block .block-footer-content a.button span { | ||
543 | - margin: 0px; | ||
544 | - padding: 0px 0px 0px 7px; | ||
545 | -} | ||
546 | 543 | ||
547 | #content .profile-list-block .block-title { | 544 | #content .profile-list-block .block-title { |
548 | text-align: left; | 545 | text-align: left; |