4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'app/helpers/c80_swiper/app_helper.rb', line 4
def swipe(swslider_id=nil, effect='slide')
swslider = swslider_id.nil? ?
C80Swiper::Swslider.first :
C80Swiper::Swslider.find(swslider_id)
render :partial => 'c80_swiper/swipe',
:locals => {
frames: swslider.sframes,
options: {
mark_pagination: true,
mark_buttons: true,
mark_scrollbar: false,
mark_lazy: false,
params: {
effect: effect,
autoplay: swslider.autoplay * 1000
}
}
}
rescue => e
Rails.logger.debug "[TRACE] <app_helper.swipe> #{e}"
render :partial => 'c80_swiper/shared/swipe_error_message',
:locals => {
error_message: "#{e}"
}
end
|