Diff
Modified: trunk/app/controllers/pictures_controller.rb (2723 => 2724)
--- trunk/app/controllers/pictures_controller.rb 2011-10-20 14:59:40 UTC (rev 2723)
+++ trunk/app/controllers/pictures_controller.rb 2011-10-20 16:17:45 UTC (rev 2724)
@@ -19,7 +19,7 @@
respond_to do |format|
flash[:notice] = 'Picture was successfully selected as profile picture.'
- format.html { redirect_to pictures_url(@picture.owner) }
+ format.html { redirect_to user_pictures_url(@picture.owner) }
end
else
error("Picture already selected", "already selected")
@@ -92,7 +92,7 @@
if @picture.save
flash[:notice] = 'Picture was successfully uploaded.'
- #format.html { redirect_to pictures_url(@picture.user_id) }
+ #format.html { redirect_to user_pictures_url(@picture.user_id) }
# updated to take account of possibly various locations from where this method can be called,
# so multiple redirect options are possible -> now return link is passed as a parameter
format.html { redirect_to params[:redirect_to] }
@@ -108,7 +108,7 @@
respond_to do |format|
if @picture.update_attributes(params[:picture])
flash[:notice] = 'Picture was successfully updated.'
- format.html { redirect_to pictures_url(@picture.user_id) }
+ format.html { redirect_to user_pictures_url(@picture.user_id) }
else
format.html { render :action ="" "edit" }
end
@@ -133,7 +133,7 @@
if params[:user_id]
@pictures = Picture.find(:all, :conditions => ["user_id = ?", params[:user_id]])
elsif logged_in?
- redirect_to pictures_url(current_user)
+ redirect_to user_pictures_url(current_user)
else
error("Please supply a User ID", "not supplied", :user_id)
end
@@ -170,7 +170,7 @@
(err = Picture.new.errors).add(attr, message)
respond_to do |format|
- format.html { redirect_to logged_in? ? pictures_url(current_user) : '' }
+ format.html { redirect_to logged_in? ? user_pictures_url(current_user) : '' }
end
end
end
Modified: trunk/app/views/pictures/_breadcrumbs.rhtml (2723 => 2724)
--- trunk/app/views/pictures/_breadcrumbs.rhtml 2011-10-20 14:59:40 UTC (rev 2723)
+++ trunk/app/views/pictures/_breadcrumbs.rhtml 2011-10-20 16:17:45 UTC (rev 2724)
@@ -14,11 +14,11 @@
<li><b>»</b></li>
<% case controller.action_name.to_s; when "show" %>
- <li><%= link_to "address@hidden", picture_path(@picture.owner, @picture) %></li>
+ <li><%= link_to "address@hidden", user_picture_path(@picture.owner, @picture) %></li>
<% when "new" %>
<li>Upload New Picture</li>
<% when "edit" %>
- <li><%= link_to "address@hidden", picture_path(@picture.owner, @picture) %></li>
+ <li><%= link_to "address@hidden", user_picture_path(@picture.owner, @picture) %></li>
<li><b>»</b></li>
<li>Edit</li>
<% else %>
Modified: trunk/app/views/pictures/_subnav.rhtml (2723 => 2724)
--- trunk/app/views/pictures/_subnav.rhtml 2011-10-20 14:59:40 UTC (rev 2723)
+++ trunk/app/views/pictures/_subnav.rhtml 2011-10-20 16:17:45 UTC (rev 2724)
@@ -5,8 +5,8 @@
<% when "show" %>
<ul class="sectionIcons">
-o <li><%= link_to 'Edit Picture', edit_picture_path(@picture.user_id, @picture) %></li>
- <li><%= link_to 'Remove Picture', picture_path(@picture.user_id, @picture), :confirm => 'Are you sure?', :method => :delete %></li>
+o <li><%= link_to 'Edit Picture', edit_user_picture_path(@picture.user_id, @picture) %></li>
+ <li><%= link_to 'Remove Picture', user_picture_path(@picture.user_id, @picture), :confirm => 'Are you sure?', :method => :delete %></li>
</ul>
<% else %>
Modified: trunk/app/views/pictures/edit.rhtml (2723 => 2724)
--- trunk/app/views/pictures/edit.rhtml 2011-10-20 14:59:40 UTC (rev 2723)
+++ trunk/app/views/pictures/edit.rhtml 2011-10-20 16:17:45 UTC (rev 2724)
@@ -2,8 +2,8 @@
<%= error_messages_for :picture %>
-<% form_for(:picture, :url ="" picture_path(@picture.user_id, @picture), :html => { :method => :put }) do |f| %>
+<% form_for(:picture, :url ="" user_picture_path(@picture.user_id, @picture), :html => { :method => :put }) do |f| %>
<p>
<%= submit_tag "Update", :disable_with => "Updating..." %>
</p>
-<% end %>
\ No newline at end of file
+<% end %>
Modified: trunk/app/views/pictures/index.rhtml (2723 => 2724)
--- trunk/app/views/pictures/index.rhtml 2011-10-20 14:59:40 UTC (rev 2723)
+++ trunk/app/views/pictures/index.rhtml 2011-10-20 16:17:45 UTC (rev 2724)
@@ -5,7 +5,7 @@
<% if my_page? params[:user_id] %>
<ul class="sectionIcons">
<li><%= icon('profile', user_path(current_user), nil, nil, 'Return to Profile')%></li>
- <li><%= icon('avatar', new_picture_path(current_user), nil, nil, 'Upload New Picture')%></li>
+ <li><%= icon('avatar', new_user_picture_path(current_user), nil, nil, 'Upload New Picture')%></li>
</ul>
<% end %>
@@ -39,9 +39,9 @@
<td class="actions">
<% if my_page? picture.user_id %>
<% unless picture.selected? %>
- <%= icon "picture", select_picture_path(picture.user_id, picture), nil, nil, "Make Profile Pic" %>
+ <%= icon "picture", select_user_picture_path(picture.user_id, picture), nil, nil, "Make Profile Pic" %>
<% end %>
- <%= icon "destroy", picture_path(picture.user_id, picture), nil, { :confirm => 'Are you sure?', :method => :delete }, "Delete" %>
+ <%= icon "destroy", user_picture_path(picture.user_id, picture), nil, { :confirm => 'Are you sure?', :method => :delete }, "Delete" %>
<% end %>
</td>
</tr>
Modified: trunk/app/views/users/show.rhtml (2723 => 2724)
--- trunk/app/views/users/show.rhtml 2011-10-20 14:59:40 UTC (rev 2723)
+++ trunk/app/views/users/show.rhtml 2011-10-20 16:17:45 UTC (rev 2724)
@@ -98,7 +98,7 @@
<% if @user.profile -%>
<td style="vertical-align: top;">
<% if mine? @user -%>
- <%= avatar @user, 160, pictures_path(@user) -%>
+ <%= avatar @user, 160, user_pictures_path(@user) -%>
<br/>
<span style="text-align: center; margin-top: 0.5em; font-size: 85%; color: #666666;">
[ <%= link_to "Edit Profile Picture", edit_user_profile_path(@user) %> ]