ish_manager 0.1.8.252 → 0.1.8.253

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/ish_manager/{application.css → application.scss} +84 -93
  3. data/app/assets/stylesheets/ish_manager/maps.scss +0 -1
  4. data/app/controllers/ish_manager/application_controller.rb +5 -5
  5. data/app/controllers/ish_manager/features_controller.rb +7 -7
  6. data/app/controllers/ish_manager/maps_controller.rb +2 -2
  7. data/app/controllers/ish_manager/newsitems_controller.rb +57 -96
  8. data/app/controllers/ish_manager/reports_controller.rb +39 -71
  9. data/app/controllers/ish_manager/tags_controller.rb +40 -37
  10. data/app/controllers/ish_manager/user_profiles_controller.rb +3 -1
  11. data/app/views/ish_manager/application/_main_footer.haml +3 -3
  12. data/app/views/ish_manager/application/_main_header.haml +1 -1
  13. data/app/views/ish_manager/application/_main_header_admin.haml +34 -39
  14. data/app/views/ish_manager/application/_main_header_guy.haml +1 -1
  15. data/app/views/ish_manager/application/_main_header_manager.haml +1 -1
  16. data/app/views/ish_manager/cities/_form.haml +5 -5
  17. data/app/views/ish_manager/cities/edit_feature.haml +1 -1
  18. data/app/views/ish_manager/cities/index.haml +2 -2
  19. data/app/views/ish_manager/cities/show.haml +15 -15
  20. data/app/views/ish_manager/events/_form.haml +7 -7
  21. data/app/views/ish_manager/features/_form.haml +6 -6
  22. data/app/views/ish_manager/features/_index.haml +42 -28
  23. data/app/views/ish_manager/features/_index.haml-trash +36 -0
  24. data/app/views/ish_manager/features/_item.haml +1 -1
  25. data/app/views/ish_manager/features/index.haml +4 -25
  26. data/app/views/ish_manager/galleries/_form.haml +15 -15
  27. data/app/views/ish_manager/galleries/_index_thumbs.haml +1 -1
  28. data/app/views/ish_manager/galleries/_menu.haml +1 -1
  29. data/app/views/ish_manager/galleries/_thumbs.haml +1 -1
  30. data/app/views/ish_manager/galleries/_title.haml +1 -1
  31. data/app/views/ish_manager/galleries/show.haml +3 -3
  32. data/app/views/ish_manager/invoices/index.haml +1 -1
  33. data/app/views/ish_manager/invoices/new.haml +1 -1
  34. data/app/views/ish_manager/leads/new.haml +1 -1
  35. data/app/views/ish_manager/maps/_form.haml +13 -5
  36. data/app/views/ish_manager/maps/_index_item.haml +7 -0
  37. data/app/views/ish_manager/maps/_map_meta_row.haml +0 -1
  38. data/app/views/ish_manager/maps/index.haml +5 -3
  39. data/app/views/ish_manager/maps/show.haml +1 -4
  40. data/app/views/ish_manager/markers/_form.haml +16 -16
  41. data/app/views/ish_manager/newsitems/_form.haml +45 -35
  42. data/app/views/ish_manager/newsitems/_index.haml +23 -34
  43. data/app/views/ish_manager/newsitems/_item.haml +3 -3
  44. data/app/views/ish_manager/newsitems/edit.haml +11 -10
  45. data/app/views/ish_manager/reports/_form.haml +24 -14
  46. data/app/views/ish_manager/reports/_index.haml +1 -1
  47. data/app/views/ish_manager/reports/new.haml +1 -1
  48. data/app/views/ish_manager/reports/show.haml +2 -1
  49. data/app/views/ish_manager/sites/_header.haml +8 -3
  50. data/app/views/ish_manager/sites/galleries.haml +1 -1
  51. data/app/views/ish_manager/sites/index.haml +1 -1
  52. data/app/views/ish_manager/sites/show.haml +4 -4
  53. data/app/views/ish_manager/stock_watches/_form.haml +1 -1
  54. data/app/views/ish_manager/tags/_features.haml +2 -2
  55. data/app/views/ish_manager/tags/_form.haml +12 -16
  56. data/app/views/ish_manager/tags/_list.haml +1 -1
  57. data/app/views/ish_manager/tags/_list_simple.haml +1 -1
  58. data/app/views/ish_manager/tags/_meta.haml +9 -0
  59. data/app/views/ish_manager/tags/edit.haml +1 -1
  60. data/app/views/ish_manager/tags/show.haml +8 -12
  61. data/app/views/ish_manager/user_profiles/_form.haml +2 -2
  62. data/app/views/ish_manager/user_profiles/index.haml +3 -4
  63. data/app/views/ish_manager/user_profiles/new.haml +1 -1
  64. data/app/views/ish_manager/venues/_form.haml +14 -14
  65. data/app/views/ish_manager/venues/_index.haml +1 -1
  66. data/app/views/ish_manager/videos/_form.haml +8 -8
  67. data/app/views/ish_manager/videos/_index.haml +4 -3
  68. data/app/views/ish_manager/videos/_index_title.haml +2 -2
  69. data/app/views/layouts/ish_manager/application.haml +1 -1
  70. data/app/views/layouts/ish_manager/application_no_materialize.haml +2 -2
  71. data/config/routes.rb +1 -1
  72. metadata +6 -3
@@ -3,6 +3,39 @@ class IshManager::TagsController < IshManager::ApplicationController
3
3
 
4
4
  before_action :set_lists
5
5
 
6
+ # alphabetized : )
7
+
8
+ def create
9
+ @tag = Tag.create params[:tag].permit!
10
+ authorize! :create, @tag
11
+ if @tag.save
12
+ do_touch
13
+ flash[:notice] = 'Success.'
14
+ redirect_to tags_path
15
+ else
16
+ puts! @tag.errors, "error creating tag."
17
+ flash[:alert] = "No luck. #{@tag.errors.full_messages}"
18
+ render action: 'new'
19
+ end
20
+ end
21
+
22
+ def destroy
23
+ @tag = Tag.unscoped.find params[:id]
24
+ authorize! :destroy, @tag
25
+ if @tag.destroy
26
+ do_touch
27
+ flash[:notice] = 'Success'
28
+ else
29
+ flash[:alert] = "Cannot destroy tag: #{@tag.errors.messages}"
30
+ end
31
+ redirect_to :action => 'index'
32
+ end
33
+
34
+ def edit
35
+ @tag = Tag.unscoped.find params[:id]
36
+ authorize! :edit, @tag
37
+ end
38
+
6
39
  def index
7
40
  @resource = City.find( params[:city_id] ) if params[:city_id]
8
41
 
@@ -14,16 +47,8 @@ class IshManager::TagsController < IshManager::ApplicationController
14
47
 
15
48
  authorize! :index, Tag.new
16
49
 
17
- @site = Site.find( params[:site_id] ) if params[:site_id]
18
- @city = City.find( params[:city_id] ) if params[:city_id]
19
- end
20
-
21
- def show
22
- @tag = Tag.unscoped.find params[:id]
23
- authorize! :show, @tag
24
-
25
- @galleries = @tag.galleries.unscoped.where( :is_trash => false ).page( params[:galleries_page] ).per( 10 )
26
- @videos = @tag.videos.unscoped.where( :is_trash => false ).page( params[:videos_page ]).per( 10 )
50
+ @site = Site.find( params[:site_id] ) if params[:site_id]
51
+ @city = City.find( params[:city_id] ) if params[:city_id]
27
52
  end
28
53
 
29
54
  def new
@@ -31,23 +56,12 @@ class IshManager::TagsController < IshManager::ApplicationController
31
56
  authorize! :new, @tag
32
57
  end
33
58
 
34
- def create
35
- @tag = Tag.create params[:tag].permit!
36
- authorize! :create, @tag
37
- if @tag.save
38
- do_touch
39
- flash[:notice] = 'Success.'
40
- redirect_to tags_path
41
- else
42
- puts! @tag.errors, "error creating tag."
43
- flash[:alert] = "No luck. #{@tag.errors.messages}"
44
- render :action => :new
45
- end
46
- end
47
-
48
- def edit
59
+ def show
49
60
  @tag = Tag.unscoped.find params[:id]
50
- authorize! :edit, @tag
61
+ authorize! :show, @tag
62
+
63
+ @galleries = @tag.galleries.unscoped.where( :is_trash => false ).page( params[:galleries_page] ).per( 10 )
64
+ @videos = @tag.videos.unscoped.where( :is_trash => false ).page( params[:videos_page ]).per( 10 )
51
65
  end
52
66
 
53
67
  def update
@@ -64,17 +78,6 @@ class IshManager::TagsController < IshManager::ApplicationController
64
78
  end
65
79
  end
66
80
 
67
- def destroy
68
- @tag = Tag.unscoped.find params[:id]
69
- authorize! :destroy, @tag
70
- if @tag.destroy
71
- do_touch
72
- flash[:notice] = 'Success'
73
- else
74
- flash[:alert] = "Cannot destroy tag: #{@tag.errors.messages}"
75
- end
76
- redirect_to :action => 'index'
77
- end
78
81
 
79
82
  private
80
83
 
@@ -6,6 +6,7 @@ class IshManager::UserProfilesController < IshManager::ApplicationController
6
6
  def index
7
7
  @user_profiles = IshModels::UserProfile.all.includes( :user )
8
8
  authorize! :index, IshModels::UserProfile
9
+ render layout: 'ish_manager/application_no_materialize'
9
10
  end
10
11
 
11
12
  def show
@@ -23,10 +24,11 @@ class IshManager::UserProfilesController < IshManager::ApplicationController
23
24
  authorize! :update, @profile
24
25
 
25
26
  flag = @profile.update_attributes params[:profile].permit!
27
+
26
28
  if flag
27
29
  flash[:notice] = "Updated profile #{@profile.email}"
28
30
  else
29
- flash[:alert] = "Cannot update profile: #{pp_errors @profile.errors.messages}"
31
+ flash[:alert] = "Cannot update profile: #{@profile.errors.full_messages}"
30
32
  end
31
33
  if params[:redirect_to]
32
34
  redirect_to params[:redirect_to]
@@ -4,7 +4,7 @@
4
4
  .row
5
5
  %i.fa.fa-compress.collapse-expand#collapseFooter
6
6
  .content
7
- .col-sm-5
7
+ .col.s5
8
8
  - if defined?( current_user ) && current_user
9
9
  %ul
10
10
  %li >[ #{current_user.email} ]<
@@ -13,7 +13,7 @@
13
13
  Please log in
14
14
  = link_to '[+]', main_app.new_user_session_path
15
15
 
16
- .col-sm-5
16
+ .col.s5
17
17
  %br
18
18
  \~__^
19
19
  = @version
@@ -23,5 +23,5 @@
23
23
  %br
24
24
  %br
25
25
  %br
26
- .col-sm.2
26
+ .col.s2
27
27
  = button_to 'Logout', main_app.destroy_user_session_path, :method => :delete
@@ -2,7 +2,7 @@
2
2
  .manager--main-header
3
3
  .container
4
4
  .row
5
- .col-sm-12
5
+ .col.s12
6
6
  %i.fa.fa-compress.collapse-expand#collapseHeader
7
7
  .content
8
8
  %ul.nav.nav-pills
@@ -1,45 +1,40 @@
1
1
 
2
2
  .manager--main-header
3
3
  .container
4
- .row
5
- .col-sm-12
6
- %i.fa.fa-compress.collapse-expand#collapseHeader
7
- .content
8
- %ul.nav.nav-pills
9
- %li{ :class => params[:controller] == 'ish_manager/maps' ? 'active' : '' }= link_to 'GameUi::Maps', maps_path
10
- %li{ :class => params[:controller] == 'ish_manager/cities' ? 'active' : '' }= link_to 'Cities', cities_path
11
- %li{ :class => params[:controller] == 'ish_manager/events' ? 'active' : '' }= link_to 'Events', events_path
12
- %li{ :class => params[:controller] == 'ish_manager/venues' ? 'active' : '' }= link_to 'Venues', venues_path
13
- %li{ :class => params[:controller] == 'ish_manager/user_profiles' ? 'active' : '' }= link_to 'Profiles', user_profiles_path
14
- %li{ :class => params[:controller] == 'ish_manager/friends ' ? 'active' : '' }= link_to 'Friends', friends_path
15
-
16
- %ul.nav.nav-pills
17
- %li{ class: params[:controller] == 'ish_manager/newsitems' ? 'active' : '' }= link_to '+Newsitem', new_newsitem_path
18
- %li{ :class => params[:controller] == 'ish_manager/sites' ? 'active' : '' }= link_to 'Sites', sites_path
19
- %li{ :class => params[:controller] == 'ish_manager/galleries' ? 'active' : '' }= link_to 'Galleries', galleries_path
20
- %li{ :class => params[:controller] == 'ish_manager/reports' ? 'active' : '' }= link_to 'Reports', reports_path
21
- %li{ :class => params[:controller] == 'ish_manager/videos' ? 'active' : '' }= link_to 'Videos', videos_path
22
- %li{ :class => params[:controller] == 'ish_manager/tags' ? 'active' : '' }= link_to 'Tags', tags_path
23
-
24
- %ul.nav.nav-pills
25
- -# %li{ :class => params[:controller] == 'ish_manager/ally' ? 'active' : '' }= link_to 'Ally', ally_root_path
26
- -# %li{ :class => params[:controller] == 'ish_manager/stock_actions' ? 'active' : '' }= link_to 'Stock Actions', stock_actions_path
27
- -# %li{ :class => params[:controller] == 'ish_manager/stock_options' ? 'active' : '' }= link_to 'Stock Options', stock_options_path
28
- %li{ :class => params[:controller] == 'ish_manager/stock_watches' ? 'active' : '' }= link_to 'Stock Watches', stock_watches_path
29
- -# %li{ :class => params[:controller] == 'ish_manager/iron_condors' ? 'active' : '' }= link_to 'Iron Condors', iron_condors_path
30
- -# %li{ :class => params[:controller] == 'ish_manager/covered_calls' ? 'active' : '' }= link_to 'Covered Calls', covered_calls_path
31
-
32
- - proc do # nothing
33
- %ul.nav.nav-pills
34
- %li{ :class => params[:controller] == 'ish_manager/invoices' ? 'active' : '' }= link_to 'Invoices', invoices_path
35
- %li{ :class => params[:controller] == 'ish_manager/payments' ? 'active' : '' }= link_to 'Payments', payments_path
36
- %li{ :class => params[:controller] == 'ish_manager/orders' ? 'active' : '' }= link_to 'Orders', orders_path
37
- -# %li{ :class => params[:controller] == 'ish_manager/co_tailors' ? 'active' : '' }= link_to 'Co Tailors', co_tailors_path
38
-
39
- - proc do # nothing
40
- %ul.nav.nav-pills
41
- %li{ :class => params[:controller] == 'ish_manager/leads' ? 'active' : '' }= link_to 'Leads', leads_path
42
- %li{ :class => params[:controller] == 'ish_manager/campaigns' ? 'active' : '' }= link_to 'Campaigns', campaigns_path
4
+ %i.fa.fa-compress.collapse-expand#collapseHeader
5
+ .content
6
+ %ul
7
+ %li{ :class => params[:controller] == 'ish_manager/maps' ? 'active' : '' }= link_to 'GameUi::Maps', maps_path
8
+ %li{ :class => params[:controller] == 'ish_manager/cities' ? 'active' : '' }= link_to 'Cities', cities_path
9
+ %li{ :class => params[:controller] == 'ish_manager/events' ? 'active' : '' }= link_to 'Events', events_path
10
+ %li{ :class => params[:controller] == 'ish_manager/venues' ? 'active' : '' }= link_to 'Venues', venues_path
11
+ %li{ :class => params[:controller] == 'ish_manager/user_profiles' ? 'active' : '' }= link_to 'Profiles', user_profiles_path
12
+ %li{ :class => params[:controller] == 'ish_manager/friends ' ? 'active' : '' }= link_to 'Friends', friends_path
13
+
14
+ %ul
15
+ %li{ class: params[:controller] == 'ish_manager/newsitems' ? 'active' : '' }= link_to '+Newsitem', new_newsitem_path
16
+ %li{ :class => params[:controller] == 'ish_manager/sites' ? 'active' : '' }= link_to 'Sites', sites_path
17
+ %li{ :class => params[:controller] == 'ish_manager/galleries' ? 'active' : '' }= link_to 'Galleries', galleries_path
18
+ %li{ :class => params[:controller] == 'ish_manager/reports' ? 'active' : '' }= link_to 'Reports', reports_path
19
+ %li{ :class => params[:controller] == 'ish_manager/videos' ? 'active' : '' }= link_to 'Videos', videos_path
20
+ %li{ :class => params[:controller] == 'ish_manager/tags' ? 'active' : '' }= link_to 'Tags', tags_path
21
+
22
+ - proc do # nothing
23
+ %ul.nav.nav-pills
24
+ -# %li{ :class => params[:controller] == 'ish_manager/ally' ? 'active' : '' }= link_to 'Ally', ally_root_path
25
+ -# %li{ :class => params[:controller] == 'ish_manager/stock_actions' ? 'active' : '' }= link_to 'Stock Actions', stock_actions_path
26
+ -# %li{ :class => params[:controller] == 'ish_manager/stock_options' ? 'active' : '' }= link_to 'Stock Options', stock_options_path
27
+ %li{ :class => params[:controller] == 'ish_manager/stock_watches' ? 'active' : '' }= link_to 'Stock Watches', stock_watches_path
28
+ -# %li{ :class => params[:controller] == 'ish_manager/iron_condors' ? 'active' : '' }= link_to 'Iron Condors', iron_condors_path
29
+ -# %li{ :class => params[:controller] == 'ish_manager/covered_calls' ? 'active' : '' }= link_to 'Covered Calls', covered_calls_path
30
+ %ul.nav.nav-pills
31
+ %li{ :class => params[:controller] == 'ish_manager/invoices' ? 'active' : '' }= link_to 'Invoices', invoices_path
32
+ %li{ :class => params[:controller] == 'ish_manager/payments' ? 'active' : '' }= link_to 'Payments', payments_path
33
+ %li{ :class => params[:controller] == 'ish_manager/orders' ? 'active' : '' }= link_to 'Orders', orders_path
34
+ -# %li{ :class => params[:controller] == 'ish_manager/co_tailors' ? 'active' : '' }= link_to 'Co Tailors', co_tailors_path
35
+ %ul.nav.nav-pills
36
+ %li{ :class => params[:controller] == 'ish_manager/leads' ? 'active' : '' }= link_to 'Leads', leads_path
37
+ %li{ :class => params[:controller] == 'ish_manager/campaigns' ? 'active' : '' }= link_to 'Campaigns', campaigns_path
43
38
 
44
39
 
45
40
  %hr
@@ -2,7 +2,7 @@
2
2
  .manager--main-header
3
3
  .container
4
4
  .row
5
- .col-sm-12
5
+ .col.s12
6
6
  %i.fa.fa-compress.collapse-expand#collapseHeader
7
7
  .content
8
8
  %ul.nav.nav-pills
@@ -2,7 +2,7 @@
2
2
  .manager--main-header
3
3
  .container
4
4
  .row
5
- .col-sm-12
5
+ .col.s12
6
6
  %i.fa.fa-compress.collapse-expand#collapseHeader
7
7
  .content
8
8
  -#
@@ -2,7 +2,7 @@
2
2
  .manager-cities--form
3
3
  = form_for @city, :html => { :multipart => true } do |f|
4
4
  .row
5
- .col-sm-6
5
+ .col.s6
6
6
  .field
7
7
  %label= t('cities.name')
8
8
  = f.text_field :name
@@ -16,10 +16,10 @@
16
16
  .field
17
17
  %label coords
18
18
  .row
19
- .col-xs-6
19
+ .col.s6
20
20
  = f.label :x
21
21
  = f.text_field :x
22
- .col-xs-6
22
+ .col.s6
23
23
  = f.label :y
24
24
  = f.text_field :y
25
25
  .field
@@ -28,11 +28,11 @@
28
28
  .field
29
29
  = f.check_box :is_active
30
30
  = f.label :is_active
31
- .col-sm-6
31
+ .col.s6
32
32
  .field
33
33
  = f.label :description
34
34
  = f.text_area :description, :class => [ :tinymce ]
35
35
 
36
- .col-xs-12
36
+ .col.s12
37
37
  .actions
38
38
  = f.submit
@@ -1,4 +1,4 @@
1
1
 
2
2
  %h1 Edit Feature of city #{@city.name}
3
3
 
4
- = render 'manager/features/form', :url => city_feature_path(@city.id, @feature.id)
4
+ = render 'manager/features/form', :url => city_feature_path(@city.id, @feature.id)
@@ -1,13 +1,13 @@
1
1
 
2
2
  .container
3
3
  .row
4
- .col-xs-12
4
+ .col.s12
5
5
  %h1
6
6
  Cities
7
7
  = link_to '[+]', new_city_path
8
8
 
9
9
  - @cities.each do |city|
10
- .col-xs-3
10
+ .col.s3
11
11
  .panel.panel-default
12
12
  .row
13
13
  .panel-heading
@@ -5,39 +5,39 @@
5
5
 
6
6
  = render 'header', :city => @city
7
7
  .row
8
- .col-sm-6
8
+ .col.s6
9
9
  %h5
10
10
  Venues (#{@venues.length})
11
11
  = link_to image_new, new_venue_path(city_id: @city.id)
12
12
  = render 'ish_manager/venues/search', :city => @city
13
13
  = render 'ish_manager/venues/index', :venues => @venues
14
- .col-sm-6
15
- .col-sm-3
14
+ .col.s6
15
+ .col.s3
16
16
  %a{href: '#newsitems'}
17
17
  NewsItems (#{@city.newsitems.length})
18
- .col-sm-3
18
+ .col.s3
19
19
  %a{href: '#reports'}
20
20
  Reports (#{@city.reports.length})
21
- .col-sm-3
21
+ .col.s3
22
22
  %a{href: '#galleries'}
23
23
  Galleries (#{@city.galleries.length})
24
- .col-sm-3
24
+ .col.s3
25
25
  %a{href: '#videos'}
26
26
  Videos (#{@city.videos.length})
27
27
  .row
28
- .col-sm-12#newsitems
28
+ .col.s12#newsitems
29
29
  = render 'ish_manager/newsitems/index', :newsitems => @newsitems, :city => @city
30
30
  .row
31
- .col-sm-12#reports
31
+ .col.s12#reports
32
32
  = render 'ish_manager/reports/index', :reports => @reports
33
33
  .row
34
- .col-sm-12#galleries
34
+ .col.s12#galleries
35
35
  %h5
36
36
  Galleries (#{@city.galleries.length})
37
37
  = link_to image_new, new_gallery_path(city_id: @city.id)
38
38
  = render 'ish_manager/galleries/index', :galleries => @galleries
39
39
  .row
40
- .col-sm-12#videos
40
+ .col.s12#videos
41
41
  = render 'ish_manager/videos/index', :videos => @videos
42
42
 
43
43
 
@@ -45,19 +45,19 @@
45
45
  -#= render 'ish_manager/features/index', :features => @city.features, :city => @city
46
46
  -#
47
47
  -#.row
48
- -# .col-sm-6= render 'ish_manager/reports/index', :reports => @city.reports
49
- -# .col-sm-6
48
+ -# .col.s6= render 'ish_manager/reports/index', :reports => @city.reports
49
+ -# .col.s6
50
50
  -# %h5 Galleries
51
51
  -# = render 'ish_manager/galleries/index', :galleries => @city.galleries
52
52
  -#.row
53
- -# .col-sm-6
53
+ -# .col.s6
54
54
  -# %h5
55
55
  -# Venues (#{@city.venues.length})
56
56
  -# = link_to image_new, new_venue_path(city_id: @city.id)
57
57
  -# = render 'ish_manager/venues/index', :venues => @city.venues
58
58
  -#.row
59
- -# .col-sm-6= render 'ish_manager/videos/index', :videos => @city.videos
60
- -# .col-sm-6
59
+ -# .col.s6= render 'ish_manager/videos/index', :videos => @city.videos
60
+ -# .col.s6
61
61
  -# = render 'ish_manager/users/index', :users => @city.current_users
62
62
  -# = render 'ish_manager/events/index', :events => @city.events
63
63
  -# = render 'ish_manager/venues/index', :venues => @city.venues
@@ -1,35 +1,35 @@
1
1
 
2
2
  = form_for event, :html => { :multipart => true } do |f|
3
3
  .row
4
- .col-sm-4
4
+ .col.s4
5
5
  .input-field
6
6
  = f.label :name
7
7
  = f.text_field :name
8
- .col-sm-4
8
+ .col.s4
9
9
  .input-field
10
10
  = f.label :eventname
11
11
  = f.text_field :eventname
12
- .col-sm-4
12
+ .col.s4
13
13
  .input-field
14
14
  = f.label :date
15
15
  = f.text_field :date
16
16
 
17
17
  .row
18
- .col-sm-6
18
+ .col.s6
19
19
  .input-field
20
20
  = f.select :city, options_for_select( @cities_list, :selected => event.city_id )
21
21
  = f.label :city
22
- .col-sm-3
22
+ .col.s3
23
23
  .input-field
24
24
  = f.text_field :x
25
25
  = f.label :x
26
- .col-sm-3
26
+ .col.s3
27
27
  .input-field
28
28
  = f.text_field :y
29
29
  = f.label :y
30
30
 
31
31
  .row
32
- .col-sm-12
32
+ .col.s12
33
33
  .input-field
34
34
  = f.text_area :description, :class => [ :tinymce ]
35
35
  %br
@@ -12,10 +12,10 @@
12
12
  - url = site_features_path( @site )
13
13
  - if @tag
14
14
  - if @feature.persisted?
15
- - url = tag_feature_path( @site, @feature )
15
+ - url = tag_feature_path( @tag, @feature )
16
16
  - else
17
17
  - url = tag_features_path( @tag )
18
-
18
+
19
19
  = form_for @feature, :url => url do |f|
20
20
  - if @city
21
21
  = hidden_field_tag :city_id, @city.id
@@ -26,7 +26,7 @@
26
26
  - if @tag
27
27
  = hidden_field_tag :tag_id, @tag.id if @tag
28
28
  Tag #{@tag.name}
29
-
29
+
30
30
  .row
31
31
  .large-6.columns
32
32
  = f.label :name
@@ -52,10 +52,10 @@
52
52
  %br
53
53
  = f.label :video
54
54
  = select :feature, :video_id, @videos_list
55
-
55
+
56
56
  .row
57
57
  %hr
58
- .large-6.columns
58
+ .large-6.columns
59
59
  %br
60
60
  = f.label :weight
61
61
  = f.text_field :weight
@@ -65,6 +65,6 @@
65
65
  .large-6.columns
66
66
  .field
67
67
  = f.label :inner_html
68
- = f.text_area :inner_html
68
+ = f.text_area :inner_html, class: 'large'
69
69
  .actions
70
70
  = f.submit
@@ -1,29 +1,43 @@
1
+ -#
2
+ -# ish_manager / features / _index
3
+ -#
1
4
 
2
- - if defined? city
3
- - edit_url = -> (feature ) { edit_city_feature_path( city.id, feature.id ) }
4
- - delete_url = -> (feature ) { city_feature_path( city.id, feature.id ) }
5
- - new_path = new_city_feature_path( city.id )
6
- - if defined? site
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
- - if defined? tag
11
- - edit_url = -> (feature) { edit_tag_feature_path( tag.id, feature.id ) }
12
- - delete_url = -> (feature) { tag_feature_path( tag.id, feature.id ) }
13
- - new_path = new_tag_feature_path( tag.id )
14
-
15
- .manager-features--index
16
- %h3
17
- Features (#{features.length})
18
- = link_to image_new, new_path
19
-
20
- .row
21
- - features.each_with_index do |feature, idx|
22
- - if idx % 4 == 0
23
- .clearfix
24
- .col-sm-3
25
- .a
26
- = link_to '[~]', edit_url.call( feature )
27
- = button_to '[x]', delete_url.call( feature ), :method => :delete, :data => { :confirm => 'Are you sure?' }
28
- = render 'ish_manager/features/item', :feature => feature
29
- %hr
5
+ - resource ||= @resource
6
+
7
+ - pparams = {}
8
+ - pparams["#{resource.class.name.downcase}_id"] = resource.id
9
+
10
+ .row
11
+ .large-12.columns
12
+ %h5
13
+ Features in <b>#{resource.class.name}</b> #{resource.name}
14
+ = link_to '[+]', new_feature_path(pparams)
15
+ .row
16
+ - resource.features.each do |feature|
17
+ .col.s3
18
+
19
+ .flex-row
20
+
21
+ = link_to '[~]', edit_city_feature_path( resource, feature ) if 'City' == resource.class.name
22
+ = link_to '[~]', edit_tag_feature_path( resource, feature ) if 'Tag' == resource.class.name
23
+ = link_to '[~]', edit_site_feature_path( resource, feature ) if 'Site' == resource.class.name
24
+ = link_to '[~]', edit_venue_feature_path( resource, feature ) if 'Venue' == resource.class.name
25
+
26
+ = button_to( '[x]', city_feature_path( resource, feature ), :method => :delete, :data => { :confirm => :'Are you sure?' } ) if 'City' == resource.class.name
27
+ = button_to( '[x]', tag_feature_path( resource, feature ), :method => :delete, :data => { :confirm => :'Are you sure?' } ) if 'Tag' == resource.class.name
28
+ = button_to( '[x]', site_feature_path( resource, feature ), :method => :delete, :data => { :confirm => :'Are you sure?' } ) if 'Site' == resource.class.name
29
+ = button_to( '[x]', venue_feature_path( resource, feature ), :method => :delete, :data => { :confirm => :'Are you sure?' } ) if 'Venue' == resource.class.name
30
+
31
+ %ul
32
+ - if feature.name
33
+ %li Name #{feature.name}
34
+ - if feature.subhead
35
+ %li Subhead: #{feature.subhead}
36
+ - if feature.report
37
+ %li Report: #{feature.report}
38
+ - if feature.gallery
39
+ %li Gallery: #{feature.gallery.id} <br /> #{feature.gallery.name}
40
+ - if feature.inner_html
41
+ %li
42
+ inner html:
43
+ = raw feature.inner_html
@@ -0,0 +1,36 @@
1
+ -#
2
+ -# ish_manager / features / _index
3
+ -#
4
+
5
+ - if defined? city
6
+ - edit_url = -> (feature ) { edit_city_feature_path( city.id, feature.id ) }
7
+ - delete_url = -> (feature ) { city_feature_path( city.id, feature.id ) }
8
+ - new_path = new_city_feature_path( city.id )
9
+ - if defined? site
10
+ - edit_url = -> (feature) { edit_site_feature_path( site.id, feature.id ) }
11
+ - delete_url = -> (feature) { site_feature_path( site.id, feature.id ) }
12
+ - new_path = new_site_feature_path( site.id )
13
+ - if defined?(tag)
14
+ - edit_url = -> (feature) { edit_tag_feature_path( tag.id, feature.id ) }
15
+ - delete_url = -> (feature) { tag_feature_path( tag.id, feature.id ) }
16
+ - new_path = new_tag_feature_path( tag.id )
17
+ - if params[:tag_id]
18
+ - edit_url = -> (feature) { edit_tag_feature_path( params[:tag_id], feature.id ) }
19
+ - delete_url = -> (feature) { tag_feature_path( params[:tag_id], feature.id ) }
20
+ - new_path = new_tag_feature_path( params[:tag_id] )
21
+
22
+ .manager-features--index
23
+ %h3
24
+ Features (#{features.length})
25
+ = link_to image_new, new_path
26
+
27
+ .row
28
+ - features.each_with_index do |feature, idx|
29
+ - if idx % 4 == 0
30
+ .clearfix
31
+ .col-sm-3
32
+ .a
33
+ = link_to '[~]', edit_url.call( feature )
34
+ = button_to '[x]', delete_url.call( feature ), :method => :delete, :data => { :confirm => 'Are you sure?' }
35
+ = render 'ish_manager/features/item', :feature => feature
36
+ %hr
@@ -7,7 +7,7 @@
7
7
  - unless feature[:subhead].blank?
8
8
  .descr= raw feature[:subhead]
9
9
  - unless feature.report.blank?
10
- %h3= link_to feature.report.name, report_path(feature.report.name_seo)
10
+ %h3= link_to feature.report.name, report_path(feature.report.slug)
11
11
  .descr= raw feature.report.subhead
12
12
  - unless feature.gallery.blank?
13
13
  %h3= link_to feature.gallery.name, gallery_path(feature.gallery)
@@ -1,26 +1,5 @@
1
+ -#
2
+ -# ish_manager / features / index
3
+ -#
1
4
 
2
- .row
3
- .large-12.columns
4
- %h5 Features in <b>#{@resource.class.name}</b> #{@resource.name}
5
-
6
- %ul
7
- - @resource.features.each do |feature|
8
- %li.panel
9
- .panel-body
10
-
11
- = link_to '[~]', edit_city_feature_path( @resource, feature ) if 'City' == @resource.class.name
12
- = link_to '[~]', edit_tag_feature_path( @resource, feature ) if 'Tag' == @resource.class.name
13
- = link_to '[~]', edit_site_feature_path( @resource, feature ) if 'Site' == @resource.class.name
14
- = link_to '[~]', edit_venue_feature_path( @resource, feature ) if 'Venue' == @resource.class.name
15
-
16
- = button_to( '[x]', city_feature_path( @resource, feature ), :method => :delete, :data => { :confirm => :'Are you sure?' } ) if 'City' == @resource.class.name
17
- = button_to( '[x]', tag_feature_path( @resource, feature ), :method => :delete, :data => { :confirm => :'Are you sure?' } ) if 'Tag' == @resource.class.name
18
- = button_to( '[x]', site_feature_path( @resource, feature ), :method => :delete, :data => { :confirm => :'Are you sure?' } ) if 'Site' == @resource.class.name
19
- = button_to( '[x]', venue_feature_path( @resource, feature ), :method => :delete, :data => { :confirm => :'Are you sure?' } ) if 'Venue' == @resource.class.name
20
-
21
- %ul
22
- %li Name #{feature.name}
23
- %li Subhead: #{feature.subhead}
24
- %li Report: #{feature.report}
25
- - if feature.gallery
26
- %li Gallery: #{feature.gallery.id} <br /> #{feature.gallery.name}
5
+ = render 'index'