ish_manager 0.1.8.252 → 0.1.8.253

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.
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
@@ -7,39 +7,39 @@
7
7
 
8
8
  = form_for gallery, :url => url do |f|
9
9
  .row
10
- .col-sm-6
10
+ .col.s6
11
11
  = f.label :name
12
12
  = f.text_field :name
13
- .col-sm-6
13
+ .col.s6
14
14
  = f.label :galleryname
15
15
  = f.text_field :galleryname
16
16
 
17
17
  .row
18
- .col-sm-4
18
+ .col.s4
19
19
  = f.label :site
20
20
  = select :gallery, :site_id, @sites_list
21
- .col-sm-4
21
+ .col.s4
22
22
  = f.label :city
23
23
  = select :gallery, :city_id, @cities_list
24
- .col-sm-4
24
+ .col.s4
25
25
  = f.label :venue
26
26
  = select :gallery, :venue_id, @venues_list
27
27
  .row
28
- .col-sm-4
28
+ .col.s4
29
29
  = f.label :tags
30
30
  = f.select :tag_ids, @tags_list, {}, { multiple: true }
31
31
 
32
32
  .row
33
33
  .panel
34
34
  .panel-body
35
- .col-sm-4
35
+ .col.s4
36
36
  = f.label 'Shared with'
37
37
  = f.select :shared_profiles, options_for_select( [[nil,nil,:disabled=>true]]+current_user.profile.friends.map { |f| [ f.email, f.id ] }, :selected => gallery.shared_profiles.map(&:id) ), {}, { :multiple => true }
38
- .col-sm-4
38
+ .col.s4
39
39
  Shared with:<br />
40
40
  - gallery.shared_profiles.each do |p|
41
41
  &gt; #{p.email} <br />
42
- .col-sm-4
42
+ .col.s4
43
43
  "/
44
44
  .row
45
45
  = f.label :subhead
@@ -48,20 +48,20 @@
48
48
  = f.text_area :descr, class: :tinymce
49
49
 
50
50
  .row
51
- .col-sm-3
51
+ .col.s3
52
52
  = f.check_box :is_public
53
53
  = f.label :is_public
54
- .col-sm-3
54
+ .col.s3
55
55
  = f.check_box :is_trash
56
56
  = f.label :is_trash
57
- .col-sm-3
57
+ .col.s3
58
58
  = f.check_box :is_done
59
59
  = f.label :is_done
60
- .col-sm-3
60
+ .col.s3
61
61
  = f.label :premium_tier
62
62
  = f.number_field :premium_tier
63
- .col-sm-3
63
+ .col.s3
64
64
  = f.label :username
65
65
  = f.text_field :username
66
- .col-sm-3
66
+ .col.s3
67
67
  = f.submit 'Submit'
@@ -1 +1 @@
1
- = render 'ish_manager/galleries/index'
1
+ = render 'ish_manager/galleries/index'
@@ -1,7 +1,7 @@
1
1
 
2
2
  .title
3
3
  .row
4
- .col-sm-12.col-md-12
4
+ .col.s12.col.m12
5
5
  %h1.center #{params[:action]} (#{@galleries.count}) #{link_to '[+]', new_gallery_path}
6
6
  = render 'search', path: galleries_path
7
7
  %ul.menu-secondary
@@ -6,7 +6,7 @@
6
6
  %hr
7
7
  .row
8
8
  - gallery.photos.each do |photo|
9
- .col-xs-6.col-sm-6.col-md-4.col-lg-2
9
+ .col.s3
10
10
  %br
11
11
  = button_to '[x]', photo_path( photo ), :method => :delete, :data => { :confirm => 'Are you sure?' }
12
12
  .thumb= image_tag( photo.photo.url( :thumb ), :alt => '' )
@@ -1,6 +1,6 @@
1
1
 
2
2
  .row
3
- .col-xs-12
3
+ .col.s12
4
4
  .center
5
5
  %h2
6
6
  = link_to gallery.name, gallery_path(gallery)
@@ -18,7 +18,7 @@
18
18
  .row
19
19
  %ul
20
20
  - @photos.each do |photo|
21
- %li.col-xs-1
21
+ %li.col.s1
22
22
  = link_to image_tag(photo.photo.url( :mini ), :alt => ''), "#large_#{photo.id}"
23
23
 
24
24
  .spacer{ :style => 'height: 500px' }
@@ -26,7 +26,7 @@
26
26
  -# thumb
27
27
  .row.row-thumbs
28
28
  - @photos.each do |photo|
29
- .col-xs-3
29
+ .col.s3
30
30
  .item
31
31
  = render 'ish_manager/photos/meta_manager', photo: photo
32
32
  = image_tag photo.photo.url( :thumb ), :alt => ''
@@ -38,4 +38,4 @@
38
38
  .item
39
39
  %a{id: "large_#{photo.id}" }
40
40
  = render 'ish_manager/photos/meta_manager', photo: photo
41
- .wrapper{ style: "background-image: url('#{photo.photo.url( :large )}')" }
41
+ .wrapper{ style: "background-image: url('#{photo.photo.url( :large )}')" }
@@ -8,7 +8,7 @@
8
8
  = link_to '[+]', new_invoice_path
9
9
 
10
10
  .row
11
- .col-xs-12.col-md-6.col-md-offset-3
11
+ .col.s12.col.m6.col-md-offset-3
12
12
  = render 'form', :invoice => @new_invoice
13
13
  %hr
14
14
 
@@ -1,5 +1,5 @@
1
1
 
2
2
  .row
3
- .col-xs-12.col-md-6.col-md-offset-3
3
+ .col.s12.col.m6.col-md-offset-3
4
4
  %h5 New Invoice
5
5
  = render 'form', :invoice => @new_invoice
@@ -1,5 +1,5 @@
1
1
 
2
2
  .row
3
- .col-sm-6.col-sm-offset-3
3
+ .col.s6.col-sm-offset-3
4
4
  %h5 New Lead
5
5
  = render 'form', :lead => @new_lead
@@ -4,7 +4,7 @@
4
4
 
5
5
  - url = params[:action] == 'new' ? maps_path : map_path(@map.id)
6
6
 
7
- = form_for @map, :html => { :multipart => true }, url: url do |f|
7
+ = form_for @map, :html => { :multipart => true, class: 'maps--form' }, url: url do |f|
8
8
  - if @map.errors.any?
9
9
  #error_explanation
10
10
  %h2= "#{pluralize(@map.errors.count, "error")} prohibited this map from being saved:"
@@ -13,25 +13,25 @@
13
13
  %li= message
14
14
 
15
15
  .row
16
- .col-md-3
16
+ .col.s3
17
17
  .field
18
18
  = f.label :name
19
19
  = f.text_field :name
20
20
  .field
21
21
  = f.label :map_slug, "Map slug (if any)"
22
22
  = f.text_field :map_slug
23
- .col-md-3
23
+ .col.s3
24
24
  .field
25
25
  = f.label :slug
26
26
  = f.text_field :slug
27
27
  .field
28
28
  = f.label :parent_slug
29
29
  = f.text_field :parent_slug
30
- .col-md-2
30
+ .col.s2
31
31
  .field
32
32
  = f.label :ordering_type
33
33
  = f.select :ordering_type, options_for_select(::Gameui::Map::ORDERING_TYPES)
34
- .col-md-4
34
+ .col.s4
35
35
 
36
36
  .field
37
37
  = f.label :image
@@ -42,5 +42,13 @@
42
42
  = f.label :description
43
43
  = f.text_area :description, class: 'tinymce'
44
44
 
45
+ .row
46
+ .col.s6
47
+ = f.label :labels
48
+ = f.text_area :labels
49
+ .col.s6
50
+ = f.label :config
51
+ = f.text_area :config
52
+
45
53
  .actions
46
54
  = f.submit 'Save'
@@ -0,0 +1,7 @@
1
+
2
+ .item{ style: "display: flex; flex-direction: column;" }
3
+ = render 'map_meta_row', map: map
4
+ %ul{ style: "margin-left: 5em;" }
5
+ - map.childs.each do |m|
6
+ %li
7
+ = render 'index_item', map: m
@@ -3,7 +3,6 @@
3
3
  .a= link_to map.slug, map_path(map)
4
4
  .a= button_to '~', edit_map_path(map), method: :get
5
5
  .a= button_to 'map editor', location_map_editor_path(map.id), method: :get
6
- .a <b>#{map.w}x#{map.h}_#{map.slug}</b>
7
6
  .a= button_to '+marker', new_map_marker_path(map), method: :get
8
7
  .a= button_to '+newsitem', new_map_newsitem_path(map), method: :get
9
8
  .a= link_to '[api]', api_map_path(map)
@@ -5,10 +5,12 @@
5
5
  .maps-index
6
6
  %h1 Maps (#{@maps.length}) #{link_to '[+]', new_map_path}
7
7
  - @maps.each do |map|
8
- .item
9
- = render 'map_meta_row', map: map
8
+ = render 'index_item', map: map
9
+
10
10
 
11
11
  %h1 All Maps (#{@all_maps.length})
12
12
  %ul
13
13
  - @all_maps.each do |m|
14
- %li= link_to m.slug, edit_map_path(m.id)
14
+ %li
15
+ = link_to m.slug, map_path(m.id)
16
+ = link_to '[~]', edit_map_path(m.id)
@@ -32,10 +32,7 @@
32
32
  %li <b>item_type:</b> #{marker.item_type}
33
33
 
34
34
  %p.addToggle Newsitems (#{@map.newsitems.count}) [<>]
35
- .newsitems-list
36
- - @map.newsitems.each do |newsitem|
37
- .item
38
- = newsitem.inspect
35
+ = render 'ish_manager/newsitems/index', newsitems: @map.newsitems
39
36
 
40
37
  %p.addToggle Maps (#{@maps.count}) [<>]
41
38
  .maps-list
@@ -18,40 +18,40 @@
18
18
  %li= message
19
19
 
20
20
  .row
21
- .col-md-1
21
+ .col.s1
22
22
  = f.label :map
23
23
  = f.text_field :map_id, value: @marker.map_id || params[:map_id]
24
- .col-md-5
24
+ .col.s5
25
25
  .field
26
26
  = f.label :name
27
27
  = f.text_field :name
28
- .col-md-6
28
+ .col.s6
29
29
  .field
30
30
  = f.label :slug
31
31
  = f.text_field :slug
32
32
  .row
33
- .col-md-3
33
+ .col.s3
34
34
  .field
35
35
  = f.label :image
36
36
  = file_field_tag :image
37
37
  .image-thumb
38
38
  = image_tag(@marker.image.image.url(:thumb)) rescue nil
39
39
  = image_tag('icons/10x10_red-cross.png', class: 'red-cross', style: "top: #{@marker.centerOffsetY-10}px; left: #{@marker.centerOffsetX-10}px;" )
40
- .col-md-3
40
+ .col.s3
41
41
  .field
42
42
  = f.label :centerOffsetX
43
43
  = f.text_field :centerOffsetX
44
44
  .field
45
45
  = f.label :centerOffsetY
46
46
  = f.text_field :centerOffsetY
47
- .col-md-3
47
+ .col.s3
48
48
  .field
49
49
  = f.label :x
50
50
  = f.text_field :x
51
51
  .field
52
52
  = f.label :y
53
53
  = f.text_field :y
54
- .col-md-3
54
+ .col.s3
55
55
  .field
56
56
  = f.label :title_image
57
57
  = file_field_tag :title_image
@@ -61,29 +61,29 @@
61
61
  = f.label :url, "URL (if any)"
62
62
  = f.text_field :url
63
63
  .row
64
- .col-md-3 &nbsp;
65
- .col-md-6
64
+ .col.s3 &nbsp;
65
+ .col.s6
66
66
  .field
67
67
  = f.label :description
68
68
  = f.text_area :description
69
69
  .row
70
- .col-md-4
70
+ .col.s4
71
71
  .field
72
72
  = f.label :item_type
73
73
  = f.select :item_type, options_for_select( ::Gameui::Marker::ITEM_TYPES, selected: @marker.item_type )
74
- .col-md-4
74
+ .col.s4
75
75
  .field
76
76
  = f.label :ordering
77
77
  = f.text_field :ordering
78
- .col-md-4
78
+ .col.s4
79
79
  .row
80
- .col-md-3 &nbsp;
81
- .col-md-6
80
+ .col.s3 &nbsp;
81
+ .col.s6
82
82
  .row
83
- .col-md-6
83
+ .col.s6
84
84
  .field
85
85
  = f.check_box :is_active
86
86
  = f.label :is_active
87
- .col-md-6
87
+ .col.s6
88
88
  .actions
89
89
  = f.submit 'Save'
@@ -1,43 +1,53 @@
1
+ -#
2
+ -# ish_manager / newsitems / _form
3
+ -#
1
4
 
2
5
  = form_for newsitem, :html => { :multipart => true } do |f|
3
6
  .row
4
- .col-sm-6{ style: 'border-right: 1px solid red;' }
5
- %br
6
- = f.label :map
7
- = f.select :map_id, options_for_select( @maps_list, selected:( @map ? @map.id : params[:map_id] || nil ) )
8
- %br
9
- = f.label :site
10
- = f.select :site_id, options_for_select( @sites_list, :selected => ( @site ? @site.id : params[:site_id] || nil ) )
11
- %br
12
- = f.label :city
13
- = f.select :city_id, options_for_select( @cities_list, :selected => ( @city ? @city.id : params[:city_id] || nil ) )
14
- %br
15
- = f.label :tag
16
- = f.select :tag_id, options_for_select( @tags_list, selected:( @tag ? @tag.id : params[:tag_id] || nil ) )
17
- %br
18
- = f.label :user_profile
19
- = f.select :user_profile_id, options_for_select( @user_profiles_list, selected: ( @user_profile ? @user_profile.id : params[:user_profile_id] || nil ) )
20
7
 
21
- .col-sm-6
22
- = f.label :name
23
- = f.text_field :name
24
- = f.label :descr
25
- = f.text_area :descr, :class => :tinymce
26
- = label_tag :photo
27
- = file_field_tag :photo
8
+ .col.s6
9
+ .field
10
+ = f.label :name
11
+ = f.text_field :name
12
+ .field
13
+ = f.label :created_at
14
+ = f.text_field :created_at
15
+ .field
16
+ = f.label :descr
17
+ = f.text_area :descr, :class => :tinymce
18
+ .field
19
+ = label_tag :photo
20
+ = file_field_tag :photo
21
+
22
+ .col.s6
23
+ .field
24
+ = f.label :map
25
+ = f.select :map_id, options_for_select( @maps_list, selected:( newsitem[:map_id] || params[:map_id] ) )
26
+ .field
27
+ = f.label :site
28
+ = f.select :site_id, options_for_select( @sites_list, :selected => ( newsitem[:site_id] || params[:site_id] ) )
29
+ .field
30
+ = f.label :city
31
+ = f.select :city_id, options_for_select( @cities_list, :selected => ( newsitem[:city_id] || params[:city_id] ) )
32
+ -# @TODO: tags must be multi-select, not 1x1
33
+ .field
34
+ = f.label :user_profile
35
+ = f.select :user_profile_id, options_for_select( @user_profiles_list, selected: ( newsitem[:user_profile_id] || params[:user_profile_id] ) )
36
+
37
+
28
38
  %hr
29
39
  .row
30
- .col-sm-6
31
- = f.label :video
32
- = f.select :video_id, options_for_select( @videos_list, :selected => @newsitem.video_id )
33
- .a
34
- = f.label :gallery
35
- = f.select :gallery_id, options_for_select( @galleries_list, :selected => @newsitem.gallery_id )
36
- .a
37
- = f.label :report
38
- = f.select :report_id, options_for_select( @reports_list, :selected => @newsitem.report_id )
39
- .a
40
+ .col.s6
41
+ .field
42
+ = f.label :video
43
+ = f.select :video_id, options_for_select( @videos_list, :selected => @newsitem.video_id )
44
+ .field
45
+ = f.label :gallery
46
+ = f.select :gallery_id, options_for_select( @galleries_list, :selected => @newsitem.gallery_id )
47
+ .field
48
+ = f.label :report
49
+ = f.select :report_id, options_for_select( @reports_list, :selected => @newsitem.report_id )
40
50
 
41
- .a
42
- = f.submit :submit
51
+ .col.s6
52
+ = f.submit :submit
43
53
 
@@ -1,38 +1,27 @@
1
-
2
- - if defined? site
3
- - edit_url = ->(n) { edit_site_newsitem_path( site, n ) }
4
- - delete_url = ->(n) { site_newsitem_path( site, n ) }
5
- - new_newsitem = new_site_newsitem_path( site.id )
6
- - if defined? city
7
- - edit_url = ->(n) { edit_city_newsitem_path( city, n ) }
8
- - delete_url = ->(n) { city_newsitem_path( city, n ) }
9
- - new_newsitem = new_city_newsitem_path( city.id )
10
- - if defined?( tag ) && tag.class.name == 'Tag'
11
- - edit_url = ->(n) { edit_tag_newsitem_path( tag, n ) }
12
- - delete_url = ->(n) { tag_newsitem_path( tag, n ) }
13
- - new_newsitem = new_tag_newsitem_path( tag.id )
1
+ -#
2
+ -# ish_manager / newsitems / _index
3
+ -#
14
4
 
15
5
  - newsitems = newsitems.page( params[:newsitems_page] ).per( 10 )
16
6
 
17
7
  .manager-newsitems--index
18
- .row
19
- .col-sm-12
20
- %h5 Newsitems (#{newsitems.count}) #{link_to image_new, new_newsitem }
21
- = paginate newsitems, :param_name => :newsitems_page, :views_prefix => 'ish_manager'
22
- - newsitems.each do |n|
23
- .panel
24
- .panel-body
25
- %ul
26
- %li
27
- .float-left= link_to '[~]', edit_url.call( n )
28
- .float-left= button_to '[x]', delete_url.call( n ), :method => :delete, :data => { :confirm => 'Are you sure?' }
29
- Name: #{n.name}
30
- %li Desc: #{n.descr}
31
- %li Report id: #{n.report_id}
32
- %li Gallery id: #{n.gallery_id}
33
- %li username: #{n.username}
34
- - if n.photo
35
- %li Photo id: #{n.photo.id}
36
- = render 'ish_manager/newsitems/item', :newsitem => n
37
- = paginate newsitems, :param_name => :newsitems_page, :views_prefix => 'ish_manager'
38
- %hr
8
+ %h5 Newsitems (#{newsitems.count}) #{link_to image_new, new_newsitem_path }
9
+ = paginate newsitems, :param_name => :newsitems_page, :views_prefix => 'ish_manager'
10
+ - newsitems.each do |n|
11
+ .card
12
+ .card-content
13
+ %ul
14
+ %li
15
+ .float-left= link_to '[~]', edit_newsitem_path(n)
16
+ .float-left= button_to '[x]', newsitem_path( n ), :method => :delete, :data => { :confirm => 'Are you sure?' }
17
+ Name: #{n.name}
18
+ %li Desc: #{n.descr}
19
+ %li Created at: #{n.created_at}
20
+ %li Report id: #{n.report_id}
21
+ %li Gallery id: #{n.gallery_id}
22
+ %li username: #{n.username}
23
+ - if n.photo
24
+ %li Photo id: #{n.photo.id}
25
+ = render 'ish_manager/newsitems/item', :newsitem => n
26
+ = paginate newsitems, :param_name => :newsitems_page, :views_prefix => 'ish_manager'
27
+
@@ -17,12 +17,12 @@
17
17
  %li <b>Report</b> #{n.report.id}
18
18
  %li Premium Tier #{n.report.premium_tier}
19
19
  %h5
20
- = link_to n.report.name, report_path(n.report.name_seo)
20
+ = link_to n.report.name, report_path(n.report.slug)
21
21
  = link_to "[~]", edit_report_path(n.report)
22
22
  .meta
23
23
  on #{pretty_date n.report.created_at} by #{n.report.username}
24
24
  - unless n.report.photo.blank?
25
- .thumb= link_to image_tag(n.report.photo.photo.url(:thumb), :alt => ''), report_path( n.report.name_seo )
25
+ .thumb= link_to image_tag(n.report.photo.photo.url(:thumb), :alt => ''), report_path( n.report.slug )
26
26
  .subhead= n.report.subhead
27
27
  .c
28
28
 
@@ -38,7 +38,7 @@
38
38
  - unless n.gallery.tags.blank?
39
39
  = t('tags.in')
40
40
  - n.gallery.tags do |tag|
41
- = link_to tag, tag_path(tag.name_seo)
41
+ = link_to tag, tag_path(tag.slug)
42
42
  - unless 0 == n.gallery.photos.length
43
43
  .thumbnails
44
44
  - n.gallery.photos.where( :is_trash => false )[0...8].each do |photo|
@@ -4,13 +4,14 @@
4
4
  - if defined? @site
5
5
  - url = site_newsitem_path( @site, @newsitem ) if @site
6
6
 
7
- .row
8
- .small-12.columns
9
- %h1 Edit this newsitem
10
- - if @site
11
- For site: #{@site.domain} #{@site.lang} <br />
12
- - if @city
13
- For city: #{@city.name} <br />
14
- id: #{@newsitem.id}
15
-
16
- = render 'form', :newsitem => @newsitem, :url => url
7
+ .newsitems-edit
8
+ %h1 Edit Newsitem
9
+ - if @site
10
+ For site: #{@site.domain} #{@site.lang} <br />
11
+ - if @city
12
+ For city: #{@city.name} <br />
13
+
14
+ = render 'form', :newsitem => @newsitem, :url => url
15
+
16
+ .debug
17
+ = @newsitem.inspect
@@ -1,25 +1,35 @@
1
+ -#
2
+ -# ish_manager / reports / _form
3
+ -#
1
4
 
2
5
  - url ||= reports_path
3
6
  = form_for report, :url => url, :html => { :multipart => true } do |f|
4
-
5
7
  - if report.errors.any?
6
8
  #error_explanation
7
9
  %h3= t('e.there_are_errors')
8
-
9
10
  %ul
10
11
  - report.errors.full_messages.each do |msg|
11
12
  %li= msg
13
+
12
14
  .row
13
- .col-md-6
15
+ .col.s4
14
16
  .field
15
- = f.label :"Name & Name SEO"
17
+ = f.label :"Name"
16
18
  = f.text_field :name, :class=> 'form-control', :placeholder => "name of report", :type => "text"
17
- = f.text_field :name_seo, :class=> 'form-control', :placeholder => "name seo", :type => "text"
19
+ -# = f.text_field :slug, :class=> 'form-control', :placeholder => "name seo", :type => "text"
18
20
 
19
- .col-md-6
21
+ .col.s4
20
22
  .field
21
23
  = f.label :subhead
22
24
  = f.text_area :subhead, :class => 'form-control', :rows => "5", :style=> "resize: vertical;"
25
+ .field
26
+ = f.label "Item Type: default, longscroll"
27
+ = f.text_field :item_type
28
+
29
+ .col.s4
30
+ .field
31
+ = f.label :created_at
32
+ = f.text_field :created_at
23
33
 
24
34
  .field
25
35
  = f.label :Description
@@ -28,7 +38,7 @@
28
38
  %br
29
39
 
30
40
  .row
31
- .col-md-4
41
+ .col.s4
32
42
  .field
33
43
  %label City
34
44
  = select :report, :city_id, @cities_list, :class=>"btn"
@@ -36,30 +46,30 @@
36
46
  = f.label :Coordinates
37
47
  .panel.panel-default
38
48
  .panel-body
39
- .col-md-6
49
+ .col.s6
40
50
  .form-group
41
51
  %label{} X-coordinate
42
52
  = f.text_field :x, :placeholder => "x", :type => "text", :class=>"form-control"
43
53
 
44
- .col-md-6
54
+ .col.s6
45
55
  .form-group
46
56
  %label{} Y-coordinate
47
57
  = f.text_field :y, :placeholder => "y", :type => "text", :class=>"form-control"
48
- .col-sm-4
58
+ .col.s4
49
59
  .field
50
60
  = f.label :premium_tier
51
61
  = f.number_field :premium_tier
52
62
  .field
53
63
  = f.label :user_profile
54
64
  = select :report, :user_profile_id, @user_profiles_list
55
- .col-md-4
65
+ .col.s4
56
66
  unused
57
67
 
58
68
  .row
59
- .col-md-6
69
+ .col.s6
60
70
  = f.label :site
61
71
  = f.select :site_id, options_for_select(@sites_list, :selected => report.site_id || params[:site_id] )
62
- .col-md-6
72
+ .col.s6
63
73
  = f.label :tags
64
74
  = f.select :tag_ids, @tags_list, {}, { multiple: true }
65
75
 
@@ -68,7 +78,7 @@
68
78
  %h3.panel-title Upload File
69
79
  .panel-body
70
80
  .row
71
- .col-md-6.col-md-offset-3
81
+ .col.s6.col.soffset-3
72
82
  %button.btn.btn-primary.btn-lg.btn-block{:type => "button", :onClick => "upload()"} Upload File
73
83
  = file_field_tag :photo, :style => "display:none", :id=>"photo"
74
84
  .div.center
@@ -8,7 +8,7 @@
8
8
 
9
9
  .manager-reports--index
10
10
  .row
11
- .col-sm-12
11
+ .col.s12
12
12
  %h5
13
13
  Reports (#{reports.length})
14
14
  = link_to image_new, new_path
@@ -1,6 +1,6 @@
1
1
 
2
2
  .row
3
- .col-sm-12
3
+ .col.s12
4
4
  %h1
5
5
  %strong New Report
6
6
  = render 'ish_manager/reports/form', :report => @report