ish_manager 0.1.8.68 → 0.1.8.69
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -1
- data/Rakefile +6 -4
- data/app/assets/javascripts/ish_manager/application.js +45 -3
- data/app/assets/stylesheets/ish_manager/application.css +8 -1
- data/app/controllers/ish_manager/application_controller.rb +2 -2
- data/app/controllers/ish_manager/friends_controller.rb +23 -0
- data/app/controllers/ish_manager/galleries_controller.rb +13 -3
- data/app/controllers/ish_manager/leads_controller.rb +39 -0
- data/app/controllers/ish_manager/photos_controller.rb +4 -4
- data/app/controllers/ish_manager/user_profiles_controller.rb +3 -1
- data/app/mailers/ish_manager/application_mailer.rb +10 -0
- data/app/models/ish_manager/ability.rb +12 -4
- data/app/views/ish_manager/application/_analytics.html +9 -0
- data/app/views/ish_manager/application/_main_footer.haml +24 -22
- data/app/views/ish_manager/application/_main_header.haml +24 -20
- data/app/views/ish_manager/application_mailer/shared_galleries.html.erb +9 -0
- data/app/views/ish_manager/friends/index.haml +16 -0
- data/app/views/ish_manager/galleries/_form.haml +2 -2
- data/app/views/ish_manager/galleries/_list.haml +3 -2
- data/app/views/ish_manager/galleries/index.haml +8 -2
- data/app/views/ish_manager/leads/_form.haml +19 -0
- data/app/views/ish_manager/leads/index.haml +18 -0
- data/app/views/ish_manager/leads/new.haml +5 -0
- data/app/views/ish_manager/user_profiles/new.haml +1 -0
- data/app/views/layouts/ish_manager/application.haml +3 -1
- data/config/routes.rb +5 -1
- data/lib/tasks/migrate.rake +19 -0
- metadata +11 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba39cadec19bfb3e61b3056ad802e03285ff93c9
|
4
|
+
data.tar.gz: 60121629ee55411fcf65c061d676a43d553f6d88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fce67a4a32ec81691072f17852010e302659ac7acf8a4832a3efe420d68343ef6e2dc3387660df32709b1bccb35dc96baa93f6318365e5d2ac75de6dcdd03419
|
7
|
+
data.tar.gz: d5a2b4f3c847a3082c55cb466345b1c61b2399e24c45921c73e5f33fd86e03ecca627782549fb9c6ae22154d8ab2409f099277fdc8148605000f944df469b90d
|
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
|
1
2
|
begin
|
2
3
|
require 'bundler/setup'
|
3
4
|
rescue LoadError
|
@@ -17,23 +18,24 @@ end
|
|
17
18
|
APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
|
18
19
|
load 'rails/tasks/engine.rake'
|
19
20
|
|
20
|
-
|
21
21
|
load 'rails/tasks/statistics.rake'
|
22
22
|
|
23
23
|
require 'bundler/gem_tasks'
|
24
24
|
|
25
|
+
=begin
|
25
26
|
require 'rake/testtask'
|
26
|
-
|
27
27
|
Rake::TestTask.new(:test) do |t|
|
28
28
|
t.libs << 'test'
|
29
29
|
t.pattern = 'test/**/*_test.rb'
|
30
30
|
t.verbose = false
|
31
31
|
end
|
32
|
+
=end
|
32
33
|
|
34
|
+
=begin
|
33
35
|
require 'rspec/core/rake_task'
|
34
|
-
|
35
36
|
RSpec::Core::RakeTask.new( :spec ) do |task|
|
36
37
|
task.pattern = "spec/controllers/ish_manager/galleries_controller_spec.rb"
|
37
38
|
end
|
39
|
+
=end
|
38
40
|
|
39
|
-
task :default => :spec
|
41
|
+
# task :default => :spec
|
@@ -41,11 +41,53 @@ $(document).ready(function () {
|
|
41
41
|
});
|
42
42
|
}
|
43
43
|
|
44
|
-
$('select').material_select()
|
44
|
+
$('select').material_select()
|
45
45
|
|
46
46
|
$(".caret").each(function(idx) {
|
47
|
-
$($(".caret")[idx]).html('')
|
48
|
-
})
|
47
|
+
$($(".caret")[idx]).html('')
|
48
|
+
})
|
49
|
+
|
50
|
+
var mainHeaderContext = $(".manager--main-header")
|
51
|
+
$(".manager--main-header #collapseHeader").click(function (_e) {
|
52
|
+
if ($(this).hasClass('fa-compress')) {
|
53
|
+
$(this).addClass('fa-expand')
|
54
|
+
$(this).removeClass('fa-compress')
|
55
|
+
localStorage.setItem('mainHeaderCollapsed', 'true')
|
56
|
+
$('.content', $(this).parent()).css('display', 'none')
|
57
|
+
} else {
|
58
|
+
$(this).removeClass('fa-expand')
|
59
|
+
$(this).addClass('fa-compress')
|
60
|
+
localStorage.setItem('mainHeaderCollapsed', 'false')
|
61
|
+
$('.content', $(this).parent()).css('display', 'block')
|
62
|
+
}
|
63
|
+
})
|
64
|
+
if (localStorage.getItem('mainHeaderCollapsed') === 'true') {
|
65
|
+
console.log('here')
|
66
|
+
$("#collapseHeader").addClass('fa-expand')
|
67
|
+
$("#collapseHeader").removeClass('fa-compress')
|
68
|
+
$(".content", mainHeaderContext).css("display", 'none')
|
69
|
+
}
|
70
|
+
|
71
|
+
var mainFooterContext = $(".manager--main-footer")
|
72
|
+
$(".manager--main-footer #collapseFooter").click(function (_e) {
|
73
|
+
if ($(this).hasClass('fa-compress')) {
|
74
|
+
$(this).addClass('fa-expand')
|
75
|
+
$(this).removeClass('fa-compress')
|
76
|
+
localStorage.setItem('mainFooterCollapsed', 'true')
|
77
|
+
$('.content', $(this).parent()).css('display', 'none')
|
78
|
+
} else {
|
79
|
+
$(this).removeClass('fa-expand')
|
80
|
+
$(this).addClass('fa-compress')
|
81
|
+
localStorage.setItem('mainFooterCollapsed', 'false')
|
82
|
+
$('.content', $(this).parent()).css('display', 'block')
|
83
|
+
}
|
84
|
+
})
|
85
|
+
if (localStorage.getItem('mainFooterCollapsed') === 'true') {
|
86
|
+
console.log('here')
|
87
|
+
$("#collapseFooter").addClass('fa-expand')
|
88
|
+
$("#collapseFooter").removeClass('fa-compress')
|
89
|
+
$(".content", mainFooterContext).css("display", 'none')
|
90
|
+
}
|
49
91
|
|
50
92
|
});
|
51
93
|
|
@@ -77,13 +77,20 @@ hr {
|
|
77
77
|
padding: .5em;
|
78
78
|
}
|
79
79
|
|
80
|
+
.collapse-expand {
|
81
|
+
cursor: pointer;
|
82
|
+
}
|
83
|
+
|
80
84
|
/**
|
81
|
-
* manager...
|
85
|
+
* manager...
|
82
86
|
*/
|
83
87
|
|
84
88
|
.manager--main-header {
|
85
89
|
background: url('/assets/bg/weather.png');
|
86
90
|
}
|
91
|
+
.manager--main-header hr {
|
92
|
+
margin-top: 0;
|
93
|
+
}
|
87
94
|
|
88
95
|
.manager-galleries--index .mini {
|
89
96
|
float: left;
|
@@ -1,11 +1,11 @@
|
|
1
1
|
module IshManager
|
2
2
|
class ApplicationController < ActionController::Base
|
3
|
-
protect_from_forgery :with => :
|
3
|
+
protect_from_forgery :with => :null_session, :prepend => true
|
4
4
|
before_action :set_current_ability
|
5
5
|
check_authorization
|
6
6
|
|
7
7
|
def home
|
8
|
-
authorize! :home,
|
8
|
+
authorize! :home, IshManager::Ability
|
9
9
|
render 'home'
|
10
10
|
end
|
11
11
|
|
@@ -0,0 +1,23 @@
|
|
1
|
+
class IshManager::FriendsController < IshManager::ApplicationController
|
2
|
+
|
3
|
+
def index
|
4
|
+
authorize! :friends_index, IshModels::UserProfile
|
5
|
+
@new_friend = IshModels::UserProfile.new
|
6
|
+
end
|
7
|
+
|
8
|
+
def create
|
9
|
+
@friend = IshModels::UserProfile.find_by :email => params[:friend][:email]
|
10
|
+
authorize! :friends_new, @friend
|
11
|
+
me = current_user.profile
|
12
|
+
me.friends << @friend
|
13
|
+
if me.save
|
14
|
+
flash[:notice] = 'Added Friend'
|
15
|
+
else
|
16
|
+
flash[:alert] = "Cannot add friend: #{me.errors.messages}"
|
17
|
+
end
|
18
|
+
redirect_to :action => 'index'
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
|
23
|
+
|
@@ -4,9 +4,10 @@ class IshManager::GalleriesController < IshManager::ApplicationController
|
|
4
4
|
|
5
5
|
def index
|
6
6
|
authorize! :index, Gallery
|
7
|
-
@galleries = Gallery.unscoped.where( :is_trash => false
|
7
|
+
@galleries = Gallery.unscoped.where( :is_trash => false, :user_profile => current_user.profile
|
8
8
|
).order_by( :created_at => :desc
|
9
9
|
).page( params[:galleries_page] ).per( 10 )
|
10
|
+
@shared_galleries = current_user.profile.shared_galleries.page( params[:shared_galleries_page] ).per( 10 )
|
10
11
|
end
|
11
12
|
|
12
13
|
def index_thumb
|
@@ -29,11 +30,15 @@ class IshManager::GalleriesController < IshManager::ApplicationController
|
|
29
30
|
end
|
30
31
|
|
31
32
|
def create
|
33
|
+
params[:gallery][:shared_profiles].delete('')
|
34
|
+
params[:gallery][:shared_profiles] = IshModels::UserProfile.find params[:gallery][:shared_profiles]
|
32
35
|
@gallery = Gallery.new params[:gallery].permit!
|
36
|
+
@gallery.user_profile = current_user.profile
|
37
|
+
@gallery.username = current_user.profile.username
|
33
38
|
authorize! :create, @gallery
|
34
|
-
# @gallery.username = current_user.profile.username
|
35
39
|
|
36
40
|
if @gallery.save
|
41
|
+
GalleriesNotifier.shared_galleries( params[:gallery][:shared_profiles] ).deliver
|
37
42
|
flash[:notice] = 'Success'
|
38
43
|
redirect_to galleries_path
|
39
44
|
else
|
@@ -51,12 +56,17 @@ class IshManager::GalleriesController < IshManager::ApplicationController
|
|
51
56
|
|
52
57
|
def update
|
53
58
|
@gallery = Gallery.unscoped.find params[:id]
|
59
|
+
old_shared_profile_ids = @gallery.shared_profiles.map(&:id)
|
54
60
|
authorize! :update, @gallery
|
61
|
+
params[:gallery][:shared_profiles].delete('')
|
62
|
+
params[:gallery][:shared_profiles] = IshModels::UserProfile.find params[:gallery][:shared_profiles]
|
55
63
|
if @gallery.update_attributes( params[:gallery].permit! )
|
64
|
+
new_shared_profiles = params[:gallery][:shared_profiles].select { |p| !old_shared_profile_ids.include?( p.id ) }
|
65
|
+
IshManager::ApplicationMailer.shared_galleries( new_shared_profiles, @gallery ).deliver
|
56
66
|
flash[:notice] = 'Success.'
|
57
67
|
redirect_to galleries_path
|
58
68
|
else
|
59
|
-
flash[:error] = 'No Luck. ' + @gallery.errors.messages
|
69
|
+
flash[:error] = 'No Luck. ' + @gallery.errors.messages.to_s
|
60
70
|
render :action => :edit
|
61
71
|
end
|
62
72
|
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
class IshManager::LeadsController < IshManager::ApplicationController
|
2
|
+
|
3
|
+
def index
|
4
|
+
authorize! :index, Ish::Lead
|
5
|
+
@leads = Ish::Lead.where( :profile => current_user.profile )
|
6
|
+
end
|
7
|
+
|
8
|
+
def new
|
9
|
+
@new_lead = Ish::Lead.new
|
10
|
+
authorize! :new, @new_lead
|
11
|
+
end
|
12
|
+
|
13
|
+
def create
|
14
|
+
@lead = Ish::Lead.new params[:lead].permit!
|
15
|
+
@lead.profile = current_user.profile
|
16
|
+
authorize! :create, @lead
|
17
|
+
if @lead.save
|
18
|
+
flash[:notice] = "created lead"
|
19
|
+
else
|
20
|
+
flash[:alert] = "Cannot create lead: #{@lead.errors.messages}"
|
21
|
+
end
|
22
|
+
redirect_to :action => 'index'
|
23
|
+
end
|
24
|
+
|
25
|
+
=begin
|
26
|
+
def update
|
27
|
+
@invoice = Ish::Invoice.find params[:id]
|
28
|
+
authorize! :update, @invoice
|
29
|
+
if @invoice.update_attributes params[:invoice].permit!
|
30
|
+
flash[:notice] = 'Success'
|
31
|
+
redirect_to :action => 'index'
|
32
|
+
else
|
33
|
+
flash[:alert] = "Cannot update invoice: #{@invoice.errors.messages}"
|
34
|
+
end
|
35
|
+
redirect_to :action => 'index'
|
36
|
+
end
|
37
|
+
=end
|
38
|
+
|
39
|
+
end
|
@@ -24,10 +24,6 @@ class IshManager::PhotosController < IshManager::ApplicationController
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def j_create
|
27
|
-
@photo = Photo.new params[:photo].permit!
|
28
|
-
authorize! :create, @photo
|
29
|
-
@photo.is_public = true
|
30
|
-
|
31
27
|
# find this gallery
|
32
28
|
if params[:galleryname]
|
33
29
|
gallery = Gallery.unscoped.where( :galleryname => params[:galleryname] ).first
|
@@ -36,6 +32,10 @@ class IshManager::PhotosController < IshManager::ApplicationController
|
|
36
32
|
gallery = Gallery.unscoped.find( params[:gallery_id] )
|
37
33
|
gallery ||= Gallery.unscoped.where( :galleryname => params[:gallery_id] ).first
|
38
34
|
end
|
35
|
+
authorize! :create_photo, gallery
|
36
|
+
|
37
|
+
@photo = Photo.new params[:photo].permit!
|
38
|
+
@photo.is_public = true
|
39
39
|
@photo.gallery = gallery
|
40
40
|
|
41
41
|
# cache
|
@@ -12,6 +12,8 @@ class IshManager::UserProfilesController < IshManager::ApplicationController
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def edit
|
15
|
+
puts! current_user, 'herehere'
|
16
|
+
|
15
17
|
@profile = IshModels::UserProfile.find params[:id]
|
16
18
|
authorize! :edit, @profile
|
17
19
|
end
|
@@ -19,7 +21,7 @@ class IshManager::UserProfilesController < IshManager::ApplicationController
|
|
19
21
|
def update
|
20
22
|
@profile = IshModels::UserProfile.find params[:id]
|
21
23
|
authorize! :update, @profile
|
22
|
-
flag = @profile.update_attributes params[:
|
24
|
+
flag = @profile.update_attributes params[:profile].permit!
|
23
25
|
if flag
|
24
26
|
flash[:notice] = "Updated profile #{@profile.email}"
|
25
27
|
else
|
@@ -14,5 +14,15 @@ module IshManager
|
|
14
14
|
mail( :to => stock.profile.email, :subject => 'IshManager Stock Alert' ).deliver
|
15
15
|
end
|
16
16
|
|
17
|
+
def shared_galleries profiles, gallery
|
18
|
+
@gallery = gallery
|
19
|
+
@domain = Rails.application.config.action_mailer.default_url_options[:host]
|
20
|
+
@galleries_path = IshManager::Engine.routes.url_helpers.galleries_path
|
21
|
+
@gallery_path = IshManager::Engine.routes.url_helpers.gallery_path(@gallery)
|
22
|
+
mail( :to => 'victor@wasya.co',
|
23
|
+
:bcc => profiles.map { |p| p.email },
|
24
|
+
:subject => 'You got new shared galleries on pi manager' ).deliver
|
25
|
+
end
|
26
|
+
|
17
27
|
end
|
18
28
|
end
|
@@ -9,7 +9,18 @@ class IshManager::Ability
|
|
9
9
|
#
|
10
10
|
unless user.blank?
|
11
11
|
|
12
|
+
can [ :index, :new, :create ], ::Gallery
|
13
|
+
can [ :show, :edit, :update, :create_photo ], ::Gallery do |gallery|
|
14
|
+
gallery.user_profile == user.profile
|
15
|
+
end
|
16
|
+
|
17
|
+
can [ :home ], IshManager::Ability
|
18
|
+
|
19
|
+
can [ :friends_index, :friends_new ], IshModels::UserProfile
|
20
|
+
|
21
|
+
#
|
12
22
|
# role manager
|
23
|
+
#
|
13
24
|
if user.profile && [ :manager, :admin ].include?( user.profile.role_name )
|
14
25
|
|
15
26
|
can [ :create_newsitem, :show, :new_feature, :create_feature ], ::City
|
@@ -32,16 +43,13 @@ class IshManager::Ability
|
|
32
43
|
end
|
33
44
|
|
34
45
|
if user.profile && user.profile.sudoer?
|
35
|
-
can :manage, :all #
|
46
|
+
can :manage, :all # @TODO: this is important
|
36
47
|
can [ :manage ], ::Gallery
|
37
48
|
can [ :manage ], ::Gallery2
|
38
49
|
can [ :home ], ::Manager
|
39
50
|
can :destroy, ::Photo
|
40
51
|
end
|
41
52
|
|
42
|
-
can [ :show ], ::Gallery do |gallery|
|
43
|
-
gallery.user == user
|
44
|
-
end
|
45
53
|
|
46
54
|
end
|
47
55
|
#
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<!-- Global site tag (gtag.js) - Google Analytics -->
|
2
|
+
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-53077236-7"></script>
|
3
|
+
<script>
|
4
|
+
window.dataLayer = window.dataLayer || [];
|
5
|
+
function gtag(){dataLayer.push(arguments);}
|
6
|
+
gtag('js', new Date());
|
7
|
+
|
8
|
+
gtag('config', 'UA-53077236-7'); // manager.piousbox.com, _vp_ 20171203
|
9
|
+
</script>
|
@@ -1,24 +1,26 @@
|
|
1
1
|
|
2
|
-
.
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
2
|
+
.manager--main-footer
|
3
|
+
.container
|
4
|
+
.row
|
5
|
+
%i.fa.fa-compress.collapse-expand#collapseFooter
|
6
|
+
.content
|
7
|
+
.col-sm-5
|
8
|
+
- if defined?( current_user ) && current_user
|
9
|
+
%ul
|
10
|
+
%li >[ #{current_user.email} ]<
|
11
|
+
%li >[ #{current_user.profile.role_name} ]<
|
12
|
+
- else
|
13
|
+
Please log in
|
14
|
+
= link_to '[+]', main_app.new_user_session_path
|
13
15
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
16
|
+
.col-sm-5
|
17
|
+
%br
|
18
|
+
\~__^
|
19
|
+
1.6
|
20
|
+
%br
|
21
|
+
%br
|
22
|
+
%br
|
23
|
+
%br
|
24
|
+
%br
|
25
|
+
.col-sm.2
|
26
|
+
= button_to 'Logout', main_app.destroy_user_session_path, :method => :delete
|
@@ -3,25 +3,29 @@
|
|
3
3
|
.container
|
4
4
|
.row
|
5
5
|
.col-sm-12
|
6
|
-
%
|
7
|
-
|
8
|
-
%
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
%
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
%
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
%
|
6
|
+
%i.fa.fa-compress.collapse-expand#collapseHeader
|
7
|
+
.content
|
8
|
+
%ul.nav.nav-pills
|
9
|
+
%li{ :class => params[:controller] == 'ish_manager/cities' ? 'active' : '' }= link_to 'Cities', cities_path
|
10
|
+
%li{ :class => params[:controller] == 'ish_manager/events' ? 'active' : '' }= link_to 'Events', events_path
|
11
|
+
%li{ :class => params[:controller] == 'ish_manager/venues' ? 'active' : '' }= link_to 'Venues', venues_path
|
12
|
+
%li{ :class => params[:controller] == 'ish_manager/user_profiles' ? 'active' : '' }= link_to 'Profiles', user_profiles_path
|
13
|
+
%li{ :class => params[:controller] == 'ish_manager/friends ' ? 'active' : '' }= link_to 'Friends', friends_path
|
14
|
+
%ul.nav.nav-pills
|
15
|
+
%li{ :class => params[:controller] == 'ish_manager/sites' ? 'active' : '' }= link_to 'Sites', sites_path
|
16
|
+
%li{ :class => params[:controller] == 'ish_manager/galleries' ? 'active' : '' }= link_to 'Galleries', galleries_path
|
17
|
+
%li{ :class => params[:controller] == 'ish_manager/reports' ? 'active' : '' }= link_to 'Reports', reports_path
|
18
|
+
%li{ :class => params[:controller] == 'ish_manager/videos' ? 'active' : '' }= link_to 'Videos', videos_path
|
19
|
+
%li{ :class => params[:controller] == 'ish_manager/tags' ? 'active' : '' }= link_to 'Tags', tags_path
|
20
|
+
%ul.nav.nav-pills
|
21
|
+
-# %li{ :class => params[:controller] == 'ish_manager/ally' ? 'active' : '' }= link_to 'Ally', ally_root_path
|
22
|
+
%li{ :class => params[:controller] == 'ish_manager/stock_actions' ? 'active' : '' }= link_to 'Stock Actions', stock_actions_path
|
23
|
+
%li{ :class => params[:controller] == 'ish_manager/stock_options' ? 'active' : '' }= link_to 'Stock Options', stock_options_path
|
24
|
+
%li{ :class => params[:controller] == 'ish_manager/stock_watches' ? 'active' : '' }= link_to 'Stock Watches', stock_watches_path
|
25
|
+
%ul.nav.nav-pills
|
26
|
+
%li{ :class => params[:controller] == 'ish_manager/invoices' ? 'active' : '' }= link_to 'Invoices', invoices_path
|
27
|
+
%li{ :class => params[:controller] == 'ish_manager/payments' ? 'active' : '' }= link_to 'Payments', payments_path
|
28
|
+
%ul.nav.nav-pills
|
29
|
+
%li{ :class => params[:controller] == 'ish_manager/leads' ? 'active' : '' }= link_to 'Leads', leads_path
|
26
30
|
%hr
|
27
31
|
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
</head>
|
4
|
+
<body>
|
5
|
+
<h1>Hello,</h1>
|
6
|
+
<p>This gallery has been newly shared with you on pi manager: <a href="<%="#{@domain}#{@gallery_path}"%>"><%= @gallery.name %></a>.</p>
|
7
|
+
<p>Also see all your <a href="<%= "#{@domain}#{@galleries_path}" %>">shared galleries.</a></p>
|
8
|
+
</body>
|
9
|
+
</html>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
|
2
|
+
%h5 Friends
|
3
|
+
|
4
|
+
.panel
|
5
|
+
.panel-body
|
6
|
+
= form_for @new_friend, :as => :friend, :url => friends_path do |f|
|
7
|
+
.row
|
8
|
+
.col-sm-6
|
9
|
+
= f.text_field :email, :placeholder => 'email'
|
10
|
+
.col-sm-6
|
11
|
+
= f.submit 'Add Friend'
|
12
|
+
|
13
|
+
- current_user.profile.friends.each do |friend|
|
14
|
+
.panel
|
15
|
+
.panel-body
|
16
|
+
= friend.email
|
@@ -21,8 +21,8 @@
|
|
21
21
|
= f.label :venue
|
22
22
|
= select :gallery, :venue_id, @venues_list
|
23
23
|
.col-sm-4
|
24
|
-
= f.label
|
25
|
-
= select :
|
24
|
+
= f.label 'Shared with'
|
25
|
+
= 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 }
|
26
26
|
|
27
27
|
.row
|
28
28
|
.col-sm-3
|
@@ -1,5 +1,6 @@
|
|
1
1
|
|
2
|
-
- n_thumbs
|
2
|
+
- n_thumbs ||= 9
|
3
|
+
- param_name ||= :galleries_page
|
3
4
|
|
4
5
|
- if galleries.length > 0
|
5
6
|
.galleries--list
|
@@ -16,7 +17,7 @@
|
|
16
17
|
= link_to image_tag(photo.photo.url(:thumb), :alt => g.name, :class => :thumb ), gallery_path(g.galleryname)
|
17
18
|
.c
|
18
19
|
|
19
|
-
= paginate galleries, :param_name =>
|
20
|
+
= paginate galleries, :param_name => param_name
|
20
21
|
|
21
22
|
- else
|
22
23
|
%h5 No Galleries
|
@@ -9,10 +9,16 @@
|
|
9
9
|
.row
|
10
10
|
.col-sm-6
|
11
11
|
%h4
|
12
|
-
Galleries (#{@galleries.count})
|
12
|
+
My Galleries (#{@galleries.count})
|
13
13
|
= link_to '[+]', new_gallery_path
|
14
14
|
.col-sm-6= render 'search'
|
15
15
|
.row
|
16
16
|
.col-sm-12
|
17
17
|
-# = render 'ish_manager/galleries/menu_secondary'
|
18
|
-
= render 'ish_manager/galleries/list', :galleries => @galleries
|
18
|
+
= render 'ish_manager/galleries/list', :galleries => @galleries, :param_name => :galleries_page
|
19
|
+
|
20
|
+
.container
|
21
|
+
.row
|
22
|
+
.col-sm-12
|
23
|
+
%h4 Shared with me
|
24
|
+
= render 'ish_manager/galleries/list', :galleries => @shared_galleries, :param_name => :shared_galleries_page
|
@@ -0,0 +1,19 @@
|
|
1
|
+
|
2
|
+
- url = lead.persisted? ? lead_path( lead.id ) : leads_path
|
3
|
+
|
4
|
+
= form_for lead, :as => :lead, :url => url do |f|
|
5
|
+
.input-field
|
6
|
+
= f.label :email
|
7
|
+
= f.text_field :email
|
8
|
+
.input-field
|
9
|
+
= f.label :job_url
|
10
|
+
= f.text_field :job_url
|
11
|
+
.input-field
|
12
|
+
= f.label :company
|
13
|
+
= f.text_field :company
|
14
|
+
.input-field
|
15
|
+
= f.label :description
|
16
|
+
= f.text_area :description
|
17
|
+
.actions
|
18
|
+
= f.submit
|
19
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
|
2
|
+
.manager--leads-index
|
3
|
+
%h5
|
4
|
+
Leads (#{@leads.count})
|
5
|
+
= link_to raw("<i class='fa fa-plus-square'></i>"), new_lead_path
|
6
|
+
|
7
|
+
%table
|
8
|
+
%tr
|
9
|
+
%th Company
|
10
|
+
%th Email
|
11
|
+
%th Job Url
|
12
|
+
%th Description
|
13
|
+
- @leads.each do |lead|
|
14
|
+
%tr
|
15
|
+
%td= lead.company
|
16
|
+
%td= lead.email
|
17
|
+
%td= link_to lead.job_url, lead.job_url, :target => '_blank'
|
18
|
+
%td= lead.description
|
@@ -9,6 +9,7 @@
|
|
9
9
|
%script{ :src => "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js" }
|
10
10
|
%script{ :src => "https://cdnjs.cloudflare.com/ajax/libs/tinymce/4.6.3/jquery.tinymce.min.js" }
|
11
11
|
%script{ :src => "https://cdnjs.cloudflare.com/ajax/libs/tinymce/4.6.3/tinymce.min.js" }
|
12
|
+
= stylesheet_link_tag "https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css", :media => 'all'
|
12
13
|
= stylesheet_link_tag "ish_manager/application", media: "all"
|
13
14
|
= stylesheet_link_tag "ish_manager/materialize", media: "all"
|
14
15
|
= stylesheet_link_tag "//fonts.googleapis.com/icon?family=Material+Icons"
|
@@ -27,4 +28,5 @@
|
|
27
28
|
%p.alert= alert
|
28
29
|
.container
|
29
30
|
= yield
|
30
|
-
= render
|
31
|
+
= render 'ish_manager/application/main_footer'
|
32
|
+
= render 'analytics' unless Rails.env.development?
|
data/config/routes.rb
CHANGED
@@ -12,9 +12,11 @@ IshManager::Engine.routes.draw do
|
|
12
12
|
resources :venues
|
13
13
|
end
|
14
14
|
|
15
|
+
resources :email_templates
|
15
16
|
resources :events
|
16
17
|
|
17
|
-
resources :
|
18
|
+
resources :feature
|
19
|
+
resources :friends
|
18
20
|
|
19
21
|
resources :galleries do
|
20
22
|
post 'multiadd', :to => 'photos#j_create', :as => :multiadd
|
@@ -24,6 +26,8 @@ IshManager::Engine.routes.draw do
|
|
24
26
|
resources :payments
|
25
27
|
end
|
26
28
|
|
29
|
+
resources :leads
|
30
|
+
|
27
31
|
resources :newsitems
|
28
32
|
|
29
33
|
resources :photos
|
@@ -0,0 +1,19 @@
|
|
1
|
+
|
2
|
+
def puts! a, b=""
|
3
|
+
puts "+++ +++ #{b}"
|
4
|
+
puts a.inspect
|
5
|
+
end
|
6
|
+
|
7
|
+
task :migrate => [ 'migrate:assign_galleries_to_profile' ]
|
8
|
+
|
9
|
+
namespace :migrate do
|
10
|
+
|
11
|
+
desc 'assign galleries to profile'
|
12
|
+
task :assign_galleries_to_profile => :environment do
|
13
|
+
u = User.find_by :email => 'piousbox@gmail.com'
|
14
|
+
Gallery.unscoped.where( :user_profile => nil ).update_all( :user_profile_id => u.profile.id )
|
15
|
+
puts 'Each gallery is associated with a user profile.'
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
|
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.69
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -156,9 +156,11 @@ files:
|
|
156
156
|
- app/controllers/ish_manager/application_controller.rb
|
157
157
|
- app/controllers/ish_manager/cities_controller.rb
|
158
158
|
- app/controllers/ish_manager/features_controller.rb
|
159
|
+
- app/controllers/ish_manager/friends_controller.rb
|
159
160
|
- app/controllers/ish_manager/galleries_controller.rb
|
160
161
|
- app/controllers/ish_manager/galleries_controller.rb~
|
161
162
|
- app/controllers/ish_manager/invoices_controller.rb
|
163
|
+
- app/controllers/ish_manager/leads_controller.rb
|
162
164
|
- app/controllers/ish_manager/newsitems_controller.rb
|
163
165
|
- app/controllers/ish_manager/photos_controller.rb
|
164
166
|
- app/controllers/ish_manager/reports_controller.rb
|
@@ -181,6 +183,7 @@ files:
|
|
181
183
|
- app/models/ish_manager/ability.rb~
|
182
184
|
- app/models/ish_manager/application_record.rb
|
183
185
|
- app/views/ish_manager/ally/home.haml
|
186
|
+
- app/views/ish_manager/application/_analytics.html
|
184
187
|
- app/views/ish_manager/application/_form_errors.haml
|
185
188
|
- app/views/ish_manager/application/_main_footer.haml
|
186
189
|
- app/views/ish_manager/application/_main_header.haml
|
@@ -188,6 +191,7 @@ files:
|
|
188
191
|
- app/views/ish_manager/application/_meta.haml
|
189
192
|
- app/views/ish_manager/application/_meta.haml~
|
190
193
|
- app/views/ish_manager/application/home.haml
|
194
|
+
- app/views/ish_manager/application_mailer/shared_galleries.html.erb
|
191
195
|
- app/views/ish_manager/application_mailer/stock_alert.html.erb
|
192
196
|
- app/views/ish_manager/application_mailer/welcome.html.erb
|
193
197
|
- app/views/ish_manager/cities/_form.haml
|
@@ -209,6 +213,7 @@ files:
|
|
209
213
|
- app/views/ish_manager/features/index.haml
|
210
214
|
- app/views/ish_manager/features/new.haml
|
211
215
|
- app/views/ish_manager/features/show.haml
|
216
|
+
- app/views/ish_manager/friends/index.haml
|
212
217
|
- app/views/ish_manager/galleries/_form.haml
|
213
218
|
- app/views/ish_manager/galleries/_index.haml
|
214
219
|
- app/views/ish_manager/galleries/_list.haml
|
@@ -253,6 +258,9 @@ files:
|
|
253
258
|
- app/views/ish_manager/kaminari/_paginator.html.erb~
|
254
259
|
- app/views/ish_manager/kaminari/_prev_page.html.erb
|
255
260
|
- app/views/ish_manager/kaminari/_prev_page.html.erb~
|
261
|
+
- app/views/ish_manager/leads/_form.haml
|
262
|
+
- app/views/ish_manager/leads/index.haml
|
263
|
+
- app/views/ish_manager/leads/new.haml
|
256
264
|
- app/views/ish_manager/newsitems/_form.haml
|
257
265
|
- app/views/ish_manager/newsitems/_form.haml~
|
258
266
|
- app/views/ish_manager/newsitems/_index.haml
|
@@ -338,6 +346,7 @@ files:
|
|
338
346
|
- lib/ish_manager/version.rb
|
339
347
|
- lib/systemd/system/watch_stocks.service
|
340
348
|
- lib/tasks/ish_manager_tasks.rake
|
349
|
+
- lib/tasks/migrate.rake
|
341
350
|
homepage: http://wasya.co
|
342
351
|
licenses:
|
343
352
|
- MIT
|