From c05906914457e43703b160f3042d0334131b30fc Mon Sep 17 00:00:00 2001 From: Daniel Vincent Grippi <Dan@SPEEDRACER.local> Date: Mon, 13 Sep 2010 17:57:30 -0700 Subject: [PATCH] albums don't show publisher, refactored css --- app/controllers/albums_controller.rb | 2 +- app/views/albums/index.html.haml | 6 ++---- app/views/albums/show.html.haml | 13 ++++--------- app/views/aspects/index.html.haml | 3 +++ app/views/aspects/show.html.haml | 3 +++ app/views/layouts/application.html.haml | 2 +- public/stylesheets/application.css | 14 +++++++------- public/stylesheets/sass/application.sass | 12 ++++++------ 8 files changed, 27 insertions(+), 28 deletions(-) diff --git a/app/controllers/albums_controller.rb b/app/controllers/albums_controller.rb index 5ae782d95e..6656a7cef4 100644 --- a/app/controllers/albums_controller.rb +++ b/app/controllers/albums_controller.rb @@ -24,7 +24,7 @@ class AlbumsController < ApplicationController respond_to :json, :only => [:index, :show] def index - @albums = current_user.albums_by_aspect(@aspect) + @albums = current_user.albums_by_aspect(@aspect).paginate respond_with @albums end diff --git a/app/views/albums/index.html.haml b/app/views/albums/index.html.haml index a6d1fcd59d..1cd9b8a894 100644 --- a/app/views/albums/index.html.haml +++ b/app/views/albums/index.html.haml @@ -29,10 +29,8 @@ - content_for :left_pane do = render "shared/aspect_friends" -%h1.big_text - Albums - .right - = link_to 'New Album', '#new_album_pane', {:class => "button", :id => "add_album_button"} +- content_for :publish do + = link_to 'New Album', '#new_album_pane', {:class => "button", :id => "add_album_button"} .yo{:style => "display:none;" } #new_album_pane diff --git a/app/views/albums/show.html.haml b/app/views/albums/show.html.haml index c7bc1c2f55..bf74d1ef38 100644 --- a/app/views/albums/show.html.haml +++ b/app/views/albums/show.html.haml @@ -30,17 +30,12 @@ - content_for :left_pane do = render "shared/aspect_friends" +- content_for :publish do + -if current_user.owns? @album + =render 'photos/new_photo' -.album_id{:id => @album.id, :style => "display:hidden;"} - -%h1.big_text - = @album.name - --if current_user.owns? @album - =render 'photos/new_photo' - .yo{:style => "display:none;"} - #new_photo_pane +.album_id{:id => @album.id, :style => "display:hidden;"} .sub_header ="updated #{how_long_ago(@album)}" diff --git a/app/views/aspects/index.html.haml b/app/views/aspects/index.html.haml index c1f1b461f4..31da626792 100644 --- a/app/views/aspects/index.html.haml +++ b/app/views/aspects/index.html.haml @@ -24,6 +24,9 @@ - content_for :left_pane do = render "shared/aspect_friends" +- content_for :publish do + = render "shared/publisher", :aspect_ids => :all + %ul#stream - for post in @posts = render type_partial(post), :post => post unless post.class == Album diff --git a/app/views/aspects/show.html.haml b/app/views/aspects/show.html.haml index 1ec0b64eea..ed65d936ee 100644 --- a/app/views/aspects/show.html.haml +++ b/app/views/aspects/show.html.haml @@ -23,6 +23,9 @@ - content_for :left_pane do = render "shared/aspect_friends" +- content_for :publish do + = render "shared/publisher", :aspect_ids => :all + %ul#stream - for post in @posts = render type_partial(post), :post => post unless post.class == Album diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 7b9282081b..3108a00972 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -91,7 +91,7 @@ = yield :page_title .span-19.last - = render "shared/publisher", :aspect_ids => :all + = yield :publish .container .span-5.last diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 99f07051b3..cb12a343f0 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -119,20 +119,21 @@ header { margin-right: 0; } header #aspect_header { z-index: 5; - text-shadow: 0 2px 0 white; background-color: #eeeeee; border-top: 1px solid #555555; - height: 85px; } + padding: 20px 0; } header #aspect_header h1 { margin-bottom: 0; - margin-top: 15px; } + text-shadow: 0 2px 0 white; } header #aspect_header a { color: #111111; } header #aspect_header a:hover { background: none; color: #333333; } header #aspect_header .page_title { - text-transform: uppercase; } + text-transform: uppercase; + text-shadow: 0 2px 0 white; + margin-top: -5px; } ul#stream { margin: 0; @@ -327,9 +328,7 @@ label { #publisher { color: #999999; - position: relative; - height: 63px; - margin-top: 20px; } + position: relative; } #publisher .avatar { float: left; margin-right: 15px; } @@ -347,6 +346,7 @@ label { width: 600px; height: 40px; margin-top: 0; + margin-bottom: 0; -webkit-box-shadow: 0 1px 0 white; } #publisher .button { margin-left: 100px; } diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 786d9faa69..89dfc2cdaf 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -161,17 +161,16 @@ header #aspect_header :z-index 5 - :text-shadow 0 2px 0 #fff :background :color #eee :border :top 1px solid #555 - :height 85px + :padding 20px 0 h1 :margin :bottom 0 - :top 15px + :text-shadow 0 2px 0 #fff a :color #111 @@ -182,6 +181,9 @@ header .page_title :text :transform uppercase + :shadow 0 2px 0 #fff + :margin + :top -5px ul#stream @@ -437,9 +439,6 @@ label #publisher :color #999 :position relative - :height 63px - :margin - :top 20px .avatar :float left @@ -465,6 +464,7 @@ label :height 40px :margin :top 0 + :bottom 0 :-webkit-box-shadow 0 1px 0 #fff -- GitLab