ish_manager 0.1.8.51 → 0.1.8.52

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: 618fe86245ca25daaaa69aa91094bdd95aae23ef
4
- data.tar.gz: 04a017790df0e7f90172eb1fb5c4de2a82a5abb1
3
+ metadata.gz: 1907662cc8ccba86f8c812bfb9a9eab37e28b146
4
+ data.tar.gz: 52fd47592782b8e89dcdcc4a6a5ca2b75941df64
5
5
  SHA512:
6
- metadata.gz: 2a98823084c92a427f57b180527270fe089a9f29ace65ced4a93e62c4a9e2e72baac380da8a7018ebe4d847f20ef837d7937b70ec1fd020a4b8087d38430f0a2
7
- data.tar.gz: 7387f0160e625e4a0fc2e18338adbc66c21a1803d7909294e7d63a751a08368ee54ad3a99f57605be737ca7ebd50c86d959af0726b6c77393b18e763d0d480a0
6
+ metadata.gz: cd138999ad7b3b8b457c307107a2e00fc49ead9a71113a3ed613fce89121961ae4cd582800c0081a6357de9eb3a839ceddb162062a4a83ca0eb4dee22834bd16
7
+ data.tar.gz: 43c34a8c2bba0b770b28df57174b0dd5117e629ba831fe599a61d193b7de1a2fdf5a1e858b63e0072f9b8464399716a7b204651c972e5f18132b59c67eba5f53
@@ -22,6 +22,11 @@ class IshManager::NewsitemsController < IshManager::ApplicationController
22
22
  @resource = Site.find params[:site_id] if params[:site_id]
23
23
  authorize! :create_newsitem, @resource
24
24
 
25
+ if params[:photo]
26
+ photo = Photo.new :photo => params[:photo]
27
+ n.photo = photo
28
+ end
29
+
25
30
  @resource.newsitems << n
26
31
  flag = @resource.save
27
32
  if flag
@@ -68,6 +73,10 @@ class IshManager::NewsitemsController < IshManager::ApplicationController
68
73
  @newsitem = @city.newsitems.find params[:id]
69
74
  url = edit_city_path( @city )
70
75
  end
76
+ if params[:photo]
77
+ photo = Photo.new :photo => params[:photo]
78
+ @newsitem.photo = photo
79
+ end
71
80
  authorize! :update, @newsitem
72
81
  flag = @newsitem.update_attributes params[:newsitem].permit!
73
82
 
@@ -1,5 +1,5 @@
1
1
 
2
- = form_for newsitem do |f|
2
+ = form_for newsitem, :html => { :multipart => true } do |f|
3
3
  = hidden_field_tag :site_id, @site.id if @site
4
4
  = hidden_field_tag :city_id, @city.id if @city
5
5
  .a
@@ -17,6 +17,9 @@
17
17
  .a
18
18
  = f.label :report
19
19
  = f.select :report_id, options_for_select( @reports_list )
20
+ .a
21
+ = label_tag :photo
22
+ = file_field_tag :photo
20
23
  .a
21
24
  = f.submit :submit
22
25
 
@@ -8,7 +8,7 @@
8
8
  = link_to image_tag( n.photo.photo.url(:small) ), n.photo.photo.url(:large), :rel => 'lightbox[newsitem]'
9
9
  - else
10
10
  = link_to image_tag( n.photo.photo.url(:small) ), gallery_path( n.photo.gallery.galleryname, n.photo.gallery.photos.index(n.photo) )
11
- .meta= render 'photos/meta', :photo => n.photo
11
+ .meta= render 'ish_manager/photos/meta', :photo => n.photo
12
12
 
13
13
  - if !n.report.blank?
14
14
  .Nreport
@@ -41,9 +41,9 @@
41
41
  .col-xs-12.col-sm-6
42
42
  .center
43
43
  - if @current_user.profile.videos_embed
44
- = render 'embed', :video => video
44
+ = render 'ish_manager/videos/embed', :video => video
45
45
  - else
46
- = render 'preview', :video => video
46
+ = render 'ish_manager/videos/preview', :video => video
47
47
 
48
48
  = paginate videos, :param_name => :videos_page, :views_prefix => 'ish_manager'
49
49
  %hr
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.51
4
+ version: 0.1.8.52
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-18 00:00:00.000000000 Z
11
+ date: 2017-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails