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.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/ish_manager/{application.css → application.scss} +84 -93
- data/app/assets/stylesheets/ish_manager/maps.scss +0 -1
- data/app/controllers/ish_manager/application_controller.rb +5 -5
- data/app/controllers/ish_manager/features_controller.rb +7 -7
- data/app/controllers/ish_manager/maps_controller.rb +2 -2
- data/app/controllers/ish_manager/newsitems_controller.rb +57 -96
- data/app/controllers/ish_manager/reports_controller.rb +39 -71
- data/app/controllers/ish_manager/tags_controller.rb +40 -37
- data/app/controllers/ish_manager/user_profiles_controller.rb +3 -1
- data/app/views/ish_manager/application/_main_footer.haml +3 -3
- data/app/views/ish_manager/application/_main_header.haml +1 -1
- data/app/views/ish_manager/application/_main_header_admin.haml +34 -39
- data/app/views/ish_manager/application/_main_header_guy.haml +1 -1
- data/app/views/ish_manager/application/_main_header_manager.haml +1 -1
- data/app/views/ish_manager/cities/_form.haml +5 -5
- data/app/views/ish_manager/cities/edit_feature.haml +1 -1
- data/app/views/ish_manager/cities/index.haml +2 -2
- data/app/views/ish_manager/cities/show.haml +15 -15
- data/app/views/ish_manager/events/_form.haml +7 -7
- data/app/views/ish_manager/features/_form.haml +6 -6
- data/app/views/ish_manager/features/_index.haml +42 -28
- data/app/views/ish_manager/features/_index.haml-trash +36 -0
- data/app/views/ish_manager/features/_item.haml +1 -1
- data/app/views/ish_manager/features/index.haml +4 -25
- data/app/views/ish_manager/galleries/_form.haml +15 -15
- data/app/views/ish_manager/galleries/_index_thumbs.haml +1 -1
- data/app/views/ish_manager/galleries/_menu.haml +1 -1
- data/app/views/ish_manager/galleries/_thumbs.haml +1 -1
- data/app/views/ish_manager/galleries/_title.haml +1 -1
- data/app/views/ish_manager/galleries/show.haml +3 -3
- data/app/views/ish_manager/invoices/index.haml +1 -1
- data/app/views/ish_manager/invoices/new.haml +1 -1
- data/app/views/ish_manager/leads/new.haml +1 -1
- data/app/views/ish_manager/maps/_form.haml +13 -5
- data/app/views/ish_manager/maps/_index_item.haml +7 -0
- data/app/views/ish_manager/maps/_map_meta_row.haml +0 -1
- data/app/views/ish_manager/maps/index.haml +5 -3
- data/app/views/ish_manager/maps/show.haml +1 -4
- data/app/views/ish_manager/markers/_form.haml +16 -16
- data/app/views/ish_manager/newsitems/_form.haml +45 -35
- data/app/views/ish_manager/newsitems/_index.haml +23 -34
- data/app/views/ish_manager/newsitems/_item.haml +3 -3
- data/app/views/ish_manager/newsitems/edit.haml +11 -10
- data/app/views/ish_manager/reports/_form.haml +24 -14
- data/app/views/ish_manager/reports/_index.haml +1 -1
- data/app/views/ish_manager/reports/new.haml +1 -1
- data/app/views/ish_manager/reports/show.haml +2 -1
- data/app/views/ish_manager/sites/_header.haml +8 -3
- data/app/views/ish_manager/sites/galleries.haml +1 -1
- data/app/views/ish_manager/sites/index.haml +1 -1
- data/app/views/ish_manager/sites/show.haml +4 -4
- data/app/views/ish_manager/stock_watches/_form.haml +1 -1
- data/app/views/ish_manager/tags/_features.haml +2 -2
- data/app/views/ish_manager/tags/_form.haml +12 -16
- data/app/views/ish_manager/tags/_list.haml +1 -1
- data/app/views/ish_manager/tags/_list_simple.haml +1 -1
- data/app/views/ish_manager/tags/_meta.haml +9 -0
- data/app/views/ish_manager/tags/edit.haml +1 -1
- data/app/views/ish_manager/tags/show.haml +8 -12
- data/app/views/ish_manager/user_profiles/_form.haml +2 -2
- data/app/views/ish_manager/user_profiles/index.haml +3 -4
- data/app/views/ish_manager/user_profiles/new.haml +1 -1
- data/app/views/ish_manager/venues/_form.haml +14 -14
- data/app/views/ish_manager/venues/_index.haml +1 -1
- data/app/views/ish_manager/videos/_form.haml +8 -8
- data/app/views/ish_manager/videos/_index.haml +4 -3
- data/app/views/ish_manager/videos/_index_title.haml +2 -2
- data/app/views/layouts/ish_manager/application.haml +1 -1
- data/app/views/layouts/ish_manager/application_no_materialize.haml +2 -2
- data/config/routes.rb +1 -1
- 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
|
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! :
|
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: #{
|
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
|
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
|
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
|
26
|
+
.col.s2
|
27
27
|
= button_to 'Logout', main_app.destroy_user_session_path, :method => :delete
|
@@ -1,45 +1,40 @@
|
|
1
1
|
|
2
2
|
.manager--main-header
|
3
3
|
.container
|
4
|
-
.
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
%
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
%
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
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-cities--form
|
3
3
|
= form_for @city, :html => { :multipart => true } do |f|
|
4
4
|
.row
|
5
|
-
.col
|
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
|
19
|
+
.col.s6
|
20
20
|
= f.label :x
|
21
21
|
= f.text_field :x
|
22
|
-
.col
|
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
|
31
|
+
.col.s6
|
32
32
|
.field
|
33
33
|
= f.label :description
|
34
34
|
= f.text_area :description, :class => [ :tinymce ]
|
35
35
|
|
36
|
-
.col
|
36
|
+
.col.s12
|
37
37
|
.actions
|
38
38
|
= f.submit
|
@@ -5,39 +5,39 @@
|
|
5
5
|
|
6
6
|
= render 'header', :city => @city
|
7
7
|
.row
|
8
|
-
.col
|
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
|
15
|
-
.col
|
14
|
+
.col.s6
|
15
|
+
.col.s3
|
16
16
|
%a{href: '#newsitems'}
|
17
17
|
NewsItems (#{@city.newsitems.length})
|
18
|
-
.col
|
18
|
+
.col.s3
|
19
19
|
%a{href: '#reports'}
|
20
20
|
Reports (#{@city.reports.length})
|
21
|
-
.col
|
21
|
+
.col.s3
|
22
22
|
%a{href: '#galleries'}
|
23
23
|
Galleries (#{@city.galleries.length})
|
24
|
-
.col
|
24
|
+
.col.s3
|
25
25
|
%a{href: '#videos'}
|
26
26
|
Videos (#{@city.videos.length})
|
27
27
|
.row
|
28
|
-
.col
|
28
|
+
.col.s12#newsitems
|
29
29
|
= render 'ish_manager/newsitems/index', :newsitems => @newsitems, :city => @city
|
30
30
|
.row
|
31
|
-
.col
|
31
|
+
.col.s12#reports
|
32
32
|
= render 'ish_manager/reports/index', :reports => @reports
|
33
33
|
.row
|
34
|
-
.col
|
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
|
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
|
49
|
-
-# .col
|
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
|
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
|
60
|
-
-# .col
|
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
|
4
|
+
.col.s4
|
5
5
|
.input-field
|
6
6
|
= f.label :name
|
7
7
|
= f.text_field :name
|
8
|
-
.col
|
8
|
+
.col.s4
|
9
9
|
.input-field
|
10
10
|
= f.label :eventname
|
11
11
|
= f.text_field :eventname
|
12
|
-
.col
|
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
|
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
|
22
|
+
.col.s3
|
23
23
|
.input-field
|
24
24
|
= f.text_field :x
|
25
25
|
= f.label :x
|
26
|
-
.col
|
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
|
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( @
|
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
|
-
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
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.
|
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
|
-
|
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'
|