ish_manager 0.1.8.177 → 0.1.8.178

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
  SHA256:
3
- metadata.gz: 97a7b088d7e49b67da5a00f298d5d77f974c9b8fc0c9c5a68e78b770c00a0041
4
- data.tar.gz: b357bddea283b4acbdaf0f5b890880583a6109418f4fb0d35c18c645e5aa7d3c
3
+ metadata.gz: 033713e466f1494139bf981ff35a44e522bc955bcbc3420485404216f98f7910
4
+ data.tar.gz: 57821fdf7fce47b535ca50be8bc039b4d89a36f20909d748bc0f26cd52bab463
5
5
  SHA512:
6
- metadata.gz: 0bb9b921a82662dcef20bb92b8b72c46e2d30fbf4ab2d0e836d61d7ae127539179375954519eb17679c49f555257598f7637695d29a08c52ab24a2e55463c8d7
7
- data.tar.gz: 6504a8de3abd54c428b379c4ec126a4d6f9876d0d3297b37771dee3d2d6193d5eaf652e1700f1f389079083e6ba2a1d71a5584ef5f1bcb8e70c0dd457371239a
6
+ metadata.gz: 497603b69ac52ff022c50ae169081676687d11eb3d871f7344618b526cdc0e27a2eac27721ff619a30ae25bc16fc0ef0272e96ea8672dd7a18d58300b9f4abfc
7
+ data.tar.gz: d06b299229b8d493f8cff07fdccf1ba14f383fd6182ac409eae750b20a0f771de22c112bd77b8b03a1fbb9a70797a3762572a03235e1862038d2aca8e5e4b610
@@ -190,4 +190,12 @@ table.stock_watches .trashy {
190
190
  }
191
191
  .stock-option:hover {
192
192
  box-shadow: 3px 3px 5px grey;
193
- }
193
+ }
194
+
195
+ /*
196
+ * newsitems
197
+ */
198
+ .newsitems--item {
199
+ border: 1px solid green;
200
+ padding: 5px;
201
+ }
@@ -1,6 +1,4 @@
1
-
2
1
  class IshManager::NewsitemsController < IshManager::ApplicationController
3
-
4
2
  before_action :set_lists
5
3
 
6
4
  def new
@@ -76,6 +74,11 @@ class IshManager::NewsitemsController < IshManager::ApplicationController
76
74
  flag = City.find( params[:city_id] ).newsitems.find( params[:id] ).destroy
77
75
  url = edit_city_path( params[:city_id] )
78
76
  end
77
+ if profile_id = params[:user_profile_id]
78
+ profile = IshModels::UserProfile.find profile_id
79
+ flag = profile.newsitems.find( params[:id] ).destroy
80
+ url = profile_path( profile_id )
81
+ end
79
82
  if params[:site_id]
80
83
  site = Site.find( params[:site_id] )
81
84
  flag = site.newsitems.find( params[:id] ).destroy
@@ -87,8 +90,8 @@ class IshManager::NewsitemsController < IshManager::ApplicationController
87
90
  url = tag_path( params[:tag_id] )
88
91
  end
89
92
 
90
- flash[:notice] = "Success? #{flag}"
91
- redirect_to url
93
+ flash[:notice] = "Success? #{flag.inspect}"
94
+ redirect_to request.referrer # url
92
95
  end
93
96
 
94
97
  def update
@@ -1,54 +1,56 @@
1
-
2
1
  - n ||= newsitem
2
+ .newsitems--item
3
+ - if profile_id
4
+ = button_to '[x]', profile_newsitem_path(profile_id, n.id), method: :delete, data: { confirm: 'Are you sure?' }
5
+ - if !n.photo.blank?
6
+ .Nphoto.panel
7
+ .the-photo
8
+ - if n.photo.gallery.blank?
9
+ = link_to image_tag( n.photo.photo.url(:small) ), n.photo.photo.url(:large), :rel => 'lightbox[newsitem]'
10
+ - else
11
+ = link_to image_tag( n.photo.photo.url(:small) ), gallery_path( n.photo.gallery.galleryname, n.photo.gallery.photos.index(n.photo) )
12
+ .meta= render 'ish_manager/photos/meta', :photo => n.photo
13
+
14
+ - if !n.report.blank?
15
+ .Nreport
16
+ %h3= link_to n.report.name, report_path(n.report.name_seo)
17
+ .meta
18
+ New Report on #{pretty_date n.report.created_at} by #{n.report.username}
19
+ - unless n.report.photo.blank?
20
+ .thumb= link_to image_tag(n.report.photo.photo.url(:thumb), :alt => ''), report_path( n.report.name_seo )
21
+ .subhead= n.report.subhead
22
+ .c
23
+
24
+ - if !n.gallery.blank?
25
+ .Ngallery
3
26
 
4
- - if !n.photo.blank?
5
- .Nphoto.panel
6
- .the-photo
7
- - if n.photo.gallery.blank?
8
- = link_to image_tag( n.photo.photo.url(:small) ), n.photo.photo.url(:large), :rel => 'lightbox[newsitem]'
9
- - else
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 'ish_manager/photos/meta', :photo => n.photo
12
-
13
- - if !n.report.blank?
14
- .Nreport
15
- %h3= link_to n.report.name, report_path(n.report.name_seo)
16
- .meta
17
- New Report on #{pretty_date n.report.created_at} by #{n.report.username}
18
- - unless n.report.photo.blank?
19
- .thumb= link_to image_tag(n.report.photo.photo.url(:thumb), :alt => ''), report_path( n.report.name_seo )
20
- .subhead= n.report.subhead
21
- .c
22
-
23
- - if !n.gallery.blank?
24
- .Ngallery
25
- %h3= link_to n.gallery.name, gallery_path(n.gallery.galleryname, 0)
26
- .meta
27
- #{t('newsitems.new_gallery', :username => n.gallery.username, :date => pretty_date(n.gallery.created_at))}
28
- - unless n.gallery.city.blank?
29
- = t('cities.in')
30
- = link_to n.gallery.city.name, city_path(n.gallery.city.cityname, :lang => :en)
31
- - unless n.gallery.tag.blank?
32
- = t('tags.in')
33
- = link_to n.gallery.tag.name, tag_path(n.gallery.tag.name_seo)
34
- - unless 0 == n.gallery.photos.length
35
- - n.gallery.photos.where( :is_trash => false )[0...8].each do |photo|
36
- = link_to image_tag( photo.photo.url(:thumb), :alt => photo.name ), photo.photo.url(:small), :rel => "lightbox[#{n.gallery.galleryname}]"
37
- -# .subhead= n.descr
38
- .c
39
-
40
- - if n.video_id
41
- - video = Video.unscoped.find n.video_id
42
- .Nvideo
43
- = link_to video.video.url, video.video.url
44
- -# %h3= link_to (video.name.blank? ? t('videos.no_title') : video.name), video_path(video.youtube_id)
45
- = render 'ish_manager/application/meta', :item => video
46
- = render 'ish_manager/videos/embed_half', :video => video
47
- .c
48
-
49
- - if !n.descr.blank? && n.gallery.blank? && n.report.blank?
50
- .Ndescr.panel
51
- .meta= pretty_date n.created_at
52
- .subhead= simple_format n.descr
53
- .c
54
-
27
+ %h3= link_to n.gallery.name, gallery_path(n.gallery.galleryname, 0)
28
+ .meta
29
+ #{t('newsitems.gallery', :username => n.gallery.username, :date => pretty_date(n.gallery.created_at))}
30
+ - unless n.gallery.city.blank?
31
+ = t('cities.in')
32
+ = link_to n.gallery.city.name, city_path(n.gallery.city.cityname, :lang => :en)
33
+ - unless n.gallery.tag.blank?
34
+ = t('tags.in')
35
+ = link_to n.gallery.tag.name, tag_path(n.gallery.tag.name_seo)
36
+ - unless 0 == n.gallery.photos.length
37
+ - n.gallery.photos.where( :is_trash => false )[0...8].each do |photo|
38
+ = link_to image_tag( photo.photo.url(:thumb), :alt => photo.name ), photo.photo.url(:small), :rel => "lightbox[#{n.gallery.galleryname}]"
39
+ -# .subhead= n.descr
40
+ .c
41
+
42
+ - if n.video_id
43
+ - video = Video.unscoped.find n.video_id
44
+ .Nvideo
45
+ = link_to video.video.url, video.video.url
46
+ -# %h3= link_to (video.name.blank? ? t('videos.no_title') : video.name), video_path(video.youtube_id)
47
+ = render 'ish_manager/application/meta', :item => video
48
+ = render 'ish_manager/videos/embed_half', :video => video
49
+ .c
50
+
51
+ - if !n.descr.blank? && n.gallery.blank? && n.report.blank?
52
+ .Ndescr.panel
53
+ .meta= pretty_date n.created_at
54
+ .subhead= simple_format n.descr
55
+ .c
56
+
@@ -26,7 +26,7 @@
26
26
 
27
27
  %h5 Newsitems
28
28
  - profile.newsitems.each do |n|
29
- = render 'ish_manager/newsitems/item', n: n
29
+ = render 'ish_manager/newsitems/item', n: n, profile_id: profile.id
30
30
  <hr />
31
31
  .row
32
32
  Address:
@@ -26,6 +26,7 @@ IshManager::Engine.routes.draw do
26
26
  get 'galleries/index_thumbs', :to => 'galleries#index', :defaults => { :render_type => Gallery::RENDER_THUMBS }
27
27
  resources :galleries do
28
28
  post 'multiadd', :to => 'photos#j_create', :as => :multiadd
29
+ resources :newsitems
29
30
  end
30
31
 
31
32
  resources :invoices do
@@ -45,7 +46,8 @@ IshManager::Engine.routes.draw do
45
46
 
46
47
  resources :photos
47
48
  resources :payments
48
-
49
+ ## profiles, see user_profiles
50
+
49
51
  resources :reports
50
52
 
51
53
  resources :sites do
@@ -75,9 +77,12 @@ IshManager::Engine.routes.draw do
75
77
  resources :videos
76
78
  end
77
79
 
78
- resources :user_profiles
79
- # resources :user_profiles, :as => :ish_models_user_profiles
80
- resources :user_profiles, :as => :profiles
80
+ resources :user_profiles do
81
+ resources :newsitems
82
+ end
83
+ resources :user_profiles, :as => :profiles do
84
+ resources :newsitems
85
+ end
81
86
 
82
87
  resources :venues
83
88
  resources :videos
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.177
4
+ version: 0.1.8.178
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-10 00:00:00.000000000 Z
11
+ date: 2019-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -350,8 +350,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
350
350
  - !ruby/object:Gem::Version
351
351
  version: '0'
352
352
  requirements: []
353
- rubyforge_project:
354
- rubygems_version: 2.7.3
353
+ rubygems_version: 3.0.6
355
354
  signing_key:
356
355
  specification_version: 4
357
356
  summary: Summary of IshManager.