ish_manager 0.1.8.50 → 0.1.8.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8a1f42a1466bab0848934b4b987ae88f69f11e66
4
- data.tar.gz: c6ba50c3f59da1c1bb0075492d9630b9835c6d09
3
+ metadata.gz: 618fe86245ca25daaaa69aa91094bdd95aae23ef
4
+ data.tar.gz: 04a017790df0e7f90172eb1fb5c4de2a82a5abb1
5
5
  SHA512:
6
- metadata.gz: 584fbba4f53c6e91a20b0aec9d41b934ce9f1bf7ed99dcc1885431cdb866588e53d6fa7104b58f5feba30c373e4367d30c785c4b1cf99c9c6be9ae078db54e0f
7
- data.tar.gz: fd2d566adbf9cecc79c235566b4e0e8f99ae6aab41eb5ff24d8a37fc98b9aa97f1925168308d99d01487dbc937e287e5d5cfde50002ec02620aa8b086a7ed565
6
+ metadata.gz: 2a98823084c92a427f57b180527270fe089a9f29ace65ced4a93e62c4a9e2e72baac380da8a7018ebe4d847f20ef837d7937b70ec1fd020a4b8087d38430f0a2
7
+ data.tar.gz: 7387f0160e625e4a0fc2e18338adbc66c21a1803d7909294e7d63a751a08368ee54ad3a99f57605be737ca7ebd50c86d959af0726b6c77393b18e763d0d480a0
@@ -97,8 +97,9 @@ nav.pagination
97
97
  /**
98
98
  * reports
99
99
  */
100
- .descr {
101
- border: 1px solid yellow;
100
+ .descr,
101
+ .description {
102
+ border: 1px solid red;
102
103
  padding: 1em;
103
104
  }
104
105
  .descr .float-left {
@@ -32,5 +32,10 @@ module IshManager
32
32
  err
33
33
  end
34
34
 
35
+ def puts! a, b=''
36
+ puts "+++ +++ #{b}"
37
+ puts a.inspect
38
+ end
39
+
35
40
  end
36
41
  end
@@ -25,7 +25,11 @@ class IshManager::UserProfilesController < IshManager::ApplicationController
25
25
  else
26
26
  flash[:alert] = "Cannot update profile: #{pp_errors @profile.errors.messages}"
27
27
  end
28
- redirect_to :action => :index
28
+ if params[:redirect_to]
29
+ redirect_to params[:redirect_to]
30
+ else
31
+ redirect_to :action => :index
32
+ end
29
33
  end
30
34
 
31
35
  end
@@ -5,7 +5,7 @@ class IshManager::VideosController < IshManager::ApplicationController
5
5
 
6
6
  def index
7
7
  authorize! :index, Video.new
8
- @videos = Video.unscoped
8
+ @videos = Video.unscoped.order_by( :created_at => :desc )
9
9
 
10
10
  if params[:city_id]
11
11
  city = City.find params[:city_id]
@@ -1,5 +1,7 @@
1
1
 
2
2
  .meta
3
+ On #{item.created_at.to_s[0...10]}
4
+ %br
3
5
  - if item.city
4
6
  <b>City:</b> #{link_to item.city.name, city_path( item.city )}
5
7
  %br
@@ -8,16 +8,43 @@
8
8
  Videos (#{videos.count})
9
9
  = link_to '[+]', new_video_path
10
10
 
11
- = paginate videos, :param_name => :videos_page
12
- %ol
13
- - videos.each do |video|
14
- %li
15
- = button_to '[x]', video_path( video ), :method => :delete, :data => { :confirm => 'Are you sure?' }
16
- = link_to '[~]', edit_video_path( video )
17
- = link_to video.name, video_path( video )
18
- = render 'meta', :item => video
19
- -# = render 'embed', :video => video
20
- = image_tag "https://img.youtube.com/vi/#{video.youtube_id}/0.jpg"
21
- = paginate videos, :param_name => :videos_page
11
+ - if @current_user.profile.videos_embed
12
+ Embed?
13
+ .inline
14
+ = form_tag user_profile_path( @current_user.profile ), :method => :patch do
15
+ = hidden_field_tag 'ish_models_user_profile[videos_embed]', false
16
+ = hidden_field_tag 'redirect_to', videos_path
17
+ = submit_tag 'Preview?'
18
+ - else
19
+ .inline
20
+ = form_tag user_profile_path( @current_user.profile ), :method => :patch do
21
+ = hidden_field_tag 'ish_models_user_profile[videos_embed]', true
22
+ = hidden_field_tag 'redirect_to', videos_path
23
+ = submit_tag 'Embed?'
24
+ Preview?
25
+
26
+ %br
27
+
28
+ = paginate videos, :param_name => :videos_page, :views_prefix => 'ish_manager'
29
+
30
+ - videos.each do |video|
31
+ .panel
32
+ .panel-content
33
+ .row
34
+ .col-xs-12.col-sm-6
35
+ .center
36
+ = link_to video.name, video_path( video )
37
+ .inline= button_to '[x]', video_path( video ), :method => :delete, :data => { :confirm => 'Are you sure?' }
38
+ = link_to '[~]', edit_video_path( video )
39
+ = render 'meta', :item => video
40
+ .description= video.description
41
+ .col-xs-12.col-sm-6
42
+ .center
43
+ - if @current_user.profile.videos_embed
44
+ = render 'embed', :video => video
45
+ - else
46
+ = render 'preview', :video => video
47
+
48
+ = paginate videos, :param_name => :videos_page, :views_prefix => 'ish_manager'
22
49
  %hr
23
50
 
@@ -0,0 +1,2 @@
1
+
2
+ = image_tag "https://img.youtube.com/vi/#{video.youtube_id}/0.jpg", :style => "width: 100%"
@@ -0,0 +1,2 @@
1
+
2
+ = image_tag "https://img.youtube.com/vi/#{video.youtube_id}/0.jpg", :style => { :width => '100%' }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8.50
4
+ version: 0.1.8.51
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-17 00:00:00.000000000 Z
11
+ date: 2017-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -287,6 +287,8 @@ files:
287
287
  - app/views/ish_manager/videos/_index.haml
288
288
  - app/views/ish_manager/videos/_list.haml
289
289
  - app/views/ish_manager/videos/_list_small.haml
290
+ - app/views/ish_manager/videos/_preview.haml
291
+ - app/views/ish_manager/videos/_preview.haml~
290
292
  - app/views/ish_manager/videos/edit.haml
291
293
  - app/views/ish_manager/videos/index.haml
292
294
  - app/views/ish_manager/videos/index.haml~