Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UI improved, add guide page, editor redesign, admin page added, new f…
…eatures
- Loading branch information
Showing
60 changed files
with
650 additions
and
276 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
h1. YaHoPicaso: Yet Another Pictures Hosting | ||
h1. ImHo: Images Hosting | ||
|
||
comming soon.. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,35 @@ | ||
class AttachesController < ApplicationController | ||
|
||
|
||
def edit | ||
# render :partial => 'edit' | ||
@edit_photo = Attach.find_by_id(params[:id]) | ||
end | ||
|
||
def show | ||
redirect_to :controller => :users, :action => :show, :id => Attach.find_by_id(params[:id]).user.id, :photo => params[:id] | ||
end | ||
|
||
def raw | ||
|
||
edit_photo = Attach.find_by_id(params[:edited_photo][:photo_id]) | ||
name = edit_photo.photo_file_name | ||
data = params[:edited_photo][:photo] | ||
|
||
@file_content = File.open("#{Rails.root.to_s}/tmp/#{name}", "wb") do |f| | ||
f.write(Base64.decode64(data)) | ||
end | ||
|
||
if params[:edited_photo][:new_img] == "true" | ||
@image = Attach.new(:photo => File.new("#{Rails.root.to_s}/tmp/#{name}")) | ||
@image.user_id = params[:edited_photo][:user_id] | ||
@image.save | ||
else | ||
edit_photo.update_attributes(:photo => File.new("#{Rails.root.to_s}/tmp/#{name}")) | ||
edit_photo.save | ||
end | ||
|
||
|
||
File.unlink("#{Rails.root.to_s}/tmp/#{name}") | ||
|
||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.