diff --git a/plugins/community_hub/controllers/public/community_hub_plugin_public_controller.rb b/plugins/community_hub/controllers/public/community_hub_plugin_public_controller.rb index dee3047..3dbcf04 100644 --- a/plugins/community_hub/controllers/public/community_hub_plugin_public_controller.rb +++ b/plugins/community_hub/controllers/public/community_hub_plugin_public_controller.rb @@ -165,9 +165,8 @@ class CommunityHubPluginPublicController < PublicController def pin_message message = Comment.find(params[:message]) hub = Article.find(params[:hub]) - community = Profile.find(params[:community]) - mediation = make_mediation_from_message(community, hub, message) + mediation = make_mediation_from_message(hub, message) mediation.save if mediation && mediation.save @@ -195,11 +194,11 @@ class CommunityHubPluginPublicController < PublicController end - def make_mediation_from_message(community, hub, message) + def make_mediation_from_message(hub, message) begin mediation = Article.new - mediation.profile = community + mediation.profile = hub.profile mediation.parent = hub mediation.name = mediation_timestamp mediation.body = message.body @@ -217,7 +216,6 @@ class CommunityHubPluginPublicController < PublicController mediation.published = true mediation.license_id = "" mediation.category_ids = [] - #mediation.save rescue mediation = nil end diff --git a/plugins/community_hub/public/javascripts/community_hub.js b/plugins/community_hub/public/javascripts/community_hub.js index bf1d94e..be4c696 100644 --- a/plugins/community_hub/public/javascripts/community_hub.js +++ b/plugins/community_hub/public/javascripts/community_hub.js @@ -87,7 +87,7 @@ function pin_message(post_id) { url: '/plugin/community_hub/public/pin_message', type: 'get', dataType: 'json', - data: { id: post_id, hub: hub_id }, + data: { message: post_id, hub: hub_id }, success: function(data) { }, error: function(ajax, stat, errorThrown) { diff --git a/plugins/community_hub/public/style.css b/plugins/community_hub/public/style.css index 949a870..2adbd78 100644 --- a/plugins/community_hub/public/style.css +++ b/plugins/community_hub/public/style.css @@ -108,18 +108,22 @@ text-indent: -10000px; } -.hub .promote { +/* +.hub .promoted { background: url("images/hub-promote-icon.png") no-repeat center center #fff; -} +}*/ -.hub .promote .not-promoted { +.hub .not-promoted { + /*background: url("images/hub-not-promote-icon.png") no-repeat center center #fff;*/ opacity: 0.5; filter: alpha(opacity=50); } +/* .hub .pin { background: url("images/hub-pin-icon.png") no-repeat center center #fff; } +*/ .hub .pin .not-pinned { opacity: 0.5; @@ -138,8 +142,8 @@ margin-bottom: 10px; } -.hub ul.mediation-comment-list li{ - padding-left: 10px; +.hub ul.mediation-comment-list li { + margin-bottom: 2px; } /**/ @@ -335,4 +339,5 @@ textarea#message_body { border-radius: 5px; font-weight: bold; margin-bottom: -5px; -} \ No newline at end of file +} + diff --git a/plugins/community_hub/views/community_hub_plugin_public/_mediation.rhtml b/plugins/community_hub/views/community_hub_plugin_public/_mediation.rhtml index 6de71f3..d60fa6e 100644 --- a/plugins/community_hub/views/community_hub_plugin_public/_mediation.rhtml +++ b/plugins/community_hub/views/community_hub_plugin_public/_mediation.rhtml @@ -15,16 +15,16 @@
  • <% if !promoted?(hub, mediation.author.id) %> - + <% else %> - + <% end %>
  • <% if pinned_mediation?(hub, mediation.id) %>
  • - +
  • <% end %> diff --git a/plugins/community_hub/views/community_hub_plugin_public/_post.rhtml b/plugins/community_hub/views/community_hub_plugin_public/_post.rhtml index 7cc4187..0a5071f 100644 --- a/plugins/community_hub/views/community_hub_plugin_public/_post.rhtml +++ b/plugins/community_hub/views/community_hub_plugin_public/_post.rhtml @@ -5,9 +5,9 @@
  • <%= post_time(post.created_at) %>
  • <% if post.title == 'hub-message-twitter' %> - <%= image_tag('/designs/themes/default/images/logo_twitter_bird_blue_50x50.png', :alt => "Twitter") %> + <%= image_tag('/designs/themes/default/images/logo_twitter_bird_white_50x50.png', :alt => "Twitter") %> <% elsif post.title == 'hub-message-facebook' %> - <%= image_tag('/designs/themes/default/images/logo-facebook-50x50.png', :alt => "Facebook") %> + <%= image_tag('/designs/themes/default/images/logo_facebook_50x50.png', :alt => "Facebook") %> <% else %> <%= image_tag(profile_icon(post.author, :minor)) %> <% end %> @@ -19,15 +19,22 @@ -- libgit2 0.21.2