forked from jpruetting/refinerycms-image-slideshows
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Feature/mobility #6
Open
gloubier
wants to merge
24
commits into
refinerycms-contrib:master
Choose a base branch
from
gloubier:feature/mobility
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
ded7082
Change Gemfile and gemspec to use Mobility instead of Globalize
gloubier d2b8b0d
Fix migrations
gloubier 8fcf4e5
Fix routes
gloubier 3636a47
Change before_filter => before_action
gloubier 4e6e0a2
Update models to use mobility + modern syntax
gloubier 97dd843
Use Mobility.locale instead of Globalize.locale
gloubier e7c8a40
Fix action icons
gloubier 05f7475
Fix Hound syntax comments
gloubier 01bd144
Clean up Gemfile
bricesanchez 2f819f8
Update refinerycms-testing dependency version to 4.0.0
bricesanchez bae7bce
Update bin/rails to fix rails console start
bricesanchez 8dd9b65
Merge pull request #1 from refinerycms-contrib/feature/mobility
gloubier 4caf0e9
Add active state to slideshows and slides
gloubier b1b4599
Change active state to draft to follow conventions
gloubier c48e2b1
Add live? method to easily check if is published
gloubier 107cddf
Remove finder methods
gloubier 42edd2c
Delete script/rails
bricesanchez 4eb2a83
Now require refinerycms-images
bricesanchez 7feb3fa
Remove height, width and js_config fields
bricesanchez 1829e4d
QA
bricesanchez 9e7879a
Update README
bricesanchez 9d188d3
Merge pull request #2 from refinerycms-contrib/feature/mobility
gloubier 20bc9a0
Remove unecessary stuff
gloubier 242ec70
Add order field to slides relation
gloubier File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
35 changes: 24 additions & 11 deletions
35
app/views/refinery/image_slideshows/admin/image_slides/_image_slide.html.erb
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,22 +1,35 @@ | ||
<% | ||
# setup params for various action links | ||
edit_url = refinery.edit_image_slideshows_admin_image_slideshow_image_slide_path(@image_slideshow, image_slide) | ||
delete_url = refinery.image_slideshows_admin_image_slideshow_image_slide_path(@image_slideshow, image_slide) | ||
delete_options = { | ||
class: "cancel confirm-delete", | ||
data: {confirm: t('message', scope: 'refinery.admin.delete', title: image_slide.title)} | ||
} | ||
%> | ||
<li class='clearfix record <%= cycle("on", "on-hover") %>' id="<%= dom_id(image_slide) -%>" style="background-color: #EAEAEA; margin-bottom: 10px;"> | ||
<%= image_fu image_slide.image, '128x128', :style => 'padding: 1em 1em 0 1em;' %> | ||
|
||
<span class="preview"> | ||
<% image_slide.translations.each do |translation| %> | ||
<% if translation.title.present? %> | ||
<%= link_to refinery_icon_tag("flags/#{translation.locale}.png", :size => '16x11'), | ||
refinery.edit_image_slideshows_admin_image_slideshow_image_slide_path(@image_slideshow, image_slide, :switch_locale => translation.locale), | ||
:class => 'locale' %> | ||
<%= link_to refinery.edit_image_slideshows_admin_image_slideshow_image_slide_path(@image_slideshow, image_slide, :switch_locale => translation.locale), | ||
class: 'locale', title: translation.locale.upcase do %> | ||
|
||
<div class="<%=translation.locale %> locale_marker"> | ||
<%= locale_text_icon(translation.locale.upcase) %> | ||
</div> | ||
<% end %> | ||
<% end %> | ||
<% end %> | ||
</span> | ||
|
||
<%= content_tag :span, class: 'label notice' do | ||
::I18n.t('draft', :scope => 'refinery.image_slideshows.admin.image_slides.records') | ||
end if image_slide.draft? %> | ||
|
||
<span class='actions'> | ||
<%= link_to refinery_icon_tag("application_edit.png"), refinery.edit_image_slideshows_admin_image_slideshow_image_slide_path(@image_slideshow, image_slide), | ||
:title => t('.edit') %> | ||
<%= link_to refinery_icon_tag("delete.png"), refinery.image_slideshows_admin_image_slideshow_image_slide_path(@image_slideshow, image_slide), | ||
:class => "cancel confirm-delete", | ||
:title => t('.delete'), | ||
:confirm => t('message', :scope => 'refinery.admin.delete', :title => image_slide.title), | ||
:method => :delete %> | ||
<%= action_icon(:edit, edit_url , t('edit', scope: 'refinery.image_slideshows.admin.image_slides.image_slide' ) ) %> | ||
<%= action_icon(:delete, delete_url, t('delete', scope: 'refinery.image_slideshows.admin.image_slides.image_slide' ), delete_options ) %> | ||
</span> | ||
</li> | ||
</li> |
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
29 changes: 19 additions & 10 deletions
29
app/views/refinery/image_slideshows/admin/image_slideshows/_image_slideshow.html.erb
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,18 +1,27 @@ | ||
<% | ||
# setup params for various action links | ||
manage_url = refinery.image_slideshows_admin_image_slideshow_image_slides_path(image_slideshow) | ||
edit_url = refinery.edit_image_slideshows_admin_image_slideshow_path(image_slideshow) | ||
delete_url = refinery.image_slideshows_admin_image_slideshow_path(image_slideshow) | ||
delete_options = { | ||
class: "cancel confirm-delete", | ||
data: {confirm: t('message', scope: 'refinery.admin.delete', title: image_slideshow.title)} | ||
} | ||
%> | ||
<li class='clearfix record <%= cycle("on", "on-hover") %>' id="<%= dom_id(image_slideshow) -%>"> | ||
<span class='title'> | ||
<%= link_to refinery.image_slideshows_admin_image_slideshow_image_slides_path(image_slideshow) do %> | ||
<%= image_slideshow.title %> | ||
<% end %> | ||
</span> | ||
|
||
<%= content_tag :span, class: 'label notice' do | ||
::I18n.t('draft', :scope => 'refinery.image_slideshows.admin.image_slideshows.records') | ||
end if image_slideshow.draft? %> | ||
|
||
<span class='actions'> | ||
<%= link_to refinery_icon_tag("img.png"), refinery.image_slideshows_admin_image_slideshow_image_slides_path(image_slideshow), | ||
:title => t('.manage_image_slides') %> | ||
<%= link_to refinery_icon_tag("application_edit.png"), refinery.edit_image_slideshows_admin_image_slideshow_path(image_slideshow), | ||
:title => t('.edit') %> | ||
<%= link_to refinery_icon_tag("delete.png"), refinery.image_slideshows_admin_image_slideshow_path(image_slideshow), | ||
:class => "cancel confirm-delete", | ||
:title => t('.delete'), | ||
:confirm => t('message', :scope => 'refinery.admin.delete', :title => image_slideshow.title), | ||
:method => :delete %> | ||
<%= action_icon(:switch_view_list, manage_url, t('.manage_image_slides') ) %> | ||
<%= action_icon(:edit, edit_url , t('.edit') ) %> | ||
<%= action_icon(:delete, delete_url, t('.delete'), delete_options ) %> | ||
</span> | ||
</li> | ||
</li> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body beginning.