ish_manager 0.1.8.21 → 0.1.8.22

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6397016c614d5c21d05d363637e82acedf46be31
4
- data.tar.gz: db623739218c25f138e002a4d6b89dfed8f12fd2
3
+ metadata.gz: dab98bdd473dd73c5e605837baef4929d2c3a2e5
4
+ data.tar.gz: c5b9dbf5af313ee127c5514b8f8de24cfe3c2826
5
5
  SHA512:
6
- metadata.gz: d938bd5884995b632c6df2398f91831125bd1a715e37828eabc2e86b09327f854e639408cdb613758482f8721669f0778accb4f22841e5863dd538aa4bdecb5f
7
- data.tar.gz: 6b69929120f6a47eb3c34505c355d162bd0bec381dc4657bb2f25777f2a2daa8459233274fec370854b5bf320c8038c1a81a63c217cfa3f211c8d7d0ff30585b
6
+ metadata.gz: 055cb68777f29f675ed4329af211d15b81508f1cd87e28c54e2d8a609ff3c38e83f72b4becc4ce70be8dee8b53dc79b71cdccea8e9c27eda5884539ffb4d4feb
7
+ data.tar.gz: cb1caf9d2acf949542fa9d77c52d58d008ca90f42f7bb677f765e40e5f747334354fb2c453ec273f477aaff970c0eaf28e0b3818adddb89ad3ce647df3f43225
@@ -31,7 +31,16 @@ $(function () {
31
31
  });
32
32
 
33
33
  $(document).ready(function () {
34
- $('*[data-confirm]').click(function(){
35
- return confirm($(this).attr('data-confirm'));
36
- });
34
+ $('*[data-confirm]').click(function(){
35
+ return confirm($(this).attr('data-confirm'));
36
+ });
37
+
38
+ if ($(".tinymce").length > 0) {
39
+ tinymce.init({
40
+ mode: "specific_textareas",
41
+ editor_selector: 'tinymce',
42
+ plugins: 'link'
43
+ });
44
+ }
37
45
  });
46
+
@@ -25,7 +25,7 @@ class IshManager::NewsitemsController < IshManager::ApplicationController
25
25
  @city.newsitems << n
26
26
  flag = @city.save
27
27
  if flag
28
- url = edit_manager_city_path( @city.id )
28
+ url = edit_city_path( @city.id )
29
29
  else
30
30
  error = 'No Luck. ' + @city.errors.inspect
31
31
  end
@@ -36,7 +36,7 @@ class IshManager::NewsitemsController < IshManager::ApplicationController
36
36
  @site.newsitems << n
37
37
  flag = @site.save
38
38
  if flag
39
- url = edit_manager_site_path( @site.id )
39
+ url = edit_site_path( @site.id )
40
40
  else
41
41
  error = 'No Luck. ' + @site.errors.inspect
42
42
  end
@@ -58,14 +58,15 @@ class IshManager::NewsitemsController < IshManager::ApplicationController
58
58
  end
59
59
 
60
60
  def destroy
61
+ authorize! :destroy, Newsitem
61
62
  if params[:city_id]
62
63
  flag = City.find( params[:city_id] ).newsitems.find( params[:id] ).destroy
63
- url = edit_manager_city_path( params[:city_id] )
64
+ url = edit_city_path( params[:city_id] )
64
65
  end
65
66
  if params[:site_id]
66
67
  site = Site.find( params[:site_id] )
67
68
  flag = site.newsitems.find( params[:id] ).destroy
68
- url = edit_manager_site_path( params[:site_id] )
69
+ url = edit_site_path( params[:site_id] )
69
70
  end
70
71
 
71
72
  flash[:notice] = "Success? #{flag}"
@@ -77,12 +78,12 @@ class IshManager::NewsitemsController < IshManager::ApplicationController
77
78
  @site = Site.find params[:site_id]
78
79
  @site.touch
79
80
  @newsitem = @site.newsitems.find params[:id]
80
- url = edit_manager_site_path( @site )
81
+ url = edit_site_path( @site )
81
82
  end
82
83
  if params[:city_id]
83
84
  @city = City.find params[:city_id]
84
85
  @newsitem = @city.newsitems.find params[:id]
85
- url = edit_manager_city_path( @city )
86
+ url = edit_city_path( @city )
86
87
  end
87
88
  flag = @newsitem.update_attributes params[:newsitem].permit!
88
89
 
@@ -1,4 +1,9 @@
1
1
  module IshManager
2
2
  module ApplicationHelper
3
+
4
+ def pretty_date input
5
+ return input.strftime("%Y-%m-%d")
6
+ end
7
+
3
8
  end
4
9
  end
@@ -1,12 +1,12 @@
1
1
 
2
- - title "City #{@city.name}"
2
+ -# - title "City #{@city.name}"
3
3
 
4
4
  .row
5
5
  .large-12.columns
6
6
 
7
7
  %h2
8
8
  = @city.name
9
- = link_to '[~]', edit_manager_city_path(@city)
9
+ = link_to '[~]', edit_city_path(@city)
10
10
 
11
11
  - unless @city.profile_photo.blank?
12
12
  = image_tag @city.profile_photo.photo.url(:thumb)
@@ -14,10 +14,10 @@
14
14
  %hr
15
15
  %ul.menu-secondary
16
16
  %li
17
- = link_to '[+]', new_manager_city_feature_path( @city )
17
+ = link_to '[+]', new_city_feature_path( @city )
18
18
  Features (#{@city.features.length})
19
19
  %li
20
- = link_to '[+]', new_manager_city_newsitem_path( @city )
20
+ = link_to '[+]', new_city_newsitem_path( @city )
21
21
  Newsitems (#{@city.newsitems.length})
22
22
  %li New Report
23
23
  %li New Gallery
@@ -27,8 +27,8 @@
27
27
  %li New Community
28
28
  %hr
29
29
 
30
- = render 'manager/features/index', :features => @city.features, :city => @city
31
- = render 'manager/newsitems/index', :newsitems => @city.newsitems, :city => @city
30
+ = render 'ish_manager/features/index', :features => @city.features, :city => @city
31
+ = render 'ish_manager/newsitems/index', :newsitems => @city.newsitems, :city => @city
32
32
 
33
33
  %h3
34
34
  = t('reports.list')
@@ -36,14 +36,14 @@
36
36
  %ul
37
37
  - @city.reports.each do |report|
38
38
  %li
39
- = link_to '[~]', edit_manager_report_path(report)
39
+ = link_to '[~]', edit_report_path(report)
40
40
  = report.name
41
41
 
42
42
  .galleries-list
43
43
  %h3
44
44
  = t('galleries.list')
45
45
  (#{@city.galleries.length})
46
- = render '/manager/galleries/list_short', :galleries => @city.galleries
46
+ = render 'ish_manager/galleries/list_short', :galleries => @city.galleries
47
47
 
48
48
  %h3
49
49
  = t('users.list')
@@ -4,9 +4,9 @@
4
4
  - delete_url = -> (feature ) { city_feature_path( city.id, feature.id ) }
5
5
  - new_path = new_city_feature_path( city.id )
6
6
  - if defined? site
7
- - edit_url = -> (feature) { edit_manager_site_feature_path( site.id, feature.id ) }
8
- - delete_url = -> (feature) { manager_site_feature_path( site.id, feature.id ) }
9
- - new_path = new_manager_site_feature_path( site.id )
7
+ - edit_url = -> (feature) { edit_site_feature_path( site.id, feature.id ) }
8
+ - delete_url = -> (feature) { site_feature_path( site.id, feature.id ) }
9
+ - new_path = new_site_feature_path( site.id )
10
10
 
11
11
  .manager-features--index
12
12
  %h2
@@ -19,5 +19,5 @@
19
19
  %li
20
20
  = link_to '[~]', edit_url.call( feature )
21
21
  = link_to '[x]', delete_url.call( feature ), :method => :delete, :data => { :confirm => 'Are you sure?' }
22
- .item= render 'manager/features/item', :feature => feature
22
+ .item= render 'ish_manager/features/item', :feature => feature
23
23
 
@@ -10,5 +10,5 @@
10
10
  %li
11
11
  - gallery.photos.unscoped.where({ :is_trash => false })[0..4].each do |photo|
12
12
  .mini= image_tag photo.photo.url( :mini ), :alt => ''
13
- #{link_to gallery.name, manager_gallery_path( gallery )} (#{gallery.photos.unscoped.where({ :is_trash => false }).length})
13
+ #{link_to gallery.name, gallery_path( gallery )} (#{gallery.photos.unscoped.where({ :is_trash => false }).length})
14
14
  = paginate galleries, :param_name => :galleries_page
@@ -1,17 +1,22 @@
1
1
 
2
2
  - if defined? site
3
- - edit_url = ->(n) { edit_manager_site_newsitem_path( site, n ) }
4
- - delete_url = ->(n) { manager_site_newsitem_path( site, n ) }
3
+ - edit_url = ->(n) { edit_site_newsitem_path( site, n ) }
4
+ - delete_url = ->(n) { site_newsitem_path( site, n ) }
5
5
  - if defined? city
6
- - edit_url = ->(n) { edit_manager_city_newsitem_path( city, n ) }
7
- - delete_url = ->(n) { manager_city_newsitem_path( city, n ) }
6
+ - edit_url = ->(n) { edit_city_newsitem_path( city, n ) }
7
+ - delete_url = ->(n) { city_newsitem_path( city, n ) }
8
8
 
9
9
  .row
10
10
  .small-12.columns
11
11
  %h2 Newsitems (#{newsitems.count})
12
- %ul
12
+ %ol
13
13
  - newsitems.each do |n|
14
14
  %li
15
- = link_to '[~]', edit_url.call( n )
16
- = link_to '[x]', delete_url.call( n ), :method => :delete, :data => { :confirm => 'Are you sure?' }
17
- = n.name
15
+ %ul
16
+ %li
17
+ = link_to '[~]', edit_url.call( n )
18
+ = link_to '[x]', delete_url.call( n ), :method => :delete, :data => { :confirm => 'Are you sure?' }
19
+ Name: #{n.name}
20
+ Desc: #{n.descr}
21
+ %li Report id: #{n.report_id}
22
+ %li Gallery id: #{n.gallery_id}
@@ -8,9 +8,9 @@
8
8
  %ol
9
9
  - reports.each do |report|
10
10
  %li
11
- = link_to '[~]', edit_manager_report_path( report )
12
- = link_to '[x]', manager_report_path( report ), :method => :delete, :data => { :confirm => 'Are you sure?' }
13
- = link_to report.name, manager_report_path( report )
11
+ = link_to '[~]', edit_report_path( report )
12
+ = link_to '[x]', report_path( report ), :method => :delete, :data => { :confirm => 'Are you sure?' }
13
+ = link_to report.name, report_path( report )
14
14
  - if report.subhead && report.subhead.length > 3
15
15
  .subhead= report.subhead
16
16
  = paginate reports, :param_name => :reports_page
@@ -4,34 +4,34 @@
4
4
  .large-12.columns
5
5
  %h1
6
6
  Site http://#{@site.domain}/#{@site.lang}
7
- = link_to '[~]', edit_manager_site_path( @site.id )
7
+ = link_to '[~]', edit_site_path( @site.id )
8
8
 
9
9
  .row
10
10
  .large-6.columns
11
- = render 'manager/galleries/index', :galleries => @galleries
11
+ = render 'ish_manager/galleries/index', :galleries => @galleries
12
12
  .large-6.columns
13
- = render 'manager/reports/index', :reports => @reports
13
+ = render 'ish_manager/reports/index', :reports => @reports
14
14
 
15
15
  .row
16
16
  .large-6.columns
17
- = render 'manager/videos/index', :videos => @videos
17
+ = render 'ish_manager/videos/index', :videos => @videos
18
18
  .large-6.columns
19
- = render 'manager/tags/index', :tags => @tags
19
+ = render 'ish_manager/tags/index', :tags => @tags
20
20
 
21
21
  .row
22
22
  .large-12.columns
23
- = render 'manager/features/index', :features => @features, :site => @site
23
+ = render 'ish_manager/features/index', :features => @features, :site => @site
24
24
 
25
25
  .row
26
26
  .large-12.columns
27
27
  %h4
28
28
  Newsitems (#{@newsitems.length})
29
- = link_to "[+]", new_manager_site_newsitem_path( @site )
29
+ = link_to "[+]", new_site_newsitem_path( @site )
30
30
 
31
31
  %ol
32
32
  - @newsitems.each do |newsitem|
33
33
  %li
34
34
  %ul
35
- %li= link_to '[Delete]', manager_sites_newsitem_path(@site.id, newsitem.id), :method => :delete, :data => { :confirm => 'Are you sure?' }
36
- = render 'manager/newsitems/item', :newsitem => newsitem
35
+ %li= button_to '[x]', site_newsitem_path(@site.id, newsitem.id), :method => :delete, :data => { :confirm => 'Are you sure?' }
36
+ = render 'ish_manager/newsitems/item', :newsitem => newsitem
37
37
  = paginate @newsitems, :param_name => 'newsitems_page'
@@ -0,0 +1,12 @@
1
+
2
+ .tags-features
3
+ .title
4
+ %h1
5
+ = link_to t('tags.list'), tags_path
6
+
7
+ .items
8
+ - feature_tags.each do |tag|
9
+ .item
10
+ %h3= link_to tag['name_'+@locale.to_s], tag_path(tag.name_seo)
11
+
12
+ .c
@@ -0,0 +1,19 @@
1
+
2
+ -#
3
+ -# tags / _form
4
+ -#
5
+
6
+ = form_for @tag, :url => create_tag_path do |f|
7
+ = f.label :name
8
+ = f.text_field :name
9
+
10
+ %br
11
+ = f.label :is_public
12
+ = f.check_box :is_public
13
+
14
+ %br
15
+ = f.label :is_trash
16
+ = f.check_box :is_trash
17
+
18
+ %br
19
+ = f.submit
@@ -0,0 +1,17 @@
1
+
2
+ - content_for :title do
3
+ = t('tags.list')
4
+
5
+ .row
6
+ .small-12.columns
7
+ .center
8
+ %h1= t('tags.list')
9
+
10
+ %ul.large-block-grid-2
11
+ - @tags.each do |tag|
12
+ = render 'ish_manager/tags/item', :tag => tag
13
+ - if @tags.blank?
14
+ %li No Tags
15
+
16
+
17
+
@@ -0,0 +1,40 @@
1
+
2
+ - if !defined? is_panel
3
+ - is_panel = true
4
+ %li
5
+ %div{ :class => is_panel ? 'panel' : '' }
6
+ = link_to tag.name, tag_path(tag.name_seo)
7
+ (#{tag.reports.length}) (#{tag.galleries.length}) (#{tag.videos.length})
8
+
9
+ -# .descr= tag.descr
10
+
11
+ - if tag.children_tags.length > 0
12
+ %ul
13
+ - tag.children_tags.map do |tt|
14
+ = render 'item', :tag => tt, :is_panel => false
15
+
16
+
17
+
18
+
19
+
20
+ -# hidden
21
+ - proc do # nothing
22
+ - if tag.reports.length > 0
23
+ .tag-reports
24
+ %h5 Reports
25
+ - tag.reports[0..Tag.n_reports-1].each do |report|
26
+ = render 'reports/item_mini', :report => report
27
+ .item-mini.hide
28
+ %h5= link_to '[More Reports]', tag_path(tag.name_seo)
29
+
30
+ - if tag.galleries.length > 0
31
+ %h5 Galleries
32
+ %ul.tag-galleries
33
+ - tag.galleries[0..Tag.n_galleries].each do |gallery|
34
+ %li= link_to gallery.name, gallery_path(gallery.galleryname, 0)
35
+
36
+ - if tag.videos.length > 0
37
+ %h5 Videos
38
+ %ul.tag-videos
39
+ - tag.videos[0..Tag.n_videos].each do |video|
40
+ %li= link_to video.name, video_path(video.youtube_id)
@@ -0,0 +1,8 @@
1
+
2
+ - if tags.length > 0
3
+ .tags--list
4
+ .inner
5
+ .title
6
+ %h3= t('tags.list')
7
+ - tags.each do |tag|
8
+ .item= link_to tag['name_'+@locale.to_s], tag_path(tag.name_seo)
@@ -0,0 +1,5 @@
1
+
2
+ .list--simple
3
+ %ul.block
4
+ - tags.each do |tag|
5
+ %li= link_to tag.name, tag_path(tag.name_seo)
@@ -0,0 +1,17 @@
1
+
2
+ - content_for :title do
3
+ = t('tags.list')
4
+
5
+ .row
6
+ .small-12.columns
7
+ .center
8
+ %h1= t('tags.list')
9
+
10
+ %ul.large-block-grid-2
11
+ - @tags.each do |tag|
12
+ = render 'tags/item', :tag => tag
13
+ - if @tags.blank?
14
+ %li No Tags
15
+
16
+
17
+
@@ -0,0 +1,3 @@
1
+
2
+ %h1 New Tag
3
+ = render 'form', :tag => @tag
@@ -0,0 +1,30 @@
1
+ -## tags/show
2
+
3
+ - content_for :title do
4
+ Topic #{@tag.name}
5
+
6
+ .row
7
+ .large-12.columns
8
+ %h1.center On the topic of #{@tag.name}
9
+ = render 'ads/leaderboard'
10
+ -# .descr= @tag.descr # I don't wanna show this every time to everyone, they know what they are here for.
11
+ = render 'features/list', :features => @tag.features[0, Tag.n_features]
12
+
13
+ .row
14
+ .large-6.columns
15
+ %h4 Reports
16
+ = render 'reports/list', :reports => @reports, :n_ads => 0
17
+ %hr
18
+
19
+ .large-6.columns
20
+ %h4 Galleries
21
+ = render 'galleries/list', :galleries => @galleries, :n_thumbs => 4
22
+ %hr
23
+
24
+ .row
25
+ .large-12.columns
26
+ %h4
27
+ = t('videos.list')
28
+ = link_to '[+]', new_video_path( :tag_id => @tag.id )
29
+ = render 'videos/list', :videos => @videos
30
+
@@ -6,6 +6,8 @@
6
6
  %meta{ :charset => 'UTF-8' }
7
7
  %meta{ :description => 'some description' }
8
8
  %script{ :src => "https://ajax.googleapis.com/ajax/libs/jquery/3.0.0/jquery.min.js" }
9
+ %script{ :src => "https://cdnjs.cloudflare.com/ajax/libs/tinymce/4.6.3/jquery.tinymce.min.js" }
10
+ %script{ :src => "https://cdnjs.cloudflare.com/ajax/libs/tinymce/4.6.3/tinymce.min.js" }
9
11
  = stylesheet_link_tag "ish_manager/application", media: "all"
10
12
  = javascript_include_tag "ish_manager/application"
11
13
  = csrf_meta_tags
data/config/routes.rb CHANGED
@@ -3,18 +3,22 @@ IshManager::Engine.routes.draw do
3
3
 
4
4
  resources :cities do
5
5
  resources :features
6
+ resources :newsitems
6
7
  end
7
8
  resources :events
8
9
  resources :galleries do
9
10
  post 'multiadd', :to => 'photos#j_create', :as => :multiadd
10
11
  end
11
12
  resources :newsitems
12
- resources :reports
13
13
  resources :photos
14
+ resources :reports
14
15
  resources :sites do
16
+ resources :features
15
17
  resources :galleries
18
+ resources :newsitems
16
19
  resources :reports
17
20
  end
21
+ resources :tags
18
22
  resources :user_profiles
19
23
  resources :venues
20
24
  resources :videos
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8.21
4
+ version: 0.1.8.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
@@ -219,6 +219,15 @@ files:
219
219
  - app/views/ish_manager/sites/index.haml
220
220
  - app/views/ish_manager/sites/new.haml
221
221
  - app/views/ish_manager/sites/show.haml
222
+ - app/views/ish_manager/tags/_features.haml
223
+ - app/views/ish_manager/tags/_form.haml
224
+ - app/views/ish_manager/tags/_index.haml
225
+ - app/views/ish_manager/tags/_item.haml
226
+ - app/views/ish_manager/tags/_list.haml
227
+ - app/views/ish_manager/tags/_list_simple.haml
228
+ - app/views/ish_manager/tags/index.haml
229
+ - app/views/ish_manager/tags/new.haml
230
+ - app/views/ish_manager/tags/show.haml
222
231
  - app/views/ish_manager/videos/_index.haml
223
232
  - app/views/layouts/ish_manager/application.haml
224
233
  - app/views/layouts/ish_manager/application.haml~