small view cleanups
This commit is contained in:
parent
2f5547626e
commit
eca37e1a28
16 changed files with 59 additions and 120 deletions
|
|
@ -2,19 +2,15 @@
|
||||||
-# licensed under the Affero General Public License version 3 or later. See
|
-# licensed under the Affero General Public License version 3 or later. See
|
||||||
-# the COPYRIGHT file.
|
-# the COPYRIGHT file.
|
||||||
|
|
||||||
.back= link_to "⇧ #{@album.name}", @album
|
|
||||||
%h1.big_text
|
|
||||||
|
|
||||||
= "#{t('.editing')} #{@album.name}"
|
%h2= "#{t('.editing')} #{@album.name}"
|
||||||
|
|
||||||
.sub_header
|
- form_for @album do |album|
|
||||||
="#{t('.updated')} #{how_long_ago(@album)}"
|
= album.error_messages
|
||||||
|
|
||||||
- form_for @album do |a|
|
%h4
|
||||||
= a.error_messages
|
Album name
|
||||||
%p
|
= album.text_field :name
|
||||||
%b album name:
|
|
||||||
= a.text_field :name
|
|
||||||
|
|
||||||
- for photo in @album.photos
|
- for photo in @album.photos
|
||||||
.photo_edit_block= image_tag photo.url(:thumb_medium)
|
.photo_edit_block= image_tag photo.url(:thumb_medium)
|
||||||
|
|
@ -22,11 +18,8 @@
|
||||||
.submit_block
|
.submit_block
|
||||||
= link_to t('.cancel'), root_path
|
= link_to t('.cancel'), root_path
|
||||||
or
|
or
|
||||||
= a.submit
|
= album.submit
|
||||||
|
|
||||||
.button.delete
|
.button.delete
|
||||||
= link_to t('.delete_album'), @album, :confirm => t('.are_you_sure'), :method => :delete
|
= link_to t('.delete_album'), @album, :confirm => t('.are_you_sure'), :method => :delete
|
||||||
|
|
||||||
#content_bottom
|
|
||||||
.back
|
|
||||||
= link_to "⇧ #{@album.name}", @album
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
.right
|
.right
|
||||||
= link_to t('.new_album'), '#new_album_pane', {:class => "button", :id => "add_album_button"}
|
= link_to t('.new_album'), '#new_album_pane', {:class => "button", :id => "add_album_button"}
|
||||||
|
|
||||||
.yo{:style => "display:none;" }
|
.fancybox_content
|
||||||
#new_album_pane
|
#new_album_pane
|
||||||
= render "albums/new_album", :aspect => params[:aspect]
|
= render "albums/new_album", :aspect => params[:aspect]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@
|
||||||
-# the COPYRIGHT file.
|
-# the COPYRIGHT file.
|
||||||
|
|
||||||
%h1=t('.add_a_new_aspect')
|
%h1=t('.add_a_new_aspect')
|
||||||
= form_for Aspect.new do |f|
|
= form_for Aspect.new do |aspect|
|
||||||
= f.error_messages
|
= aspect.error_messages
|
||||||
%p
|
%p
|
||||||
= f.label :name
|
= aspect.label :name
|
||||||
= f.text_field :name
|
= aspect.text_field :name
|
||||||
= f.submit t('.create'), :class => 'button'
|
= aspect.submit t('.create'), :class => 'button'
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,6 @@
|
||||||
|
|
||||||
%ul.tools
|
%ul.tools
|
||||||
%li= link_to t('.add_a_new_friend'), "#add_request_pane_#{aspect.id}", :class => 'add_request_button'
|
%li= link_to t('.add_a_new_friend'), "#add_request_pane_#{aspect.id}", :class => 'add_request_button'
|
||||||
/%li= link_to t('.show'), aspect_path(aspect)
|
|
||||||
%li!= remove_link(aspect)
|
%li!= remove_link(aspect)
|
||||||
|
|
||||||
%ul.dropzone{:id => aspect.id}
|
%ul.dropzone{:id => aspect.id}
|
||||||
|
|
@ -57,7 +56,8 @@
|
||||||
= person_image_tag(person)
|
= person_image_tag(person)
|
||||||
.name
|
.name
|
||||||
= link_to person.real_name, person
|
= link_to person.real_name, person
|
||||||
.yo{:style => 'display:none'}
|
|
||||||
|
.fancybox_content
|
||||||
%div{:id => "add_request_pane_#{aspect.id}"}
|
%div{:id => "add_request_pane_#{aspect.id}"}
|
||||||
= render "requests/new_request", :aspect => aspect
|
= render "requests/new_request", :aspect => aspect
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
-# Copyright (c) 2010, Diaspora Inc. This file is
|
|
||||||
-# licensed under the Affero General Public License version 3 or later. See
|
|
||||||
-# the COPYRIGHT file.
|
|
||||||
|
|
||||||
|
|
||||||
- content_for :page_title do
|
|
||||||
= link_to "photos", albums_path(:aspect => @aspect)
|
|
||||||
|
|
||||||
- content_for :left_pane do
|
|
||||||
= render "shared/aspect_friends"
|
|
||||||
|
|
||||||
- content_for :publish do
|
|
||||||
- if
|
|
||||||
= render "shared/publisher", :aspect_ids => :all
|
|
||||||
|
|
||||||
%ul#stream
|
|
||||||
- for post in @posts
|
|
||||||
= render type_partial(post), :post => post unless post.class == Album
|
|
||||||
|
|
||||||
#pagination
|
|
||||||
= will_paginate @posts
|
|
||||||
|
|
||||||
|
|
@ -2,10 +2,12 @@
|
||||||
-# licensed under the Affero General Public License version 3 or later. See
|
-# licensed under the Affero General Public License version 3 or later. See
|
||||||
-# the COPYRIGHT file.
|
-# the COPYRIGHT file.
|
||||||
|
|
||||||
= form_for Comment.new, :remote => true do |f|
|
= form_for Comment.new, :remote => true do |comment|
|
||||||
%p
|
%p
|
||||||
%label{:for => "comment_text_on_#{post.id}"} Comment
|
= label_tag "comment_text_on_#{post.id}", "Comment"
|
||||||
= f.text_area :text, :rows => 1, :id => "comment_text_on_#{post.id}", :class => "comment_box"
|
= comment.text_area :text, :rows => 1, :id => "comment_text_on_#{post.id}", :class => "comment_box"
|
||||||
= f.hidden_field :post_id, :value => post.id
|
|
||||||
|
= comment.hidden_field :post_id, :value => post.id
|
||||||
|
|
||||||
%p{:style => "text-align:right;"}
|
%p{:style => "text-align:right;"}
|
||||||
= f.submit t('.comment'), :class => "comment_submit button"
|
= comment.submit t('.comment'), :class => "comment_submit button"
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
%h2 Send invitation
|
%h2 Send invitation
|
||||||
= form_for User.new, :url => invitation_path(User) do |f|
|
= form_for User.new, :url => invitation_path(User) do |invite|
|
||||||
%p
|
%p
|
||||||
= f.label :email
|
= invite.label :email
|
||||||
= f.text_field :email
|
= invite.text_field :email
|
||||||
To
|
To
|
||||||
- if @aspect == :all
|
- if @aspect == :all
|
||||||
= f.select(:aspects, @aspects_dropdown_array)
|
= invite.select(:aspects, @aspects_dropdown_array)
|
||||||
- else
|
- else
|
||||||
= f.select(:aspects, @aspects_dropdown_array, :selected => [@aspect.to_s, @aspect_id])
|
= invite.select(:aspects, @aspects_dropdown_array, :selected => @aspect.id)
|
||||||
%p= f.submit "Send an invitation"
|
|
||||||
|
%p= invite.submit "Send an invitation"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
-# Copyright (c) 2010, Diaspora Inc. This file is
|
|
||||||
-# licensed under the Affero General Public License version 3 or later. See
|
|
||||||
-# the COPYRIGHT file.
|
|
||||||
|
|
||||||
- title=t('.new_person')
|
|
||||||
|
|
||||||
= form_for @person do |f|
|
|
||||||
= f.error_messages
|
|
||||||
%p
|
|
||||||
= f.label :diaspora_handle
|
|
||||||
%br
|
|
||||||
= f.text_field :diaspora_handle
|
|
||||||
%p
|
|
||||||
= f.label :url
|
|
||||||
%br
|
|
||||||
= f.text_field :url
|
|
||||||
|
|
||||||
=f.fields_for :profile do |p|
|
|
||||||
%p
|
|
||||||
= p.label :first_name
|
|
||||||
%br
|
|
||||||
= p.text_field :first_name
|
|
||||||
|
|
||||||
%p
|
|
||||||
= p.label :last_name
|
|
||||||
%br
|
|
||||||
= p.text_field :last_name
|
|
||||||
= f.submit
|
|
||||||
|
|
||||||
%p= link_to t('.back_to_list'), people_path
|
|
||||||
|
|
@ -27,7 +27,6 @@
|
||||||
= link_to t('.remove_friend'), @person, :confirm => t('.are_you_sure'), :method => :delete, :class => "button"
|
= link_to t('.remove_friend'), @person, :confirm => t('.are_you_sure'), :method => :delete, :class => "button"
|
||||||
|
|
||||||
.span-20.last
|
.span-20.last
|
||||||
|
|
||||||
.span-19.last
|
.span-19.last
|
||||||
- if @posts
|
- if @posts
|
||||||
%ul#stream
|
%ul#stream
|
||||||
|
|
|
||||||
|
|
@ -2,20 +2,16 @@
|
||||||
-# licensed under the Affero General Public License version 3 or later. See
|
-# licensed under the Affero General Public License version 3 or later. See
|
||||||
-# the COPYRIGHT file.
|
-# the COPYRIGHT file.
|
||||||
|
|
||||||
%h1.big_text
|
%h2= "#{t('.editing')} #{@photo.image}"
|
||||||
.back
|
|
||||||
= link_to "⇧ #{@album.name}", album_path(@album)
|
|
||||||
= "#{t('.editing')} #{@photo.image}"
|
|
||||||
|
|
||||||
%div{:id => @photo.id}
|
%div{:id => @photo.id}
|
||||||
|
|
||||||
#show_photo
|
#show_photo
|
||||||
= linked_scaled_photo @photo, @album
|
= linked_scaled_photo @photo, @album
|
||||||
|
|
||||||
= form_for @photo do |p|
|
= form_for @photo do |photo|
|
||||||
= p.label :caption
|
= photo.label :caption
|
||||||
= p.text_field :caption, :value => @photo.caption
|
= photo.text_field :caption, :value => @photo.caption
|
||||||
= p.submit
|
= photo.submit
|
||||||
%div{:class => 'clear'}
|
%div{:class => 'clear'}
|
||||||
|
|
||||||
#content_bottom
|
#content_bottom
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@
|
||||||
//show form to add description
|
//show form to add description
|
||||||
$(".edit-desc").click(function(){
|
$(".edit-desc").click(function(){
|
||||||
$(".edit_photo").toggle();
|
$(".edit_photo").toggle();
|
||||||
//$(".caption").toggle();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
//Add a description with ajax request
|
//Add a description with ajax request
|
||||||
|
|
@ -40,7 +39,6 @@
|
||||||
var url = $(".edit_photo").attr("action");
|
var url = $(".edit_photo").attr("action");
|
||||||
var data = $(".edit_photo").serialize();
|
var data = $(".edit_photo").serialize();
|
||||||
$(".description").text($("#photo_caption").val());
|
$(".description").text($("#photo_caption").val());
|
||||||
//$(".caption").toggle();
|
|
||||||
$(".edit_photo").toggle();
|
$(".edit_photo").toggle();
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
|
@ -80,13 +78,13 @@
|
||||||
#show_photo
|
#show_photo
|
||||||
= linked_scaled_photo @photo, @album
|
= linked_scaled_photo @photo, @album
|
||||||
.caption
|
.caption
|
||||||
-if current_user.owns? @album
|
-if current_user.owns? @photo
|
||||||
-if @photo.caption and @photo.caption != ""
|
-if @photo.caption and @photo.caption != ""
|
||||||
= link_to 'Edit','javascript:void(0)', :id => "edit-desc", :class => "edit-desc"
|
= link_to 'Edit','javascript:void(0)', :id => "edit-desc", :class => "edit-desc"
|
||||||
.description
|
.description
|
||||||
= @photo.caption
|
= @photo.caption
|
||||||
|
|
||||||
-if current_user.owns? @album
|
-if current_user.owns? @photo
|
||||||
%div{:class => 'clear'}
|
%div{:class => 'clear'}
|
||||||
-if !@photo.caption or @photo.caption == ""
|
-if !@photo.caption or @photo.caption == ""
|
||||||
= link_to 'Add a description','javascript:void(0)', :id => "add-description", :class => "edit-desc"
|
= link_to 'Add a description','javascript:void(0)', :id => "add-description", :class => "edit-desc"
|
||||||
|
|
|
||||||
|
|
@ -6,16 +6,16 @@
|
||||||
=t('.add_a_new_friend_to')
|
=t('.add_a_new_friend_to')
|
||||||
%i= aspect.name
|
%i= aspect.name
|
||||||
|
|
||||||
= form_for Request.new do |f|
|
= form_for Request.new do |fr_request|
|
||||||
= f.error_messages
|
= fr_request.error_messages
|
||||||
|
|
||||||
=t('.enter_a_diaspora_username')
|
=t('.enter_a_diaspora_username')
|
||||||
%br
|
%br
|
||||||
%i= t '.your_diaspora_username_is', :diaspora_handle => current_user.diaspora_handle
|
%i= t '.your_diaspora_username_is', :diaspora_handle => current_user.diaspora_handle
|
||||||
|
|
||||||
%p
|
%p
|
||||||
= f.label :destination_url, t(".friends_username")
|
= fr_request.label :destination_url, t(".friends_username")
|
||||||
= f.text_field :destination_url
|
= fr_request.text_field :destination_url
|
||||||
= f.hidden_field :aspect_id, :value => aspect.id
|
= fr_request.hidden_field :aspect_id, :value => aspect.id
|
||||||
= f.submit
|
= fr_request.submit
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,10 +13,10 @@
|
||||||
- @fb_friends = MiniFB.get(@access_token, 'me', :type => "friends")
|
- @fb_friends = MiniFB.get(@access_token, 'me', :type => "friends")
|
||||||
- @fb_friends[:data].each do |friend|
|
- @fb_friends[:data].each do |friend|
|
||||||
= image_tag( "http://graph.facebook.com/#{friend[:id]}/picture" )
|
= image_tag( "http://graph.facebook.com/#{friend[:id]}/picture" )
|
||||||
-unless (@aspect == :all) || (@aspect == :public)
|
-unless (@aspect == :all)
|
||||||
= link_to (image_tag('add_friend_button.png', :height => "50px", :width => "50px")), "#add_request_pane", :id => 'add_request_button'
|
= link_to (image_tag('add_friend_button.png', :height => "50px", :width => "50px")), "#add_request_pane", :id => 'add_request_button'
|
||||||
|
|
||||||
.yo{:style => 'display:none'}
|
.fancybox_content
|
||||||
#add_request_pane
|
#add_request_pane
|
||||||
= render "requests/new_request", :aspect => @aspect
|
= render "requests/new_request", :aspect => @aspect
|
||||||
-else
|
-else
|
||||||
|
|
|
||||||
|
|
@ -12,17 +12,17 @@
|
||||||
#publisher
|
#publisher
|
||||||
= owner_image_tag
|
= owner_image_tag
|
||||||
|
|
||||||
= form_for StatusMessage.new, :remote => true do |f|
|
= form_for StatusMessage.new, :remote => true do |status|
|
||||||
= f.error_messages
|
= status.error_messages
|
||||||
%p
|
%p
|
||||||
= f.label :message, "Post a message to #{@aspect}"
|
= status.label :message, "Post a message to #{@aspect}"
|
||||||
= f.text_area :message, :rows => 2, :value => params[:prefill]
|
= status.text_area :message, :rows => 2, :value => params[:prefill]
|
||||||
|
|
||||||
= f.hidden_field :to, :value => (@aspect == :all ? @aspect : @aspect.id)
|
= status.hidden_field :to, :value => (@aspect == :all ? @aspect : @aspect.id)
|
||||||
|
|
||||||
- if @aspect == :all
|
- if @aspect == :all
|
||||||
.public_toggle
|
.public_toggle
|
||||||
= f.check_box( :public, :value => false )
|
= status.check_box( :public, :value => false )
|
||||||
make public
|
make public
|
||||||
= link_to '(?)', "#question_mark_pane", :class => 'question_mark'
|
= link_to '(?)', "#question_mark_pane", :class => 'question_mark'
|
||||||
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
= render 'shared/public_explain'
|
= render 'shared/public_explain'
|
||||||
|
|
||||||
- if @aspect == :all
|
- if @aspect == :all
|
||||||
= f.submit t('.share'), :title => "Share with all aspects"
|
= status.submit t('.share'), :title => "Share with all aspects"
|
||||||
- else
|
- else
|
||||||
= f.submit t('.share'), :title => "Share with #{@aspect.name}"
|
= status.submit t('.share'), :title => "Share with #{@aspect}"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,6 @@
|
||||||
%h2
|
%h2
|
||||||
- if @aspect == :all
|
- if @aspect == :all
|
||||||
= link_to "Everyone", root_path
|
= link_to "Everyone", root_path
|
||||||
- elsif @aspect == :public
|
|
||||||
= "Public"
|
|
||||||
- elsif @aspect == :manage
|
- elsif @aspect == :manage
|
||||||
= link_to t('.manage_aspects'), root_path
|
= link_to t('.manage_aspects'), root_path
|
||||||
- else
|
- else
|
||||||
|
|
|
||||||
|
|
@ -1054,3 +1054,6 @@ header
|
||||||
|
|
||||||
.fancybox_content
|
.fancybox_content
|
||||||
:display none
|
:display none
|
||||||
|
|
||||||
|
.edit_photo
|
||||||
|
:display none
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue