wco_email 0.1.1.38 → 0.1.1.40

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e3aec0849c36c100c3d0593a6cae5c080f77922f036f49e4b5894b94a723d9f6
4
- data.tar.gz: d099a21790669e72e952ec80b435f96b71a86983f6a7d3eb737f2a45e6b1fe79
3
+ metadata.gz: 47368100e817e5ef832785bd306770d27d89e26e8f29340c8169afa7d87685dc
4
+ data.tar.gz: 11533cfb7d1d6e4f80ab1c1506388af0b352a5df45e92f9c1388b47b7f6c8d0b
5
5
  SHA512:
6
- metadata.gz: 22506009afe3a9203508ba24aba14538e6380c865d6490fa1360a76593fca099abe48e61012f3749a6be78488d3376d21d671975e6390b60860a212bf94962d9
7
- data.tar.gz: 271d3085f630d9c478fa4c8ddea37b26fa3bc2c03c17eb60334af7cbbaa220cf5db4d34c4b0db24de704913bcf2d1c4ecd2d883ed07dfbc4369fedff52e1db66
6
+ metadata.gz: b6f0201e0db85a6f2694142bfcec4e0f642a3e0655f17256788b3ee71f3ce605b2a4d73f2af88f982f0af18502688b31d8d5ee2af83af2ac7ac637b15843f335
7
+ data.tar.gz: 879697c41150bce31d475c66b20ff807ab4c50fcba104d03c4d6c4203c958f086bf0e2b5b7467842f6c238689511067db9081ded1851afe02823361574dbd5af
@@ -5,6 +5,8 @@ EM = WcoEmail::Message
5
5
  ET = WcoEmail::EmailTemplate
6
6
  MS = WcoEmail::MessageStub
7
7
  EMS = MS
8
+ OA = Wco::OfficeAction
9
+ OAT = Wco::OfficeActionTemplate
8
10
  Sch = WcoEmail::EmailAction
9
11
 
10
12
  class WcoEmail::ApplicationController < Wco::ApplicationController
@@ -20,9 +20,19 @@ class WcoEmail::EmailActionTemplatesController < WcoEmail::ApplicationController
20
20
  end
21
21
 
22
22
  def index
23
- @tmpls = WcoEmail::EmailActionTemplate.all
24
-
25
23
  authorize! :index, @new_tmpl
24
+ if params[:deleted]
25
+ @tmpls = WcoEmail::EmailActionTemplate.deleted
26
+ else
27
+ @tmpls = WcoEmail::EmailActionTemplate.all
28
+ end
29
+
30
+ if params[:q]
31
+ q = URI.decode(params[:q])
32
+ @tmpls = @tmpls.where({ :slug => /#{q}/i })
33
+ end
34
+
35
+ @tmpls = @tmpls.order_by( slug: :asc )
26
36
  end
27
37
 
28
38
  def new
@@ -1,8 +1,18 @@
1
1
 
2
+ - if defined? tmpls
3
+ - q = params[:q]
4
+ - deleted = params[:deleted]
5
+ - else
6
+ - tmpls = WcoEmail::EmailActionTemplate.all
2
7
 
3
- = link_to "Email Action Tmpls (#{WcoEmail::EmailActionTemplate.all.length})", email_action_templates_path
4
- .inline-search
8
+ = link_to "Email Action Tmpls (#{tmpls.length})", email_action_templates_path
9
+ .d-inline-block
5
10
  = form_tag email_action_templates_path, method: :get do
6
- = text_field_tag :q
11
+ = text_field_tag :q, q
7
12
  = link_to '[+]', new_email_action_template_path
13
+ - if deleted
14
+ %b
15
+ = link_to '[deleted]', email_action_templates_path(deleted: true)
16
+ - else
17
+ = link_to '[deleted]', email_action_templates_path(deleted: true)
8
18
 
@@ -1,10 +1,8 @@
1
1
 
2
- .email-action-templates-index.padded
3
-
2
+ .email-action-templates-index.maxwidth
4
3
  .header
5
- %h2.title
6
- Email Action Templates (#{@tmpls.length})
7
- = link_to '[+]', new_email_action_template_path
4
+ %h5.title
5
+ = render 'header', tmpls: @tmpls
8
6
 
9
7
  %table.bordered
10
8
  %tr
@@ -1,6 +1,11 @@
1
1
 
2
- = link_to "Email Templates (#{WcoEmail::EmailTemplate.all.count})", email_templates_path
2
+ - if defined? templates
3
+ - q = params[:q]
4
+ - else
5
+ - templates = WcoEmail::EmailTemplate.all
6
+
7
+ = link_to "Email Templates (#{templates.count})", email_templates_path
3
8
  = form_tag email_templates_path, method: :get do
4
- = text_field_tag :q
9
+ = text_field_tag :q, q
5
10
  = link_to '[+]', new_email_template_path
6
11
  = link_to '[expanded]', email_templates_path({ view: '_index_expanded' })
@@ -2,7 +2,7 @@
2
2
  .email-templates--index.maxwidth
3
3
 
4
4
  %h5.flex-row.collapse-expand#emailTemplatesIndex
5
- = render '/wco_email/email_templates/header'
5
+ = render '/wco_email/email_templates/header', templates: @templates
6
6
 
7
7
  -# = paginate @templates, :param_name => :templates_page, :views_prefix => 'wco'
8
8
  .email-templates-index.maxwidth
@@ -1,3 +1,4 @@
1
+
1
2
  = link_to '[~]', edit_email_template_path(tmpl)
2
3
  = link_to tmpl.slug, email_template_path(tmpl)
3
4
  %br
@@ -158,6 +158,8 @@ namespace :wco_email do
158
158
  end
159
159
  end
160
160
 
161
+
162
+
161
163
  desc 'send contexts'
162
164
  task send_contexts: :environment do
163
165
  puts! "Starting wco_email:send_contexts..."
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wco_email
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1.38
4
+ version: 0.1.1.40
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev