Skip to content

Commit

Permalink
Change the participate button a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Byron committed Jan 18, 2012
1 parent e08ef3f commit d8ed300
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 13 deletions.
4 changes: 4 additions & 0 deletions app/assets/javascripts/application.js
Expand Up @@ -10,3 +10,7 @@
//= require jquery.elastic
//= require_tree '../../../vendor/assets/javascripts'
//= require_tree .

$(function(){
$('a[rel~="twipsy"]').twipsy();
})
19 changes: 11 additions & 8 deletions app/assets/stylesheets/partials/_activities.sass
Expand Up @@ -10,14 +10,17 @@ div.activity
float: right
color: #666
a
font-size: 0.75em
color: #333
&.participating:before
content: ""
float: left
width: 26px
height: 1em
background: asset-url("icons/check.png", image) no-repeat
font-size: 15px
color: #444
padding: 5px 13px
&.participating
color: #0D6B0B
//:before
// content: ""
// float: left
// width: 26px
// height: 1em
// background: asset-url("icons/check.png", image) no-repeat
&:hover
color: #333
a
Expand Down
6 changes: 5 additions & 1 deletion app/decorators/activity_decorator.rb
Expand Up @@ -5,16 +5,20 @@ def registration_button
h.content_tag(:span, :class => "registration") do
if activity.registration_open?
if activity.approved_participants.include?(h.current_user)
text = "Participating"
text = "You're Participating"
css_class = "participating"
title = "Drop out"
elsif activity.users.include?(h.current_user)
text = "Pending Approval"
title = "Drop out"
else
text = "Participate"
title = "Join in"
end

h.link_to(text, h.register_activity_path(activity),
:class => "clean-gray #{css_class if css_class}",
:rel => "twipsy", :title => title,
:method => :post, :remote => true)
else
"Registration Closed"
Expand Down
3 changes: 0 additions & 3 deletions app/views/activities/_activity.html.haml
Expand Up @@ -22,9 +22,6 @@
- @participants.each do |user|
= link_to person_path(user), :class => "participant", :rel => "twipsy", :title => user.name do
= user.icon(64)
:javascript
$('#participants a').twipsy();


= activity.bottom(@activities, activities_path)

2 changes: 1 addition & 1 deletion vendor/assets/stylesheets/bootstrap.css
Expand Up @@ -16,7 +16,7 @@
position: absolute;
visibility: visible;
padding: 5px;
font-size: 16px;
font-size: 14px;
z-index: 1000;
filter: alpha(opacity=80);
-khtml-opacity: 0.8;
Expand Down

0 comments on commit d8ed300

Please sign in to comment.