ish_manager 0.1.8.356 → 0.1.8.358
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.
- checksums.yaml +4 -4
- data/app/assets/javascripts/ish_manager/application.js +1 -0
- data/app/assets/javascripts/ish_manager/email_contexts.js +3 -3
- data/app/assets/javascripts/ish_manager/galleries.js +78 -0
- data/app/assets/stylesheets/ish_manager/galleries.scss +10 -0
- data/app/controllers/ish_manager/galleries_controller.rb +23 -8
- data/app/mailers/ish_manager/application_mailer.rb +1 -1
- data/app/mailers/ish_manager/meeting_mailer.rb +2 -1
- data/app/mailers/ish_manager/office_mailer.rb +2 -1
- data/app/views/ish_manager/email_actions/_form.haml +16 -6
- data/app/views/ish_manager/email_actions/index.haml +4 -2
- data/app/views/ish_manager/email_contexts/show.haml +1 -1
- data/app/views/ish_manager/email_templates/_form.haml +3 -0
- data/app/views/ish_manager/email_templates/_wasyaco_roundborders.html.erb +5 -6
- data/app/views/ish_manager/galleries/show.haml +10 -1
- data/app/views/ish_manager/photos/_index_thumbs.haml +1 -1
- data/config/routes.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 193a0f1a8f02445f2d98166fe6bfe614268fbc2f9e45204961c45898bd0005d3
|
4
|
+
data.tar.gz: 8d9d4d82f78782390b28463c11c825ab8e1e56fa054a3351869bd6699e264869
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4ab1c3fa4bb6e624b7c3c2b90759eb2d4c1823c053a0cd0c0fbfca8ef96fb67c819ef1f15cdae669a50676973f79b42d129c3688a9c88114c5632cb1225ae28
|
7
|
+
data.tar.gz: 409f2c967e02c2f92110feb667f997dad6b5bbf6b5736d085ea0c86cd6e3f46a37de98d2d34124b131331ecace55116a0436fea3ce6b2dd31964d9ef83d1ca7e
|
@@ -1,6 +1,6 @@
|
|
1
1
|
|
2
|
-
AppRouter = {
|
3
|
-
|
2
|
+
const AppRouter = {
|
3
|
+
new_email_context_with_template_path: (slug) => `/manager/email_contexts/new_with_template/${slug}`
|
4
4
|
}
|
5
5
|
|
6
6
|
$(document).ready(() => {
|
@@ -8,7 +8,7 @@ $(document).ready(() => {
|
|
8
8
|
if ($(".email-contexts--form").length) {
|
9
9
|
$("#ish_email_context_email_template_id").on('change', (ev) => {
|
10
10
|
const val = ev.target.value
|
11
|
-
window.location.href = AppRouter.
|
11
|
+
window.location.href = AppRouter.new_email_context_with_template_path(val)
|
12
12
|
})
|
13
13
|
|
14
14
|
$("#ish_email_context_type").on('change', (ev) => {
|
@@ -0,0 +1,78 @@
|
|
1
|
+
|
2
|
+
const AppRouter = {
|
3
|
+
gallery_update_ordering_path: ({ id, slug }) => `/manager/galleries/${slug || id}/update_ordering`,
|
4
|
+
}
|
5
|
+
$(document).ready(function () {
|
6
|
+
|
7
|
+
if ( $(".orderable-items").length ) {
|
8
|
+
if ($(".orderable-items").length > 1) {
|
9
|
+
logg("There are many .orderable-items! This was only meant to work with one.")
|
10
|
+
}
|
11
|
+
// let slug = $( $(".orderable-items")[0] ).data('slug')
|
12
|
+
let id = $( $(".orderable-items")[0] ).data('id')
|
13
|
+
let token = $( $(".orderable-items")[0] ).data('token')
|
14
|
+
|
15
|
+
$(".orderable-items .items > div").each(function (idx, item) {
|
16
|
+
let $el = $(this)
|
17
|
+
|
18
|
+
$(this).find('a.mvLeft').click(function() {
|
19
|
+
// move element up one step
|
20
|
+
if ($el.not(':first-child'))
|
21
|
+
$el.prev().before($el);
|
22
|
+
})
|
23
|
+
|
24
|
+
$(this).find('a.mvRight').click(function() {
|
25
|
+
// move element down one step
|
26
|
+
if ($el.not(':last-child'))
|
27
|
+
$el.next().after($el);
|
28
|
+
})
|
29
|
+
|
30
|
+
})
|
31
|
+
$(".save-ordering").click(function() {
|
32
|
+
|
33
|
+
let els = $(this).parent().find(".items .item")
|
34
|
+
let ids = []
|
35
|
+
$(els).map((idx, item) => {
|
36
|
+
ids.push( $(item).data('id') )
|
37
|
+
})
|
38
|
+
|
39
|
+
$.ajax({
|
40
|
+
type: 'PATCH',
|
41
|
+
url: AppRouter.gallery_update_ordering_path({ id: id }),
|
42
|
+
data: {
|
43
|
+
authenticity_token: token,
|
44
|
+
gallery: {
|
45
|
+
sorted_photo_ids: ids,
|
46
|
+
},
|
47
|
+
},
|
48
|
+
success: (e) => {
|
49
|
+
logg('success')
|
50
|
+
},
|
51
|
+
|
52
|
+
})
|
53
|
+
|
54
|
+
logg('ok')
|
55
|
+
})
|
56
|
+
}
|
57
|
+
|
58
|
+
})
|
59
|
+
|
60
|
+
/*
|
61
|
+
//element to move
|
62
|
+
var $el = $(selector);
|
63
|
+
|
64
|
+
//move element down one step
|
65
|
+
if ($el.not(':last-child'))
|
66
|
+
$el.next().after($el);
|
67
|
+
|
68
|
+
//move element up one step
|
69
|
+
if ($el.not(':first-child'))
|
70
|
+
$el.prev().before($el);
|
71
|
+
|
72
|
+
//move element to top
|
73
|
+
$el.parent().prepend($el);
|
74
|
+
|
75
|
+
//move element to end
|
76
|
+
$el.parent().append($el);
|
77
|
+
*/
|
78
|
+
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class IshManager::GalleriesController < IshManager::ApplicationController
|
2
2
|
|
3
3
|
before_action :set_lists
|
4
|
-
before_action :set_gallery, only: %w|destroy edit j_show show update|
|
4
|
+
before_action :set_gallery, only: %w|destroy edit j_show show update update_ordering|
|
5
5
|
|
6
6
|
# alphabetized! : )
|
7
7
|
|
@@ -86,22 +86,37 @@ class IshManager::GalleriesController < IshManager::ApplicationController
|
|
86
86
|
|
87
87
|
def show
|
88
88
|
authorize! :show, @gallery
|
89
|
-
@photos = @gallery.photos.unscoped.where({ :is_trash => false })
|
90
|
-
@deleted_photos = @gallery.photos.unscoped.where({ :is_trash => true })
|
89
|
+
@photos = @gallery.photos.unscoped.where({ :is_trash => false }).order_by( ordering: :asc )
|
90
|
+
@deleted_photos = @gallery.photos.unscoped.where({ :is_trash => true }).order_by( ordering: :asc )
|
91
|
+
end
|
92
|
+
|
93
|
+
def update_ordering
|
94
|
+
authorize! :update, @gallery
|
95
|
+
out = []
|
96
|
+
params[:gallery][:sorted_photo_ids].each_with_index do |id, idx|
|
97
|
+
out.push Photo.find( id ).update_attribute( :ordering, idx )
|
98
|
+
end
|
99
|
+
flash[:notice] = "Outcomes: #{out}."
|
100
|
+
redirect_to action: 'show', id: @gallery.id
|
91
101
|
end
|
92
102
|
|
93
103
|
def update
|
94
104
|
old_shared_profile_ids = @gallery.shared_profiles.map(&:id)
|
95
105
|
authorize! :update, @gallery
|
96
106
|
|
97
|
-
params[:gallery][:shared_profiles].
|
107
|
+
if params[:gallery][:shared_profiles].present?
|
108
|
+
params[:gallery][:shared_profiles].delete('')
|
109
|
+
end
|
98
110
|
params[:gallery][:shared_profile_ids] = params[:gallery][:shared_profiles]
|
99
111
|
params[:gallery].delete :shared_profiles
|
100
112
|
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
113
|
+
flag = @gallery.update_attributes( params[:gallery].permit! )
|
114
|
+
if flag
|
115
|
+
if params[:gallery][:shared_profile_ids].present?
|
116
|
+
new_shared_profiles = Ish::UserProfile.find( params[:gallery][:shared_profile_ids]
|
117
|
+
).select { |p| !old_shared_profile_ids.include?( p.id ) }
|
118
|
+
::IshManager::ApplicationMailer.shared_galleries( new_shared_profiles, @gallery ).deliver
|
119
|
+
end
|
105
120
|
flash[:notice] = 'Success.'
|
106
121
|
redirect_to edit_gallery_path(@gallery)
|
107
122
|
else
|
@@ -1,5 +1,6 @@
|
|
1
1
|
|
2
2
|
class IshManager::OfficeMailer < IshManager::ApplicationMailer
|
3
|
+
default from: 'WasyaCo Consulting <no-reply@wasya.co>'
|
3
4
|
|
4
5
|
def send_campaign_email campaign_id, c_lead_id
|
5
6
|
@ctx = @campaign = ::Ish::EmailContext.find campaign_id
|
@@ -82,7 +83,7 @@ class IshManager::OfficeMailer < IshManager::ApplicationMailer
|
|
82
83
|
end
|
83
84
|
|
84
85
|
|
85
|
-
## 2022-11-10 backup
|
86
|
+
## 2022-11-10 _vp_ backup
|
86
87
|
# def send_context_email ctx_id
|
87
88
|
# @email_ctx = ::Ish::EmailContext.find ctx_id
|
88
89
|
# template = "render/_#{@email_ctx.email_template.slug}"
|
@@ -14,15 +14,12 @@
|
|
14
14
|
.field
|
15
15
|
%label Slug
|
16
16
|
= f.text_field :slug
|
17
|
-
|
18
|
-
|
19
|
-
|
17
|
+
.field
|
18
|
+
%label Descr
|
19
|
+
= f.text_area :descr
|
20
20
|
.field
|
21
21
|
%label Template
|
22
22
|
= f.select :email_template_id, options_for_select( @email_templates_list, selected: act.email_template_id ), {}, class: 'select2'
|
23
|
-
-# .field
|
24
|
-
-# %label State
|
25
|
-
-# = f.select :state, options_for_select( ::Office::EmailAction::STATES, selected: act.state )
|
26
23
|
|
27
24
|
.col-md-6
|
28
25
|
.field
|
@@ -40,3 +37,16 @@
|
|
40
37
|
.row
|
41
38
|
.col-sm-6
|
42
39
|
= f.submit :submit
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
-# .field
|
48
|
+
-# %label State
|
49
|
+
-# = f.select :state, options_for_select( ::Office::EmailAction::STATES, selected: act.state )
|
50
|
+
-# .field
|
51
|
+
-# %label Lead
|
52
|
+
-# = f.select :lead_id, options_for_select( @leads_list, selected: act.lead_id ), {}, class: 'select2'
|
@@ -8,15 +8,17 @@
|
|
8
8
|
|
9
9
|
%table.bordered
|
10
10
|
%tr
|
11
|
-
%th
|
11
|
+
%th= check_box_tag 'abba'
|
12
12
|
%th actions
|
13
13
|
%th slug
|
14
|
+
%th descr
|
14
15
|
%th next actions
|
15
16
|
- @email_actions.each do |act|
|
16
17
|
%tr
|
17
|
-
%td
|
18
|
+
%td= check_box_tag 'abba'
|
18
19
|
%td= link_to '[~]', edit_email_action_path( act )
|
19
20
|
%td= act.slug
|
21
|
+
%td= act.descr
|
20
22
|
-# %td= act.lead&.email
|
21
23
|
%td
|
22
24
|
%ul
|
@@ -13,7 +13,7 @@
|
|
13
13
|
<meta charset="UTF-8">
|
14
14
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
15
15
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
16
|
-
<title
|
16
|
+
<title><%= @ctx.preview_str %></title>
|
17
17
|
|
18
18
|
<style type="text/css">
|
19
19
|
.mcnTextBlock {
|
@@ -839,12 +839,11 @@ h4 {
|
|
839
839
|
|
840
840
|
<body>
|
841
841
|
|
842
|
-
|
843
|
-
<!--[if !gte mso 9]
|
844
|
-
style="display:none; font-size:0px; line-height:0px; max-height:0px; max-width:0px; opacity:0; overflow:hidden; visibility:hidden; mso-hide:all;"
|
845
|
-
|
842
|
+
|
843
|
+
<!--[if !gte mso 9]>-->
|
844
|
+
<span class="mcnPreviewText" style="display:none; font-size:0px; line-height:0px; max-height:0px; max-width:0px; opacity:0; overflow:hidden; visibility:hidden; mso-hide:all;"
|
845
|
+
><%= @ctx.preview_str %></span>
|
846
846
|
<!--<![endif]-->
|
847
|
-
<!--*|END:IF|*-->
|
848
847
|
|
849
848
|
<center>
|
850
849
|
<table align="center" border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="bodyTable">
|
@@ -22,7 +22,16 @@
|
|
22
22
|
|
23
23
|
.row-thumbs
|
24
24
|
%p.collapse-expand#rowThumbs Thumbs
|
25
|
-
|
25
|
+
.orderable-items{ data: { id: @gallery.id.to_s, slug: @gallery.slug, token: form_authenticity_token } }
|
26
|
+
.flex-row.items
|
27
|
+
- @photos.each do |photo|
|
28
|
+
.itemW
|
29
|
+
%a.mvLeft <
|
30
|
+
%a.mvRight >
|
31
|
+
.item{ data: { id: photo.id.to_s } }
|
32
|
+
= render 'ish_manager/photos/meta_manager', photo: photo
|
33
|
+
= image_tag photo.photo.url( :thumb )
|
34
|
+
= button_tag 'Save ordering', class: 'save-ordering'
|
26
35
|
|
27
36
|
.row-large
|
28
37
|
%p.collapse-expand#rowLarge Large
|
data/config/routes.rb
CHANGED
@@ -5,6 +5,7 @@ IshManager::Engine.routes.draw do
|
|
5
5
|
|
6
6
|
get 'categories', to: 'categories#index'
|
7
7
|
|
8
|
+
patch 'galleries/:id/update_ordering', to: 'galleries#update_ordering'
|
8
9
|
get 'galleries', :to => 'galleries#index', :defaults => { :render_type => Gallery::RENDER_THUMBS }
|
9
10
|
get 'galleries/index_titles', :to => 'galleries#index', :defaults => { :render_type => Gallery::RENDER_TITLES }
|
10
11
|
get 'galleries/index_thumbs', :to => 'galleries#index', :defaults => { :render_type => Gallery::RENDER_THUMBS }
|
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.358
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -235,6 +235,7 @@ files:
|
|
235
235
|
- app/assets/javascripts/ish_manager/application.js
|
236
236
|
- app/assets/javascripts/ish_manager/email_contexts.js
|
237
237
|
- app/assets/javascripts/ish_manager/email_templates.js
|
238
|
+
- app/assets/javascripts/ish_manager/galleries.js
|
238
239
|
- app/assets/javascripts/ish_manager/maps.js
|
239
240
|
- app/assets/javascripts/ish_manager/shared.js
|
240
241
|
- app/assets/javascripts/ish_manager/trash/application_materialize.js
|