Commit ed4b9124 authored by Ilya Zhitomirskiy's avatar Ilya Zhitomirskiy

added a publisher to the tag page

parent 47364223
......@@ -60,6 +60,7 @@ class TagsController < ApplicationController
@posts = StatusMessage.all_public
end
params[:prefill] = "##{params[:name]} "
@posts = @posts.tagged_with(params[:name])
max_time = params[:max_time] ? Time.at(params[:max_time].to_i) : Time.now
......
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
module PublisherHelper
def public_value
params[:controller] == "tags"
end
def remote?
params[:controller] != "tags"
end
def public_helper_text
(public_value)? t('javascripts.publisher.public'): t('javascripts.publisher.limited')
end
end
......@@ -11,7 +11,7 @@
#publisher.closed{:class => ((aspect == :profile)? 'mention_popup' : nil )}
.content_creation
= form_for(StatusMessage.new, :remote => true, :html => {"data-type" => "json"}) do |status|
= form_for(StatusMessage.new, :remote => remote?, :html => {"data-type" => "json"}) do |status|
= status.error_messages
%p
%params
......@@ -33,8 +33,8 @@
%span#publisher_service_icons
= t("shared.publisher.click_to_share_with")
- if((defined?(for_all_aspects) && for_all_aspects) || aspect == :profile)
= status.hidden_field(:public)
= image_tag "icons/globe.png", :title => t('javascripts.publisher.limited'), :class => 'public_icon dim', :width => 16, :height => 16
= status.hidden_field(:public, :value => public_value )
= image_tag "icons/globe.png", :title => public_helper_text, :class => "public_icon #{'dim' if !public_value}", :width => 16, :height => 16
- if current_user.services
- for service in current_user.services
= image_tag "social_media_logos/#{service.provider}-16x16.png", :title => service.provider.titleize, :class => "service_icon dim", :id =>"#{service.provider}", :maxchar => "#{service.class::MAX_CHARACTERS}"
......
......@@ -58,6 +58,8 @@
%h2
= "##{params[:name]}"
= render 'shared/publisher', :selected_aspects => all_aspects.map(&:id), :aspect_ids => all_aspects.map(&:id), :for_all_aspects => true, :aspect => all_aspects.first
%hr
#main_stream.stream
......
......@@ -19,6 +19,12 @@ Feature: posting
And I press "Follow #boss"
And I wait for the ajax to finish
Scenario: can post a message from the tag page
Then I should see "#boss" within "#publisher"
And I post a status with the text "#boss from the tag page"
And I search for "#boss"
Then I should see "#boss from the tag page"
Scenario: see a tag that I am following
When I go to the home page
And I follow "#boss"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment