diff --git a/app/controllers/albums_controller.rb b/app/controllers/albums_controller.rb index 7b4ed0a6d..5ce599035 100644 --- a/app/controllers/albums_controller.rb +++ b/app/controllers/albums_controller.rb @@ -33,4 +33,18 @@ class AlbumsController < ApplicationController @album = Album.first(:id => params[:id]) @album_photos = @album.photos end + + def edit + @album = Album.first(:id => params[:id]) + end + + def update + @album = Album.first(:id => params[:id]) + if @album.update_attributes(params[:album]) + flash[:notice] = "Successfully updated album." + redirect_to @album + else + render :action => 'edit' + end + end end diff --git a/app/controllers/photos_controller.rb b/app/controllers/photos_controller.rb index 9e59ab741..4e6f50c36 100644 --- a/app/controllers/photos_controller.rb +++ b/app/controllers/photos_controller.rb @@ -29,7 +29,7 @@ class PhotosController < ApplicationController @photo = Photo.where(:id => params[:id]).first @photo.destroy flash[:notice] = "Successfully deleted photo." - redirect_to root_url + redirect_to @photo.album end def show diff --git a/app/views/albums/show.html.haml b/app/views/albums/show.html.haml index d03622679..d22f8ff56 100644 --- a/app/views/albums/show.html.haml +++ b/app/views/albums/show.html.haml @@ -17,7 +17,6 @@ -unless mine? @album %h4= "by #{@album.person.real_name}" - - for photo in @album_photos = link_to (image_tag photo.image.url(:thumb_medium)), object_path(photo) @@ -26,4 +25,4 @@ = link_to "⇧ albums", albums_path -if mine? @album .button.right - = link_to 'Delete Album', @album, :confirm => 'Are you sure?', :method => :delete + = link_to 'Edit Album', edit_album_path(@album) diff --git a/app/views/authors/show.html.haml b/app/views/authors/show.html.haml index fd92e97c9..4ee71a7c8 100644 --- a/app/views/authors/show.html.haml +++ b/app/views/authors/show.html.haml @@ -2,8 +2,6 @@ .back = link_to '⇧ ostatus', ostatus_path = "#{@author.username}'s stream" - .button.right - = link_to 'Unsubscribe', @author, :confirm => 'Are you sure?', :method => :delete - if @author_ostatus_posts %ul#stream @@ -16,3 +14,5 @@ #content_bottom .back = link_to "⇧ ostatus", ostatus_path + .button.right + = link_to 'Unsubscribe', @author, :confirm => 'Are you sure?', :method => :delete diff --git a/app/views/photos/show.html.haml b/app/views/photos/show.html.haml index 534ed7c58..0714ec692 100644 --- a/app/views/photos/show.html.haml +++ b/app/views/photos/show.html.haml @@ -4,7 +4,7 @@ = @photo.image .button.right - = link_to 'Edit', '#' + = link_to 'Edit Photo', edit_photo_path(@photo) .sub_header = link_to "full size", @photo.image.url @@ -12,8 +12,11 @@ %div{:id => @photo.id} #show_photo - = link_to_prev @photo, @album = linked_scaled_photo @photo, @album + + #next_prev_links + = link_to_prev @photo, @album + | = link_to_next @photo, @album #content_bottom diff --git a/app/views/users/edit.html.haml b/app/views/users/edit.html.haml index 565772fd6..fa1136fec 100644 --- a/app/views/users/edit.html.haml +++ b/app/views/users/edit.html.haml @@ -1,6 +1,12 @@ -%h1 Editing Profile - = form_for @user do |f| + + %h1.big_text + .back + = link_to "⇧ home", root_path + + Editing your profile + + = f.error_messages = f.fields_for :profile do |p| @@ -35,8 +41,12 @@ %p = f.label :url = f.text_field :url - %p - = f.submit -%p - = link_to "Show", user_path(@user) + #submit_block + = link_to "Cancel", root_path + or + = f.submit "Update Profile" + +#content_bottom + .back + = link_to "⇧ home", root_path diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index fb873738a..1fc09cf76 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -272,9 +272,9 @@ input[type='text'], textarea { border-radius: 3px; -moz-border-radius: 3px; } -input[type='submit'] { - display: block; - float: right; } +#submit_block { + text-align: right; + font-size: 12px; } form p { position: relative; @@ -390,3 +390,6 @@ h1.big_text { margin-top: -5px; margin-bottom: 20px; color: #999999; } + +#next_prev_links { + text-align: center; } diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 00ccb3729..0053bad62 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -327,10 +327,11 @@ input[type='text'], textarea :border-radius 3px :-moz-border-radius 3px - -input[type='submit'] - :display block - :float right +#submit_block + :text + :align right + :font + :size 12px form p :position relative @@ -483,4 +484,5 @@ h1.big_text :bottom 20px :color #999 - +#next_prev_links + :text-align center