Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
220 additions
and
141 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,5 +4,5 @@ db/*.sqlite3 | |
log/*.log | ||
tmp/ | ||
public/system/ | ||
Gemfile.lock | ||
|
||
|
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
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
%span.photo_thumb | ||
= link_to image_tag( comment.attach.photo.url(:thumb), {:alt => comment.attach.photo.url, :id => comment.attach.id}), user_path(comment.attach.user) | ||
%b | ||
-if comment.user_id.nil? | ||
/=image_tag "/images/no_avatar.png" | ||
guest: | ||
-else | ||
/=image_tag User.find(comment.user_id).avatar.url(:thumb) | ||
=User.find(comment.user_id).email + ":" | ||
/=comment.created_at.strftime('%a, %d %B %Y') | ||
%br | ||
=comment.comment | ||
%hr |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/ Logo intro | ||
%section.logo_intro | ||
%br | ||
.photos_thumbs_container.clearfix#thumbnails | ||
= render :partial => "user", :object => @user |
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,16 +1,24 @@ | ||
#photos | ||
%a{:href => "", :id => "more_attaches", :class => "large medium_w awesome"} | ||
Add photo | ||
%br | ||
%br | ||
.photos_thumbs_container.clearfix | ||
.photos_thumbs_container.clearfix#thumbnails | ||
-f.fields_for :attaches do |attach| | ||
.thumb{:id => "thumb_#{attach.object.id}", :style => attach.object.new_record? ? 'display:none' : nil} | ||
- unless attach.object.new_record? | ||
%span.photo_thumb | ||
=link_to image_tag(attach.object.thumbnail_url, {:title => "Click to replace"}), "", {:class => 'edit_img', :id => attach.object.id} | ||
= link_to image_tag(attach.object.thumbnail_url, {:alt => attach.object.photo.url, :id => attach.object.id}), "", {:class => 'edit_img', :id => attach.object.id} | ||
%span.comment-count= attach.object.comments.count | ||
= form_for Like.new(:attach => attach.object), :html => {:id => "new_like_#{attach.object.id}"} do |f| | ||
= f.hidden_field :attach_id | ||
%span.like-count{:class => like_class(attach.object.id)}= attach.object.likes.count | ||
%span.photo-edit | ||
%a{:class => "small green awesome", :href => edit_attach_path(attach.object.id) } | ||
edit | ||
=attach.check_box "_destroy" | ||
=attach.label "Del" | ||
=attach.label "Delete" | ||
.attach{:id => "attach_#{attach.object.id}", :style => 'display:none' } | ||
=attach.label "Photo:" | ||
=attach.file_field :photo | ||
%br | ||
%a{:href => "", :id => "more_attaches", :class => "large medium_w red awesome"} | ||
Add photo | ||
%br | ||
%br |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
= form_for @user, :url => user_path, :html => { :class => :form, :multipart => true } do |f| | ||
.group | ||
= edit_user_photos f | ||
= f.label :name, 'Name', :class => :label | ||
= f.text_field :name | ||
%span.description | ||
add your name | ||
.avatar | ||
= image_tag current_user.avatar.url(:medium) | ||
= f.label :avatar, 'Avatar', :class => :label | ||
= f.file_field :avatar | ||
.hr | ||
%button.large.large_w.awesome.green{:type => "submit"} Save | ||
|
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
= form_for @user, :url => user_path, :html => { :class => :form, :multipart => true } do |f| | ||
#photos | ||
.photos_thumbs_container.clearfix | ||
-f.fields_for :attaches do |attach| | ||
.thumb{:id => "thumb_#{attach.object.id}", :style => attach.object.new_record? ? 'display:none' : nil} | ||
.attach{:id => "attach_#{attach.object.id}", :style => 'display:none' } | ||
=attach.label "Photo:" | ||
=attach.file_field :photo | ||
%br | ||
%a{:href => "", :id => "more_attaches", :class => "large medium_w red awesome"} | ||
Add photo | ||
%button.large.large_w.awesome.green{:type => "submit"} Save | ||
|
||
:javascript | ||
var name = $(".attach:last input").attr("name"); | ||
var num = name.match(/\[(\d+)\]\[.+\]$/)[1]; | ||
|
||
$(".attach:last").after($(".attach:last").clone()); | ||
$(".attach:last input").attr("name", name.replace(num, parseInt(num)+1)); | ||
$(".attach:last input").val(""); | ||
$(".attach:last").show(); | ||
|
||
|
||
|
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 +1,2 @@ | ||
= render :partial => "attaches/attach", :collection => user.attaches | ||
= render :partial => "attaches/attach", :collection => @user_photos | ||
= will_paginate @user_photos |
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,14 +1,14 @@ | ||
%section.content | ||
.flash | ||
- flash.each do |type, message| | ||
%div{:class => "message #{type}"} | ||
%p= message | ||
/ Article top photo | ||
%article | ||
%header.title | ||
%h2 | ||
= link_to "#{@user.name ? @user.name : @user.email}", user_path(@user) | ||
%br/ | ||
%br/ | ||
.article_content | ||
= render :partial => "form" | ||
#regFormMainBlock.modalBlock | ||
.modalOverlay | ||
.modalWindow.ui-draggable | ||
.modalMessage | ||
.modalMessageHead | ||
Upload Photo | ||
%a{:href => root_path} | ||
#modalCloseCross.modalClose | ||
.flash | ||
- flash.each do |type, message| | ||
%div{:class => "message #{type}"} | ||
%p= message | ||
#uploadForm | ||
= render :partial => "form_upload_photo" |
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.