ish_manager 0.1.8.416 → 0.1.8.418

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: dc54a836a0fb0b1a3c99d313011c26d16e22ba75b6c631b82eec0dcd2854ac7c
4
- data.tar.gz: aa7e5a284ebb5646eb2288e4e1e9009b4409ed22b08e09895a3a8b1aaec5f78a
3
+ metadata.gz: 10e50889c4080362ba2acde217e981c548ee3d2a8883fb091dc55a544b5b19a0
4
+ data.tar.gz: 1c707ff1cbdc29a75f492be0616c5939084e351eb91bd9d86801c56ad6b7c2ad
5
5
  SHA512:
6
- metadata.gz: 75e169cb64cb20dec6c015c9c8e9c9057cecb7a62549ae25ca6144a90259fcc0c98c99391350b85d25973403eb61ca679305e2fd4195dd905fda28a5e4a5fee9
7
- data.tar.gz: 15badb0af441666f1b14c3d874e4c9b7dd6e31a7d8a540f8a5f2915fea7f6c041fee9c47f74c0384458a362b04f96c46bee2f67311d5dbb26b8561da34361d28
6
+ metadata.gz: 504b46e66bd8a8cfed80ac43439e4e356b2c50713ec7608a06a33ae2c7ff3062223c41f1710f203534a74b01b4628d9ee1ba68cc3d808034313ede798cb65077
7
+ data.tar.gz: a6b7eaed2bf22b43184ec6b77a8db9348f0405a7966ba336622461a8ad8e557e0d74f730d4d2ff700c498c838218fd90bc09304fdd20c2e0929e4a1df319dac0
@@ -155,41 +155,54 @@ table.bordered {
155
155
  text-align: center;
156
156
  }
157
157
 
158
- .chip,
159
- // .main-header a.chip,
160
- ._ {
161
- margin-right: 20px;
158
+ .chip {
162
159
  // border: 1px solid black;
163
-
164
160
  border-radius: 1em 0 0 1em;
165
- padding-left: .6em;
161
+
162
+ margin-right: 32px;
163
+
164
+ padding: 0.2em 0.2em 0.2em 0.6em;
165
+
166
+ height: 32px;
166
167
 
167
168
  background: white;
169
+
168
170
  position: relative;
169
171
 
172
+ &::before {
173
+ // border: 1px solid red;
174
+ // background: yellow;
170
175
 
176
+ content: "";
177
+ display: block;
171
178
 
179
+ position: absolute;
180
+ right: -16px;
181
+ top: 0;
182
+
183
+ width: 16px;
184
+ height: 32px;
185
+
186
+ // border-left: 12px solid white;
187
+ border-top: 17px solid white;
188
+ border-right: 12px solid transparent;
189
+ // border-bottom: 12px solid transparent;
190
+ }
172
191
  &::after {
173
192
  // border: 1px solid red;
174
193
 
175
194
  content: "";
195
+ display: block;
176
196
 
177
197
  position: absolute;
178
- right: -30px;
179
- width: 10px;
180
- display: block;
181
- // background: inherit;
182
- // background: red;
183
- margin: 0 20px;
184
- top: -1px;
198
+ right: -16px;
185
199
  bottom: 0;
186
200
 
187
- border-top: 16px solid white;
188
- border-bottom: 16px solid white;
201
+ width: 16px;
202
+ height: 32px;
189
203
 
190
- border-right: 10px solid transparent;
191
-
192
- // border: 1px solid red;
204
+ border-bottom: 17px solid white;
205
+ border-right: 12px solid transparent;
193
206
  }
194
207
  }
195
208
 
@@ -342,7 +355,7 @@ textarea.large {
342
355
  border-bottom: 2px solid red;
343
356
  margin-bottom: 1em;
344
357
 
345
- a,
358
+ a:not(.chip),
346
359
  span.label {
347
360
  background: white;
348
361
  padding: .2em;
@@ -1,5 +1,5 @@
1
1
 
2
-
2
+ .center-headers,
3
3
  .email-actions-edit,
4
4
  .email-actions-index,
5
5
  .email-actions-new,
@@ -33,10 +33,17 @@ class ::IshManager::EmailCampaignLeadsController < IshManager::ApplicationContro
33
33
  # redirect_to :action => 'index'
34
34
  # end
35
35
 
36
- # def edit
37
- # @lead = ::Lead.find params[:id]
38
- # authorize! :edit, @lead
39
- # end
36
+ def destroy
37
+ @clead = EmailCampaignLead.find params[:id]
38
+ authorize! :destroy, @clead
39
+ flag = @clead.delete
40
+ if flag
41
+ flash[:notice] = 'ok'
42
+ else
43
+ flash[:alert] = 'no luck'
44
+ end
45
+ redirect_to controller: 'email_campaigns', action: :show, id: @clead.email_campaign_id
46
+ end
40
47
 
41
48
  # def index
42
49
  # authorize! :index, ::Lead
@@ -101,12 +101,9 @@ class ::IshManager::EmailContextsController < ::IshManager::ApplicationControlle
101
101
  def summary
102
102
  authorize! :summary, Ish::EmailContext
103
103
  @results = Ish::EmailContext.summary
104
- puts! @results, 'r'
105
-
106
- # headers["Content-Type"] ||= 'text/csv'
107
104
 
108
105
  respond_to do |format|
109
- format.html # show.html.erb
106
+ format.html
110
107
  format.csv do
111
108
  render layout: false
112
109
  end
@@ -110,11 +110,11 @@ class ::IshManager::LeadsController < IshManager::ApplicationController
110
110
  }
111
111
  }
112
112
  @email_contexts = {}
113
- tmp_contexts = Ish::EmailContext.all.where( :to_email.in => lead_emails
114
- ).map_reduce( map, reduce
115
- ).out( inline: 1 ## From: https://www.mongodb.com/docs/mongoid/current/reference/map-reduce/
116
- ).to_a
117
- tmp_contexts.map { |x| @email_contexts[x[:_id]] = x[:value][:count].to_i }
113
+ # tmp_contexts = Ish::EmailContext.all.where( :to_email.in => lead_emails
114
+ # ).map_reduce( map, reduce
115
+ # ).out( inline: 1 ## From: https://www.mongodb.com/docs/mongoid/current/reference/map-reduce/
116
+ # ).to_a
117
+ # tmp_contexts.map { |x| @email_contexts[x[:_id]] = x[:value][:count].to_i }
118
118
  # puts! @email_contexts, '@email_contexts'
119
119
 
120
120
  end
@@ -52,8 +52,8 @@
52
52
  .a
53
53
  %ul
54
54
  %li
55
- .chip
56
- = link_to "#{WpTag::INBOX} (#{Office::EmailConversation.in_emailtag(WpTag::INBOX).length})", email_conversations_in_path(WpTag::INBOX)
55
+
56
+ = link_to "#{WpTag::INBOX} (#{Office::EmailConversation.in_emailtag(WpTag::INBOX).length})", email_conversations_in_path(WpTag::INBOX), class: 'chip'
57
57
  = link_to '[+]', new_email_context_path
58
58
  %li
59
59
  = link_to "Tmpls (#{Ish::EmailTemplate.all.count})", email_templates_path
@@ -73,6 +73,8 @@
73
73
  %li
74
74
  = link_to "Ctxs (#{Ctx.notsent.length})", notsent_email_contexts_path
75
75
  = link_to '[+]', new_email_context_path
76
+ %br
77
+ = link_to 'summary', email_contexts_summary_path( format: :html )
76
78
  = link_to '[csv]', email_contexts_summary_path( format: :csv )
77
79
 
78
80
  %li
@@ -15,9 +15,9 @@
15
15
 
16
16
  .collapse-expand#campaignLeads Email Campaign leads (#{@campaign.campaign_leads.length})
17
17
  %ul.email-campaign-leads.items.browser-default
18
- - @campaign.leads.each do |lead|
18
+ - @campaign.campaign_leads.each do |clead|
19
19
  %li.item
20
- = lead.email
21
- Ctxs:
22
- = render 'ish_manager/email_contexts/index', ctxs: lead.email_contexts
20
+ .inline-block= button_to '[x]', email_campaign_lead_path(clead), method: :delete, :data => { :confirm => 'Are you sure?' }
21
+ = link_to clead.lead.email, lead_path(clead.lead.id)
22
+ (#{clead.lead.email_contexts.length} ctxs)
23
23
 
@@ -0,0 +1,16 @@
1
+
2
+ .email-contexts-summary.max-width.center-headers
3
+ .header
4
+ %h2.title Email Contexts - Summary
5
+
6
+ %table.bordered
7
+ %thead
8
+ %tr
9
+ %th Date
10
+ %th Count
11
+ %tbody
12
+ - @results.each do |r|
13
+ %tr
14
+ %td= r['_id']
15
+ %td= r['total']
16
+
data/config/routes.rb CHANGED
@@ -61,7 +61,7 @@ IshManager::Engine.routes.draw do
61
61
  post 'email_campaigns/:id/send', to: 'email_campaigns#do_send', as: :send_email_campaign
62
62
  resources :email_campaigns
63
63
 
64
- resources :email_campaign_leads, as: :campaign_leads
64
+ resources :email_campaign_leads # , as: :campaign_leads
65
65
 
66
66
  resources :email_filters
67
67
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8.416
4
+ version: 0.1.8.418
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox