ish_manager 0.1.8.153 → 0.1.8.154
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db746bb8c09c4491024c1ced104c9c5d7c30d085
|
4
|
+
data.tar.gz: 4439a3905c3e508ab0c92bc4f26ab21c0bec1cbd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: affaed61741c700f4fa0220ffb484386d4b9d6482d16503239b03146f7557a9c72ae12af7c8822fa6eedb3deb4cbac0ed0281683f223e44112756661864e6219
|
7
|
+
data.tar.gz: 892c86116a3540ad33858797ba406cdc44ba6f20f785c4eba70d3b042545b4a448e6db4169cb6e2cce094fc631f13c4d554da1cdc4b075ad6d35e0b726880dea
|
@@ -86,12 +86,18 @@ class IshManager::NewsitemsController < IshManager::ApplicationController
|
|
86
86
|
end
|
87
87
|
|
88
88
|
def update
|
89
|
-
if params[:site_id]
|
90
|
-
|
89
|
+
if params[:site_id] || params[:newsitem][:site_id]
|
90
|
+
if params[:site_id]
|
91
|
+
@site = Site.find params[:site_id]
|
92
|
+
end
|
93
|
+
if params[:newsitem][:site_id]
|
94
|
+
@site = Site.find params[:newsitem][:site_id]
|
95
|
+
end
|
91
96
|
@site.touch
|
92
97
|
@newsitem = @site.newsitems.find params[:id]
|
93
98
|
url = edit_site_path( @site )
|
94
99
|
end
|
100
|
+
|
95
101
|
if params[:city_id]
|
96
102
|
@city = City.find params[:city_id]
|
97
103
|
@newsitem = @city.newsitems.find params[:id]
|
@@ -124,6 +130,7 @@ class IshManager::NewsitemsController < IshManager::ApplicationController
|
|
124
130
|
@newsitem = @city.newsitems.find( params[:id] )
|
125
131
|
end
|
126
132
|
authorize! :edit, @newsitem
|
133
|
+
|
127
134
|
end
|
128
135
|
|
129
136
|
def index
|
@@ -139,6 +146,9 @@ class IshManager::NewsitemsController < IshManager::ApplicationController
|
|
139
146
|
@videos_list = Video.list
|
140
147
|
@galleries_list = Gallery.list
|
141
148
|
@reports_list = Report.list
|
149
|
+
@sites_list = Site.list
|
150
|
+
@cities_list = City.list
|
151
|
+
@tags_list = Tag.list
|
142
152
|
end
|
143
153
|
|
144
154
|
end
|
@@ -2,13 +2,13 @@
|
|
2
2
|
= form_for newsitem, :html => { :multipart => true } do |f|
|
3
3
|
.a
|
4
4
|
= f.label :site
|
5
|
-
= f.select :site_id, options_for_select( @
|
5
|
+
= f.select :site_id, options_for_select( @sites_list, :selected => ( @site ? @site.id : nil ) )
|
6
6
|
%br
|
7
7
|
= f.label :city
|
8
|
-
= f.select :city_id, options_for_select( @
|
8
|
+
= f.select :city_id, options_for_select( @cities_list, :selected => ( @city ? @city.id : nil ) )
|
9
9
|
%br
|
10
10
|
= f.label :tag
|
11
|
-
= f.select :tag_id, options_for_select( @
|
11
|
+
= f.select :tag_id, options_for_select( @tags_list, (@tag||Tag.new).id )
|
12
12
|
|
13
13
|
.a
|
14
14
|
= f.label :name
|
@@ -18,13 +18,13 @@
|
|
18
18
|
= f.text_area :descr, :class => :tinymce
|
19
19
|
.a
|
20
20
|
= f.label :video
|
21
|
-
= f.select :video_id, options_for_select( @videos_list )
|
21
|
+
= f.select :video_id, options_for_select( @videos_list, :selected => @newsitem.video_id )
|
22
22
|
.a
|
23
23
|
= f.label :gallery
|
24
|
-
= f.select :gallery_id, options_for_select( @galleries_list )
|
24
|
+
= f.select :gallery_id, options_for_select( @galleries_list, :selected => @newsitem.gallery_id )
|
25
25
|
.a
|
26
26
|
= f.label :report
|
27
|
-
= f.select :report_id, options_for_select( @reports_list )
|
27
|
+
= f.select :report_id, options_for_select( @reports_list, :selected => @newsitem.report_id )
|
28
28
|
.a
|
29
29
|
= label_tag :photo
|
30
30
|
= file_field_tag :photo
|
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.
|
4
|
+
version: 0.1.8.154
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|