This repository has been archived by the owner on Jun 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 317
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated clippings and favorites to use jquery and bootstrap modals.
- Loading branch information
Showing
11 changed files
with
50 additions
and
78 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
- if favorite = clipping.has_been_favorited_by(current_user, request.remote_ip) | ||
.favorite | ||
= link_to '<span class="badge badge-info"><i class="icon-heart"></i>'.html_safe+clipping.favorited_count.to_s+'</span>'.html_safe + ' <span class="label label-info">'.html_safe + :in_your_favorites.l + '</span>'.html_safe, favorite_path('clipping', clipping.id, favorite.id), :method => :delete, :class => 'act-via-ajax', :id => 'favorite-clipping-'+clipping.id.to_s if logged_in? | ||
- else | ||
.favorite | ||
= link_to '<span class="badge"><i class="icon-heart"></i>'.html_safe+clipping.favorited_count.to_s+'</span>'.html_safe, favorites_path('clipping', clipping.id), :method => :post, :class => 'act-via-ajax', :id => 'favorite-clipping-'+clipping.id.to_s | ||
|
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 @@ | ||
$('#clipping_image_list').html("<%= @images ? render(:partial => 'clippings/images', :formats => [:html], :locals => {:images => @images}).gsub('"', '\\"').gsub("\n", "").html_safe : "<h1>Sorry, there was an error fetching the images from the page you requested</h1><a href='#{params[:uri]}'>Go back...</a>" %>") |
This file was deleted.
Oops, something went wrong.
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,10 @@ | ||
<% if @favorite.new_record? %> | ||
<%= @favorite.errors.full_messages.join(', ').html_safe %> | ||
<% else %> | ||
<% case @favorite.favoritable.class.to_s.tableize %> | ||
<% when 'clippings' %> | ||
<%= render :partial => 'clippings/favorite', :locals => {:clipping => @favorite.favoritable} %> | ||
<% when 'posts' %> | ||
<%= render :partial => 'posts/meta', :locals => {:post => @favorite.favoritable} %> | ||
<% end %> | ||
<% end %> |
This file was deleted.
Oops, something went wrong.
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,6 @@ | ||
<% case @favorite.favoritable.class.to_s.tableize %> | ||
<% when 'clippings' %> | ||
<%= render :partial => 'clippings/favorite', :locals => {:clipping => @favorite.favoritable} %> | ||
<% when 'posts' %> | ||
<%= render :partial => 'posts/meta', :locals => {:post => @favorite.favoritable} %> | ||
<% end %> |
This file was deleted.
Oops, something went wrong.