show pages now identify content with content creator. publisher now takes a local
This commit is contained in:
parent
637d35d673
commit
ed4c253ea8
10 changed files with 166 additions and 110 deletions
|
|
@ -2,14 +2,11 @@
|
|||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
.span-12.last
|
||||
.modal_title_bar
|
||||
%h4= t('.add_a_new_album')
|
||||
|
||||
= form_for Album.new do |f|
|
||||
= f.error_messages
|
||||
%p
|
||||
= f.label :name
|
||||
= f.text_field :name
|
||||
= f.hidden_field :to, :value => aspect
|
||||
= f.submit t('.create'), :class => 'button'
|
||||
= form_for Album.new do |album|
|
||||
= album.error_messages
|
||||
%p
|
||||
= album.label :name
|
||||
= album.hidden_field :to, :value => aspect
|
||||
= album.text_field :name
|
||||
= album.submit t('.create'), :class => 'button'
|
||||
|
|
|
|||
|
|
@ -8,22 +8,11 @@
|
|||
$("#add_album_button").fancybox();
|
||||
});
|
||||
|
||||
%h2
|
||||
= @aspect
|
||||
.friend_pictures.horizontal
|
||||
= owner_image_link
|
||||
- for friend in @friends
|
||||
= person_image_link(friend)
|
||||
.span-4.append-1.last
|
||||
= render "shared/aspect_friends"
|
||||
|
||||
.span-24.last
|
||||
%h3
|
||||
= @aspect
|
||||
Albums
|
||||
= link_to t('.new_album'), '#new_album_pane', {:class => "button", :id => "add_album_button"}
|
||||
|
||||
.fancybox_content
|
||||
#new_album_pane
|
||||
= render "albums/new_album", :aspect => params[:aspect]
|
||||
.span-15.last
|
||||
= render "shared/publisher", :type => :album, :aspect => @aspect.id
|
||||
|
||||
%div
|
||||
- for album in @albums
|
||||
|
|
|
|||
|
|
@ -9,15 +9,12 @@
|
|||
});
|
||||
});
|
||||
|
||||
%h2
|
||||
= @aspect
|
||||
.friend_pictures.horizontal
|
||||
= owner_image_link
|
||||
- for friend in @friends
|
||||
= person_image_link(friend)
|
||||
|
||||
%h3
|
||||
= link_to "#{@aspect} Albums", albums_path(:aspect => @aspect)
|
||||
= render 'shared/author_info', :post => @album
|
||||
|
||||
%ul#breadcrumb
|
||||
%li= link_to "Photos", '#'
|
||||
%li= @album.name
|
||||
|
||||
|
||||
.span-19.appends-1.last
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
.span-15.last
|
||||
= render 'aspects/no_friends_message'
|
||||
= render 'shared/publisher'
|
||||
= render 'shared/publisher', :type => :status_message, :aspect => @aspect
|
||||
= render 'aspects/no_posts_message'
|
||||
%ul#stream
|
||||
- for post in @posts
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
.span-15.last
|
||||
= render 'aspects/no_friends_message'
|
||||
= render 'shared/publisher'
|
||||
= render 'shared/publisher', :type => :status_message, :aspect => @aspect
|
||||
= render 'aspects/no_posts_message'
|
||||
%ul#stream
|
||||
- for post in @posts
|
||||
|
|
|
|||
|
|
@ -55,15 +55,12 @@
|
|||
|
||||
});//end document ready
|
||||
|
||||
%h2
|
||||
= @aspect
|
||||
.friend_pictures.horizontal
|
||||
= owner_image_link
|
||||
- for friend in @friends
|
||||
= person_image_link(friend)
|
||||
= render 'shared/author_info', :post => @photo
|
||||
|
||||
%h3
|
||||
= link_to @photo.album.name, @photo.album
|
||||
%ul#breadcrumb
|
||||
%li= link_to "Photos", '#'
|
||||
%li= link_to @album.name, album_path(@album)
|
||||
%li= @photo.caption
|
||||
|
||||
= link_to "<< #{t('.prev')}", url_to_prev(@photo, @album), :rel => 'prefetch'
|
||||
|
|
||||
|
|
|
|||
15
app/views/shared/_author_info.html.haml
Normal file
15
app/views/shared/_author_info.html.haml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#author_info
|
||||
= owner_image_link
|
||||
.from
|
||||
%h2
|
||||
= post.person.real_name
|
||||
.aspect
|
||||
➔
|
||||
%ul
|
||||
- if post.public?
|
||||
the world
|
||||
- else
|
||||
- for aspect in current_user.aspects_with_post( post.id )
|
||||
%li= link_to aspect.name, aspect
|
||||
|
||||
= link_to "view profile", person_path(post.person)
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
};
|
||||
});
|
||||
|
||||
$("#publisher textarea").live("focus", function(evt){
|
||||
$("#publisher textarea, #publisher input").live("focus", function(evt){
|
||||
$("#publisher .options_and_submit").fadeIn(50);
|
||||
});
|
||||
|
||||
|
|
@ -20,28 +20,41 @@
|
|||
#publisher
|
||||
= owner_image_tag
|
||||
|
||||
= form_for StatusMessage.new, :remote => true do |status|
|
||||
= status.error_messages
|
||||
%p
|
||||
= status.label :message, "Post a message to #{@aspect}"
|
||||
= status.text_area :message, :rows => 2, :value => params[:prefill]
|
||||
- if( !defined?(type) || type == :status_message )
|
||||
= form_for StatusMessage.new, :remote => true do |status|
|
||||
= status.error_messages
|
||||
%p
|
||||
= status.label :message, "Post a message to #{aspect}"
|
||||
= status.text_area :message, :rows => 2, :value => params[:prefill]
|
||||
|
||||
= status.hidden_field :to, :value => (@aspect == :all ? @aspect : @aspect.id)
|
||||
= status.hidden_field :to, :value => (aspect == :all ? aspect : aspect.id)
|
||||
|
||||
.options_and_submit
|
||||
.options_and_submit
|
||||
|
||||
- if @aspect == :all
|
||||
.public_toggle
|
||||
= status.check_box( :public, :value => false )
|
||||
make public
|
||||
= link_to '(?)', "#question_mark_pane", :class => 'question_mark'
|
||||
- if aspect == :all
|
||||
.public_toggle
|
||||
= status.check_box( :public, :value => false )
|
||||
make public
|
||||
= link_to '(?)', "#question_mark_pane", :class => 'question_mark'
|
||||
|
||||
.fancybox_content
|
||||
#question_mark_pane
|
||||
= render 'shared/public_explain'
|
||||
.fancybox_content
|
||||
#question_mark_pane
|
||||
= render 'shared/public_explain'
|
||||
|
||||
- if @aspect == :all
|
||||
= status.submit t('.share'), :title => "Share with all aspects"
|
||||
- else
|
||||
= status.submit t('.share'), :title => "Share with #{@aspect}"
|
||||
- if aspect == :all
|
||||
= status.submit t('.share'), :title => "Share with all aspects"
|
||||
- else
|
||||
= status.submit t('.share'), :title => "Share with #{aspect}"
|
||||
|
||||
- else
|
||||
= form_for Album.new do |album|
|
||||
= album.error_messages
|
||||
%p
|
||||
= album.label :name
|
||||
= album.text_field :name
|
||||
|
||||
= album.hidden_field :to, :value => aspect
|
||||
|
||||
.options_and_submit
|
||||
= album.submit "Create", :class => 'button'
|
||||
|
||||
|
|
|
|||
|
|
@ -3,17 +3,11 @@
|
|||
-# the COPYRIGHT file.
|
||||
|
||||
|
||||
%h2
|
||||
= @aspect
|
||||
.friend_pictures.horizontal
|
||||
- for friend in @friends
|
||||
= person_image_link(friend)
|
||||
= render 'shared/author_info', :post => @status_message
|
||||
|
||||
.span-14.append-1.last
|
||||
#stream
|
||||
%h1.show_text
|
||||
= person_image_link(@status_message.person)
|
||||
= link_to @status_message.person.real_name, @status_message.person
|
||||
= make_links(@status_message.message)
|
||||
|
||||
= "Posted #{how_long_ago(@status_message)} to"
|
||||
|
|
|
|||
|
|
@ -202,6 +202,71 @@ header
|
|||
.avatar
|
||||
:border-radius 5px
|
||||
|
||||
|
||||
.from
|
||||
:font
|
||||
:family 'Helvetica neue', Arial, Helvetica, sans-serif
|
||||
:text
|
||||
:shadow 0 1px #fff
|
||||
|
||||
.aspect
|
||||
:cursor default
|
||||
:display inline
|
||||
:color #bbb
|
||||
:font
|
||||
:size 85%
|
||||
a
|
||||
:font
|
||||
:weight normal
|
||||
:color #bbb
|
||||
|
||||
&:hover
|
||||
:text
|
||||
:decoration underline
|
||||
&:active
|
||||
:color #999
|
||||
ul
|
||||
:display inline
|
||||
:margin 0
|
||||
:padding 0
|
||||
:list
|
||||
:style none
|
||||
li
|
||||
:display inline
|
||||
&:after
|
||||
:content ","
|
||||
&:last-child:after
|
||||
:content ""
|
||||
|
||||
a
|
||||
:font
|
||||
:weight bold
|
||||
|
||||
#author_info
|
||||
:position relative
|
||||
:padding
|
||||
:left 65px
|
||||
:height 70px
|
||||
|
||||
img
|
||||
:position absolute
|
||||
:top 8px
|
||||
:left 0
|
||||
|
||||
h2
|
||||
:margin
|
||||
:bottom -2px
|
||||
a
|
||||
:font
|
||||
:weight normal
|
||||
|
||||
.from
|
||||
:font
|
||||
:size 14px
|
||||
|
||||
.avatar
|
||||
:border-radius 5px
|
||||
|
||||
li.message
|
||||
:position relative
|
||||
:line-height 19px
|
||||
|
|
@ -220,44 +285,6 @@ li.message
|
|||
:padding
|
||||
:left 65px
|
||||
|
||||
.from
|
||||
:font
|
||||
:family 'Helvetica neue', Arial, Helvetica, sans-serif
|
||||
:text
|
||||
:shadow 0 1px #fff
|
||||
|
||||
.aspect
|
||||
:cursor default
|
||||
:display inline
|
||||
:color #bbb
|
||||
:font
|
||||
:size 12px
|
||||
a
|
||||
:font
|
||||
:weight normal
|
||||
:color #bbb
|
||||
|
||||
&:hover
|
||||
:text
|
||||
:decoration underline
|
||||
&:active
|
||||
:color #999
|
||||
ul
|
||||
:display inline
|
||||
:margin 0
|
||||
:padding 0
|
||||
:list
|
||||
:style none
|
||||
li
|
||||
:display inline
|
||||
&:after
|
||||
:content ","
|
||||
&:last-child:after
|
||||
:content ""
|
||||
|
||||
a
|
||||
:font
|
||||
:weight bold
|
||||
|
||||
:color #444
|
||||
:font
|
||||
|
|
@ -639,8 +666,11 @@ label
|
|||
:position relative
|
||||
|
||||
textarea
|
||||
:width 515px
|
||||
:height 42px
|
||||
|
||||
input[type='text'],
|
||||
textarea
|
||||
:width 515px
|
||||
:margin 0
|
||||
|
||||
.options_and_submit
|
||||
|
|
@ -1136,3 +1166,27 @@ header
|
|||
.controls
|
||||
:display inline
|
||||
|
||||
ul#breadcrumb
|
||||
:list
|
||||
:style none
|
||||
:margin 0
|
||||
:padding 0
|
||||
:font
|
||||
:size 14px
|
||||
:weight bold
|
||||
:line
|
||||
:height 3em
|
||||
|
||||
a
|
||||
:font
|
||||
:weight bold
|
||||
|
||||
> li
|
||||
:display inline
|
||||
|
||||
&:after
|
||||
:content ' ››'
|
||||
|
||||
&:last-child
|
||||
&:after
|
||||
:content ''
|
||||
|
|
|
|||
Loading…
Reference in a new issue