diff --git a/app/views/shared/_reshare.haml b/app/views/shared/_reshare.haml index a7a85249a0a0d3d21ce2cee5ecc02937ae174bbb..2ac09a78f0f8274b207b0a4bb027e1f995f52c14 100644 --- a/app/views/shared/_reshare.haml +++ b/app/views/shared/_reshare.haml @@ -11,11 +11,17 @@ $(this).parent(".reshare_pane").children(".reshare_box").fadeOut(200); }); -.reshare_pane - %span.reshare_button - = link_to "Reshare", "#" - %ul.reshare_box - - for aspect in current_user.aspects - - unless aspect.posts.include? post - %li.aspect_to_share= link_to aspect, :controller => "aspects", :action => "show", :id => aspect.id, :prefill => post.message +- unless current_user.aspects.size == current_user.aspects_with_post(post.id).size + .reshare_pane + %span.reshare_button + = link_to "Reshare", "#" + + %ul.reshare_box + - for aspect in current_user.aspects + - unless aspect.posts.include? post + %li.aspect_to_share= link_to aspect, :controller => "aspects", :action => "show", :id => aspect.id, :prefill => post.message +- else + .reshare_pane + %span.reshare_button + = link_to "Reshare", "#", :class => "inactive" diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 92596fbfca3eb648f847af4da40b7f08e9fcde48..7bcb6a258903dce4615df74a27a59b7c717c22d6 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -208,6 +208,12 @@ li.message { li.message:hover div.info a:active, li.message:hover .time a:active { color: #005d9c; } +.destroy_link .reshare_pane .reshare_button a.inactive { + color: #cccccc; + cursor: default; } + .destroy_link .reshare_pane .reshare_button a.inactive:hover { + text-decoration: none; } + .destroy_link .reshare_pane { margin-left: 5px; margin-right: 5px; diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 24403261935819a8195c196788f5b2feb5c0115a..a19c24a09f42e97eaa583d7266c40ae9da5df13e 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -274,6 +274,14 @@ li.message &:active :color #005D9C + +.destroy_link .reshare_pane .reshare_button a.inactive + :color #ccc + &:hover + :text + :decoration none + :cursor default + .destroy_link .reshare_pane :margin :left 5px