ish_manager 0.1.8.253 → 0.1.8.257
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/images/bg/confectionary.png +0 -0
- data/app/assets/images/bg/gplaypattern.png +0 -0
- data/app/assets/images/bg/triangular.png +0 -0
- data/app/assets/images/bg/weather.png +0 -0
- data/app/assets/images/favicon.gif +0 -0
- data/app/assets/images/icons/10x10_red-cross.png +0 -0
- data/app/assets/images/icons/20x20/private.png +0 -0
- data/app/assets/images/icons/20x20/public2.png +0 -0
- data/app/assets/images/missing.png +0 -0
- data/app/assets/images/ui-icons_444444_256x240.png +0 -0
- data/app/assets/images/ui-icons_555555_256x240.png +0 -0
- data/app/assets/images/ui-icons_777620_256x240.png +0 -0
- data/app/assets/images/ui-icons_777777_256x240.png +0 -0
- data/app/assets/images/ui-icons_cc0000_256x240.png +0 -0
- data/app/assets/images/ui-icons_ffffff_256x240.png +0 -0
- data/app/assets/images/wait.gif +0 -0
- data/app/assets/javascripts/ish_manager/bootstrap.min.js +1 -1
- data/app/assets/javascripts/ish_manager/jquery-ui-1.12.1/images/ui-icons_444444_256x240.png +0 -0
- data/app/assets/javascripts/ish_manager/jquery-ui-1.12.1/images/ui-icons_555555_256x240.png +0 -0
- data/app/assets/javascripts/ish_manager/jquery-ui-1.12.1/images/ui-icons_777620_256x240.png +0 -0
- data/app/assets/javascripts/ish_manager/jquery-ui-1.12.1/images/ui-icons_777777_256x240.png +0 -0
- data/app/assets/javascripts/ish_manager/jquery-ui-1.12.1/images/ui-icons_cc0000_256x240.png +0 -0
- data/app/assets/javascripts/ish_manager/jquery-ui-1.12.1/images/ui-icons_ffffff_256x240.png +0 -0
- data/app/assets/javascripts/ish_manager/jquery-ui-1.12.1/jquery-ui.js +1 -1
- data/app/assets/javascripts/ish_manager/jquery-ui-1.12.1/jquery-ui.min.css +1 -1
- data/app/assets/javascripts/ish_manager/jquery-ui-1.12.1/jquery-ui.min.js +1 -1
- data/app/assets/javascripts/ish_manager/jquery-ui-1.12.1/jquery-ui.structure.min.css +1 -1
- data/app/assets/javascripts/ish_manager/jquery-ui-1.12.1/jquery-ui.theme.min.css +1 -1
- data/app/assets/javascripts/ish_manager/jquery-ui-1.12.1.zip +0 -0
- data/app/assets/javascripts/ish_manager/jquery-ui.min.js +1 -1
- data/app/assets/javascripts/ish_manager/shared.js +1 -1
- data/app/assets/stylesheets/ish_manager/application.scss +13 -1
- data/app/assets/stylesheets/ish_manager/maps.scss +9 -1
- data/app/assets/stylesheets/ish_manager/reset.css +1 -1
- data/app/assets/stylesheets/ish_manager/trash/bootstrap.min.css +1 -1
- data/app/assets/stylesheets/ish_manager/trash/bootstrap.min.css.map +1 -1
- data/app/assets/stylesheets/ish_manager/user_profiles.scss +1 -1
- data/app/assets/stylesheets/ish_manager/utils.scss +3 -3
- data/app/assets/stylesheets/ish_manager/videos.scss +11 -0
- data/app/controllers/ish_manager/application_controller.rb +1 -0
- data/app/controllers/ish_manager/galleries_controller.rb +64 -66
- data/app/controllers/ish_manager/maps_controller.rb +2 -0
- data/app/controllers/ish_manager/markers_controller.rb +1 -7
- data/app/controllers/ish_manager/photos_controller.rb +4 -4
- data/app/controllers/ish_manager/user_profiles_controller.rb +11 -1
- data/app/mailers/ish_manager/application_mailer.rb +1 -1
- data/app/views/ish_manager/galleries/_form.haml +2 -2
- data/app/views/ish_manager/galleries/_index.haml +3 -4
- data/app/views/ish_manager/galleries/_title.haml +1 -1
- data/app/views/ish_manager/maps/_form.haml +12 -5
- data/app/views/ish_manager/maps/_index_item.haml +5 -4
- data/app/views/ish_manager/maps/_map_meta_row.haml +10 -8
- data/app/views/ish_manager/maps/edit.haml +2 -1
- data/app/views/ish_manager/newsitems/_item.haml +3 -3
- data/app/views/ish_manager/photos/_meta.haml +1 -1
- data/app/views/ish_manager/user_profiles/_form.haml +42 -29
- data/app/views/ish_manager/user_profiles/index.haml +12 -6
- data/app/views/ish_manager/videos/_embed.erb +1 -1
- data/app/views/ish_manager/videos/_index.haml +24 -25
- data/lib/ish_manager.rb +1 -1
- metadata +3 -2
@@ -14,13 +14,13 @@ ul:not(.browser-default).bullets, {
|
|
14
14
|
align-content: flex-start;
|
15
15
|
|
16
16
|
height: 3em;
|
17
|
-
line-height: 3em;
|
17
|
+
line-height: 3em;
|
18
18
|
|
19
19
|
width: 100%;
|
20
|
-
margin: 0 0
|
20
|
+
margin: 1em 0 0 0;
|
21
21
|
padding: 0;
|
22
22
|
|
23
23
|
> * {
|
24
24
|
padding-right: 1em;
|
25
25
|
}
|
26
|
-
}
|
26
|
+
}
|
@@ -2,33 +2,7 @@ class IshManager::GalleriesController < IshManager::ApplicationController
|
|
2
2
|
|
3
3
|
before_action :set_lists
|
4
4
|
|
5
|
-
|
6
|
-
authorize! :index, Gallery
|
7
|
-
@galleries = Gallery.unscoped.where( :is_done.in => [false, nil], :is_trash.in => [false, nil],
|
8
|
-
:user_profile => current_user.profile ).order_by( :created_at => :desc )
|
9
|
-
if params[:q]
|
10
|
-
@galleries = @galleries.where({ :name => /#{params[:q]}/i })
|
11
|
-
@galleries.selector.delete('is_done')
|
12
|
-
end
|
13
|
-
@galleries = @galleries.page( params[:galleries_page] ).per( 10 )
|
14
|
-
|
15
|
-
render params[:render_type]
|
16
|
-
end
|
17
|
-
|
18
|
-
def shared_with_me
|
19
|
-
authorize! :index, Gallery
|
20
|
-
@galleries = current_user.profile.shared_galleries.unscoped.where( :is_trash => false
|
21
|
-
).order_by( :created_at => :desc
|
22
|
-
).page( params[:shared_galleries_page] ).per( 10 )
|
23
|
-
render params[:render_type]
|
24
|
-
end
|
25
|
-
|
26
|
-
def new
|
27
|
-
@gallery = Gallery.new
|
28
|
-
authorize! :new, @gallery
|
29
|
-
@cities_list = City.list
|
30
|
-
@tags_list = Tag.list
|
31
|
-
end
|
5
|
+
# alphabetized! : )
|
32
6
|
|
33
7
|
def create
|
34
8
|
params[:gallery][:shared_profiles] ||= []
|
@@ -45,18 +19,78 @@ class IshManager::GalleriesController < IshManager::ApplicationController
|
|
45
19
|
redirect_to edit_gallery_path(@gallery)
|
46
20
|
else
|
47
21
|
puts! @gallery.errors.messages
|
48
|
-
flash[:alert] =
|
49
|
-
@cities_list = City.list
|
50
|
-
@tags_list = Tag.list
|
22
|
+
flash[:alert] = "Cannot create the gallery: #{@gallery.errors.full_messages}"
|
51
23
|
render :action => 'new'
|
52
24
|
end
|
53
25
|
end
|
54
26
|
|
27
|
+
def destroy
|
28
|
+
@gallery = Gallery.unscoped.find params[:id]
|
29
|
+
authorize! :destroy, @gallery
|
30
|
+
@gallery.is_trash = true
|
31
|
+
@gallery.save
|
32
|
+
flash[:notice] = 'Logically deleted gallery.'
|
33
|
+
redirect_to galleries_path
|
34
|
+
end
|
35
|
+
|
55
36
|
def edit
|
56
37
|
@gallery = Gallery.unscoped.find params[:id]
|
57
38
|
authorize! :edit, @gallery
|
58
39
|
end
|
59
40
|
|
41
|
+
def index
|
42
|
+
authorize! :index, Gallery
|
43
|
+
@galleries = Gallery.unscoped.where( :is_done.in => [false, nil], :is_trash.in => [false, nil],
|
44
|
+
:user_profile => current_user.profile ).order_by( :created_at => :desc )
|
45
|
+
if params[:q]
|
46
|
+
@galleries = @galleries.where({ :name => /#{params[:q]}/i })
|
47
|
+
@galleries.selector.delete('is_done')
|
48
|
+
end
|
49
|
+
@galleries = @galleries.page( params[:galleries_page] ).per( 10 )
|
50
|
+
|
51
|
+
render params[:render_type]
|
52
|
+
end
|
53
|
+
|
54
|
+
def j_show
|
55
|
+
@gallery = Gallery.unscoped.find( params[:id] )
|
56
|
+
authorize! :show, @gallery
|
57
|
+
respond_to do |format|
|
58
|
+
format.json do
|
59
|
+
jjj = {}
|
60
|
+
jjj[:photos] = @gallery.photos.map do |ph|
|
61
|
+
{ :thumbnail_url => ph.photo.url( :thumb ),
|
62
|
+
:delete_type => 'DELETE',
|
63
|
+
:delete_url => photo_path(ph) }
|
64
|
+
end
|
65
|
+
render :json => jjj
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
def new
|
71
|
+
@gallery = Gallery.new
|
72
|
+
authorize! :new, @gallery
|
73
|
+
end
|
74
|
+
|
75
|
+
def shared_with_me
|
76
|
+
authorize! :index, Gallery
|
77
|
+
@galleries = current_user.profile.shared_galleries.unscoped.where( :is_trash => false
|
78
|
+
).order_by( :created_at => :desc
|
79
|
+
).page( params[:shared_galleries_page] ).per( 10 )
|
80
|
+
render params[:render_type]
|
81
|
+
end
|
82
|
+
|
83
|
+
def show
|
84
|
+
begin
|
85
|
+
@gallery = Gallery.unscoped.find_by :slug => params[:id]
|
86
|
+
rescue
|
87
|
+
@gallery = Gallery.unscoped.find params[:id]
|
88
|
+
end
|
89
|
+
authorize! :show, @gallery
|
90
|
+
@photos = @gallery.photos.unscoped.where({ :is_trash => false })
|
91
|
+
@deleted_photos = @gallery.photos.unscoped.where({ :is_trash => true })
|
92
|
+
end
|
93
|
+
|
60
94
|
def update
|
61
95
|
@gallery = Gallery.unscoped.find params[:id]
|
62
96
|
old_shared_profile_ids = @gallery.shared_profiles.map(&:id)
|
@@ -81,41 +115,5 @@ class IshManager::GalleriesController < IshManager::ApplicationController
|
|
81
115
|
end
|
82
116
|
end
|
83
117
|
|
84
|
-
def show
|
85
|
-
begin
|
86
|
-
@gallery = Gallery.unscoped.find_by :galleryname => params[:id]
|
87
|
-
rescue
|
88
|
-
@gallery = Gallery.unscoped.find params[:id]
|
89
|
-
end
|
90
|
-
authorize! :show, @gallery
|
91
|
-
@photos = @gallery.photos.unscoped.where({ :is_trash => false })
|
92
|
-
@deleted_photos = @gallery.photos.unscoped.where({ :is_trash => true })
|
93
|
-
end
|
94
|
-
|
95
|
-
def destroy
|
96
|
-
@gallery = Gallery.unscoped.find params[:id]
|
97
|
-
authorize! :destroy, @gallery
|
98
|
-
@gallery.is_trash = true
|
99
|
-
@gallery.save
|
100
|
-
flash[:notice] = 'Logically deleted gallery.'
|
101
|
-
redirect_to galleries_path
|
102
|
-
end
|
103
|
-
|
104
|
-
def j_show
|
105
|
-
@gallery = Gallery.unscoped.find( params[:id] )
|
106
|
-
authorize! :show, @gallery
|
107
|
-
respond_to do |format|
|
108
|
-
format.json do
|
109
|
-
jjj = {}
|
110
|
-
jjj[:photos] = @gallery.photos.map do |ph|
|
111
|
-
{ :thumbnail_url => ph.photo.url( :thumb ),
|
112
|
-
:delete_type => 'DELETE',
|
113
|
-
:delete_url => photo_path(ph) }
|
114
|
-
end
|
115
|
-
render :json => jjj
|
116
|
-
end
|
117
|
-
end
|
118
|
-
end
|
119
|
-
|
120
118
|
end
|
121
119
|
|
@@ -54,6 +54,8 @@ class IshManager::MapsController < IshManager::ApplicationController
|
|
54
54
|
@map.image = image
|
55
55
|
end
|
56
56
|
|
57
|
+
@map.config = JSON.parse map_params[:config]
|
58
|
+
|
57
59
|
respond_to do |format|
|
58
60
|
if map_params[:parent_slug].present?
|
59
61
|
@map.parent = ::Gameui::Map.find_by({ slug: map_params[:parent_slug] })
|
@@ -4,12 +4,6 @@ class IshManager::MarkersController < IshManager::ApplicationController
|
|
4
4
|
before_action :set_map, except: [ :destroy, :edit, :update ]
|
5
5
|
before_action :set_marker, only: [ :edit, :update ]
|
6
6
|
|
7
|
-
=begin
|
8
|
-
def index
|
9
|
-
authorize! :markers, ::Gameui::Map
|
10
|
-
end
|
11
|
-
=end
|
12
|
-
|
13
7
|
def new
|
14
8
|
authorize! :new_marker, ::Gameui::Map
|
15
9
|
@marker = ::Gameui::Marker.new
|
@@ -59,7 +53,7 @@ class IshManager::MarkersController < IshManager::ApplicationController
|
|
59
53
|
respond_to do |format|
|
60
54
|
if @marker.update(marker_params)
|
61
55
|
@marker.map.touch
|
62
|
-
format.html { redirect_to
|
56
|
+
format.html { redirect_to location_map_editor_path(@map.id), notice: 'Marker was successfully updated.' }
|
63
57
|
else
|
64
58
|
format.html { render :edit }
|
65
59
|
end
|
@@ -30,12 +30,12 @@ class IshManager::PhotosController < IshManager::ApplicationController
|
|
30
30
|
|
31
31
|
def j_create
|
32
32
|
# find this gallery
|
33
|
-
if params[:
|
34
|
-
gallery = Gallery.unscoped.where( :
|
35
|
-
gallery ||= Gallery.unscoped.find params[:
|
33
|
+
if params[:slug]
|
34
|
+
gallery = Gallery.unscoped.where( :slug => params[:slug] ).first
|
35
|
+
gallery ||= Gallery.unscoped.find params[:slug]
|
36
36
|
elsif params[:gallery_id] # this one, let's normalize on id everywhere in manager.
|
37
37
|
gallery = Gallery.unscoped.find( params[:gallery_id] )
|
38
|
-
gallery ||= Gallery.unscoped.where( :
|
38
|
+
gallery ||= Gallery.unscoped.where( :slug => params[:gallery_id] ).first
|
39
39
|
end
|
40
40
|
authorize! :create_photo, gallery
|
41
41
|
|
@@ -6,7 +6,6 @@ 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'
|
10
9
|
end
|
11
10
|
|
12
11
|
def show
|
@@ -23,6 +22,11 @@ class IshManager::UserProfilesController < IshManager::ApplicationController
|
|
23
22
|
@profile = IshModels::UserProfile.find params[:id]
|
24
23
|
authorize! :update, @profile
|
25
24
|
|
25
|
+
if params[:photo]
|
26
|
+
photo = Photo.new :photo => params[:photo]
|
27
|
+
@profile.profile_photo = photo
|
28
|
+
end
|
29
|
+
|
26
30
|
flag = @profile.update_attributes params[:profile].permit!
|
27
31
|
|
28
32
|
if flag
|
@@ -47,6 +51,12 @@ class IshManager::UserProfilesController < IshManager::ApplicationController
|
|
47
51
|
@user.password ||= (0...12).map { rand(100) }.join
|
48
52
|
@user.profile = IshModels::UserProfile.new params[:profile].permit!
|
49
53
|
authorize! :create, @user.profile
|
54
|
+
|
55
|
+
if params[:photo]
|
56
|
+
photo = Photo.new :photo => params[:photo]
|
57
|
+
@profile.profile_photo = photo
|
58
|
+
end
|
59
|
+
|
50
60
|
if !@user.save
|
51
61
|
raise "cannot save profile.user: #{@profile.user.errors.full_messages} profile errors: #{@profile.errors.full_messages}"
|
52
62
|
end
|
@@ -20,7 +20,7 @@ module IshManager
|
|
20
20
|
@gallery = gallery
|
21
21
|
@domain = Rails.application.config.action_mailer.default_url_options[:host]
|
22
22
|
@galleries_path = IshManager::Engine.routes.url_helpers.galleries_path
|
23
|
-
@gallery_path = IshManager::Engine.routes.url_helpers.gallery_path(@gallery.
|
23
|
+
@gallery_path = IshManager::Engine.routes.url_helpers.gallery_path(@gallery.slug)
|
24
24
|
mail( :to => '314658@gmail.com',
|
25
25
|
:bcc => profiles.map { |p| p.email },
|
26
26
|
:subject => 'You got new shared galleries on pi manager' ).deliver
|
@@ -17,16 +17,15 @@
|
|
17
17
|
.panel-body
|
18
18
|
%h3
|
19
19
|
= link_to '[~]', edit_gallery_path( g )
|
20
|
-
= link_to g.name, gallery_path(g.
|
20
|
+
= link_to g.name, gallery_path(g.slug)
|
21
|
+
(#{g.photos.length})
|
21
22
|
= render 'meta', :item => g
|
22
|
-
|
23
|
-
-# = render 'meta', :item => g
|
24
23
|
- if g.photos.length == 0
|
25
24
|
= image_missing
|
26
25
|
- else
|
27
26
|
.thumbnails
|
28
27
|
- g.photos.limit( n_thumbs ).each do |photo|
|
29
|
-
= link_to image_tag(photo.photo.url(:thumb), :alt => g.name), gallery_path(g.
|
28
|
+
= link_to image_tag(photo.photo.url(:thumb), :alt => g.name), gallery_path(g.slug)
|
30
29
|
|
31
30
|
- if @galleries.respond_to? :total_pages
|
32
31
|
= paginate @galleries, :param_name => param_name, :views_prefix => 'ish_manager'
|
@@ -44,11 +44,18 @@
|
|
44
44
|
|
45
45
|
.row
|
46
46
|
.col.s6
|
47
|
-
= f.label
|
48
|
-
= f.text_area :labels
|
47
|
+
= f.label "Labels"
|
48
|
+
= f.text_area :labels, class: 'large'
|
49
|
+
%pre.small
|
50
|
+
description
|
51
|
+
map
|
52
|
+
markers
|
53
|
+
newsitems
|
49
54
|
.col.s6
|
50
|
-
= f.label
|
51
|
-
= f.text_area :config
|
52
|
-
|
55
|
+
= f.label "Config"
|
56
|
+
= f.text_area :config, class: 'large'
|
57
|
+
%pre.small
|
58
|
+
description.collapsible: bool
|
59
|
+
map_panel_type: "MapPanel" | "MapPanelNoZoom" | "ThreePanelV1"
|
53
60
|
.actions
|
54
61
|
= f.submit 'Save'
|
@@ -1,7 +1,8 @@
|
|
1
1
|
|
2
2
|
.item{ style: "display: flex; flex-direction: column;" }
|
3
3
|
= render 'map_meta_row', map: map
|
4
|
-
|
5
|
-
-
|
6
|
-
|
7
|
-
|
4
|
+
- if map.childs.length > 0
|
5
|
+
%ul{ style: "margin-left: 5em;" }
|
6
|
+
- map.childs.each do |m|
|
7
|
+
%li
|
8
|
+
= render 'index_item', map: m
|
@@ -1,9 +1,11 @@
|
|
1
1
|
|
2
|
-
.
|
3
|
-
.
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
2
|
+
.maps--map-meta-row
|
3
|
+
.flat-row
|
4
|
+
.a= link_to map.name, map_path(map)
|
5
|
+
.a= button_to '~', edit_map_path(map), method: :get
|
6
|
+
.a= button_to 'map editor', location_map_editor_path(map.id), method: :get
|
7
|
+
.a= button_to '+marker', new_map_marker_path(map), method: :get
|
8
|
+
.a= button_to '+newsitem', new_map_newsitem_path(map), method: :get
|
9
|
+
.a= link_to '[api]', api_map_path(map)
|
10
|
+
.a= button_to 'x', map_path(map), method: :delete, data: { confirm: 'Are you sure?' }
|
11
|
+
.a= map.slug
|
@@ -8,7 +8,7 @@
|
|
8
8
|
- if n.photo.gallery.blank?
|
9
9
|
= link_to image_tag( n.photo.photo.url(:small) ), n.photo.photo.url(:large), :rel => 'lightbox[newsitem]'
|
10
10
|
- else
|
11
|
-
= link_to image_tag( n.photo.photo.url(:small) ), gallery_path( n.photo.gallery.
|
11
|
+
= link_to image_tag( n.photo.photo.url(:small) ), gallery_path( n.photo.gallery.slug, n.photo.gallery.photos.index(n.photo) )
|
12
12
|
.meta= render 'ish_manager/photos/meta', :photo => n.photo
|
13
13
|
|
14
14
|
- if n.report
|
@@ -29,7 +29,7 @@
|
|
29
29
|
- if !n.gallery.blank?
|
30
30
|
.Ngallery
|
31
31
|
|
32
|
-
%h3= link_to n.gallery.name, gallery_path(n.gallery.
|
32
|
+
%h3= link_to n.gallery.name, gallery_path(n.gallery.slug, 0)
|
33
33
|
.meta
|
34
34
|
#{t('newsitems.gallery', :username => n.gallery.username, :date => pretty_date(n.gallery.created_at))}
|
35
35
|
- unless n.gallery.city.blank?
|
@@ -42,7 +42,7 @@
|
|
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|
|
45
|
-
= link_to image_tag( photo.photo.url(:thumb), :alt => photo.name ), photo.photo.url(:small), :rel => "lightbox[#{n.gallery.
|
45
|
+
= link_to image_tag( photo.photo.url(:thumb), :alt => photo.name ), photo.photo.url(:small), :rel => "lightbox[#{n.gallery.slug}]"
|
46
46
|
.c
|
47
47
|
|
48
48
|
- if n.video_id
|
@@ -5,5 +5,5 @@
|
|
5
5
|
- unless photo.user.blank?
|
6
6
|
By #{ link_to photo.user.username, user_path(photo.user.username) }
|
7
7
|
- unless photo.gallery.blank?
|
8
|
-
In #{ link_to photo.gallery.name, gallery_path(photo.gallery.
|
8
|
+
In #{ link_to photo.gallery.name, gallery_path(photo.gallery.slug, 0) }
|
9
9
|
= photo.name unless photo.name.blank?
|
@@ -1,34 +1,47 @@
|
|
1
|
+
-#
|
2
|
+
-# ish_manager / user_profiles / _form
|
3
|
+
-#
|
1
4
|
|
2
5
|
- url = profile.persisted? ? profile_path( profile.id ) : profiles_path
|
3
6
|
|
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
|
-
|
7
|
+
.row
|
8
|
+
.col.s6
|
9
|
+
= form_for profile, :html => { :multipart => true }, :as => :profile, :url => url do |f|
|
10
|
+
.input-field
|
11
|
+
%label name
|
12
|
+
= f.text_field :name
|
13
|
+
|
14
|
+
.input-field
|
15
|
+
%label email
|
16
|
+
= f.text_field :email
|
17
|
+
|
18
|
+
.input-field
|
19
|
+
%label Change profile pic
|
20
|
+
%br
|
21
|
+
= file_field_tag :photo
|
22
|
+
= image_tag profile.profile_photo.photo.url(:thumb) rescue nil
|
23
|
+
%br
|
24
|
+
%br
|
25
|
+
|
26
|
+
.input-field
|
27
|
+
= f.select :role_name, options_for_select( [[nil, nil]] + IshModels::UserProfile::ROLES.map { |r| [ r, r ] }, :selected => profile.role_name )
|
28
|
+
%label role name
|
29
|
+
|
30
|
+
.input-field
|
31
|
+
= f.select :current_city, options_for_select( @cities_list, :selected => profile.current_city_id )
|
32
|
+
%label City
|
33
|
+
|
34
|
+
.input-field
|
35
|
+
= f.label :fb_access_token
|
36
|
+
= f.text_field :fb_access_token
|
37
|
+
.input-field
|
38
|
+
= f.label :fb_long_access_token
|
39
|
+
= f.text_field :fb_long_access_token
|
40
|
+
|
41
|
+
.input-field
|
42
|
+
= f.select :bookmarked_location_ids, options_for_select( @locations_list, selected: profile.bookmarked_location_ids), {}, { multiple: true }
|
43
|
+
%label Bookmarked Locations
|
44
|
+
|
45
|
+
= f.submit 'Save', :class => %w(button)
|
33
46
|
|
34
47
|
|
@@ -1,3 +1,6 @@
|
|
1
|
+
-#
|
2
|
+
-# ish_manager / user_profiles / index
|
3
|
+
-#
|
1
4
|
|
2
5
|
%h5
|
3
6
|
User Profiles (#{@user_profiles.count})
|
@@ -17,10 +20,15 @@
|
|
17
20
|
%li <b>Role:</b> #{profile.role_name}
|
18
21
|
%li <b>User.email:</b> #{profile.user ? profile.user.email : nil}
|
19
22
|
%li <b>City:</b> #{profile.current_city ? profile.current_city.name : nil}
|
23
|
+
%li
|
24
|
+
<b>Profile Photo:</b>
|
25
|
+
= image_tag profile.profile_photo.photo.url(:thumb) rescue nil
|
26
|
+
%li <b>Address:</b> #{profile.addresses[0].inspect}
|
27
|
+
|
20
28
|
.col.s8
|
21
29
|
%h5 Shared galleries
|
22
30
|
- profile.shared_galleries.unscoped.where( :is_trash => false ).each do |g|
|
23
|
-
> #{link_to g.name, gallery_path(g.
|
31
|
+
> #{link_to g.name, gallery_path(g.slug)} <br />
|
24
32
|
= render 'meta', :item => g
|
25
33
|
<hr />
|
26
34
|
|
@@ -29,12 +37,10 @@
|
|
29
37
|
= render 'ish_manager/newsitems/item', n: n, profile_id: profile.id
|
30
38
|
<hr />
|
31
39
|
|
32
|
-
%h5 Bookmarked Locations
|
33
|
-
%ul
|
40
|
+
%h5 Bookmarked Locations (#{profile.bookmarked_locations.length})
|
41
|
+
%ul.browser-default
|
34
42
|
- profile.bookmarked_locations.each do |n|
|
35
43
|
%li
|
36
44
|
= n.slug
|
37
45
|
|
38
|
-
|
39
|
-
Address:
|
40
|
-
= profile.addresses[0].inspect
|
46
|
+
|
@@ -1,34 +1,33 @@
|
|
1
1
|
|
2
2
|
- videos ||= @videos
|
3
3
|
|
4
|
-
.
|
5
|
-
.col.s12
|
6
|
-
%h5
|
7
|
-
Videos (#{videos.count})
|
8
|
-
= link_to '[+]', new_video_path
|
9
|
-
%br
|
4
|
+
.videos--index
|
10
5
|
|
11
|
-
|
6
|
+
%h5
|
7
|
+
Videos (#{videos.count})
|
8
|
+
= link_to '[+]', new_video_path
|
12
9
|
|
10
|
+
= paginate videos, :param_name => :videos_page, :views_prefix => 'ish_manager'
|
11
|
+
|
12
|
+
.row
|
13
13
|
- videos.each do |video|
|
14
|
-
.
|
15
|
-
.panel
|
16
|
-
.
|
17
|
-
.
|
18
|
-
.
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
.
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
.c
|
14
|
+
.col.s6
|
15
|
+
.item.panel
|
16
|
+
.panel-content
|
17
|
+
.float-left
|
18
|
+
- if video.youtube_id.present?
|
19
|
+
-## doesn't work with private videos, which are most
|
20
|
+
-# .thumb-youtube= image_tag "https://img.youtube.com/vi/#{video.youtube_id}/1.jpg"
|
21
|
+
= render 'ish_manager/videos/embed_mini', video: video
|
22
|
+
- else
|
23
|
+
.thumb= image_tag video.thumb.url(:thumb)
|
24
|
+
.a
|
25
|
+
= link_to video.name, video_path( video )
|
26
|
+
.inline= button_to '[x]', video_path( video ), :method => :delete, :data => { :confirm => 'Are you sure?' }
|
27
|
+
= link_to '[~]', edit_video_path( video )
|
28
|
+
= render 'meta', :item => video
|
29
|
+
.c
|
31
30
|
|
32
|
-
|
31
|
+
= paginate videos, :param_name => :videos_page, :views_prefix => 'ish_manager'
|
33
32
|
%hr
|
34
33
|
|
data/lib/ish_manager.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ish_manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.8.
|
4
|
+
version: 0.1.8.257
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -190,6 +190,7 @@ files:
|
|
190
190
|
- app/assets/stylesheets/ish_manager/trash/bootstrap.min.css.map
|
191
191
|
- app/assets/stylesheets/ish_manager/user_profiles.scss
|
192
192
|
- app/assets/stylesheets/ish_manager/utils.scss
|
193
|
+
- app/assets/stylesheets/ish_manager/videos.scss
|
193
194
|
- app/controllers/ish_manager/application_controller.rb
|
194
195
|
- app/controllers/ish_manager/campaigns_controller.rb
|
195
196
|
- app/controllers/ish_manager/cities_controller.rb
|