wco_email 0.1.1.47 → 0.1.1.49

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: 2996a79be6c77e99c6fa0f6327b5afbe697b5b6ca4d0d45bd0c00c264b78be00
4
- data.tar.gz: 0c5d1bf430b5ded23eb772ebdda08f6705904e52da1149bddcc27f65ec614fe8
3
+ metadata.gz: bfdc93a04b6ada90896eb286b87784236064a3bdc94b43fc935c8e4ed0cc4803
4
+ data.tar.gz: 8e0214d33ebd8ddab96867418993df99af76bf946fc450d938cb62bef3d9807f
5
5
  SHA512:
6
- metadata.gz: 36703d5acc4cc7e0a405285fb5d092f3daaac0afe651903362a8b476e8e5fa0236567580c1abd852516f8ec69edcdb81680283afda46e6162c1e95129d9f93f7
7
- data.tar.gz: f5f62b32a0aaeb46cf9c646ecf041a49769f234ec317a0510674253e02e165e2c438ef5e66680beaffd3d5f64da377e060dde3073eb66a13a1a04c7ade538b9f
6
+ metadata.gz: 968f20e090484637b7f1214f040d2afb0159a8f6959cb9d006c2239aca0fa4708d3619a59209379705f3c441f673c9bbf1370e4024614f188d5d50fa25b0ffe7
7
+ data.tar.gz: 45912f6f3d88898d76fc19e8e7f06accd2bdd5b21efe9c90df111880dcd270c34e963327012aebbdf3e8c9680a12ca09dcb07d3b996c27cec440e1f0ccc4c89c
@@ -22,6 +22,11 @@ class WcoEmail::ConversationsController < WcoEmail::ApplicationController
22
22
  # redirect_to request.referrer # || root_path
23
23
  end
24
24
 
25
+ def edit
26
+ @conversation = ::WcoEmail::Conversation.find( params[:id] )
27
+ authorize! :edit, @conversation
28
+ end
29
+
25
30
  def index
26
31
  authorize! :index, WcoEmail::Conversation
27
32
  @conversations = WcoEmail::Conversation.all
@@ -86,8 +91,8 @@ class WcoEmail::ConversationsController < WcoEmail::ApplicationController
86
91
  end
87
92
 
88
93
  def show
89
- authorize! :show, WcoEmail::Conversation
90
94
  @conversation = ::WcoEmail::Conversation.find( params[:id] )
95
+ authorize! :show, @conversation
91
96
  @messages = @conversation.messages.order_by( date: :asc )
92
97
  @conversation.update_attributes({ status: Conv::STATUS_READ })
93
98
 
@@ -102,6 +107,16 @@ class WcoEmail::ConversationsController < WcoEmail::ApplicationController
102
107
  end
103
108
  end
104
109
 
110
+ def update
111
+ @conversation = ::WcoEmail::Conversation.find( params[:id] )
112
+ authorize! :update, @conversation
113
+ if @conversation.update( params[:conversation].permit! )
114
+ flash_notice 'ok'
115
+ else
116
+ flash_alert @conversation
117
+ end
118
+ redirect_to action: 'show', id: @conversation.id
119
+ end
105
120
 
106
121
  ##
107
122
  ## private
@@ -0,0 +1,7 @@
1
+
2
+ = form_for conversation do |f|
3
+ .d-flex
4
+ %label Subject
5
+ = f.text_field :subject, class: 'w-100'
6
+ .actions
7
+ = f.submit
@@ -0,0 +1,3 @@
1
+
2
+ .conversations-edit.maxwidth
3
+ = render 'form', conversation: @conversation
@@ -6,6 +6,7 @@
6
6
  %h5
7
7
  = @conversation.subject
8
8
  <b>(#{@conversation.messages.length})</b>
9
+ = link_to '[~]', edit_conversation_path(@conversation)
9
10
  %span.gray.mini= @conversation.id
10
11
 
11
12
 
@@ -20,7 +20,9 @@
20
20
  <b>n_images:</b> #{message.photos.length}
21
21
  %br
22
22
  - message.photos.each do |photo|
23
- = image_tag photo.photo.url(:thumb)
23
+ = link_to photo.photo.url(:original), target: :_blank do
24
+ %span.bordered.p-0= image_tag( photo.photo.url(:mini) )
25
+ = photo.photo.original_filename
24
26
  %li
25
27
  <b>n_assets:</b> #{message.assets.length}
26
28
  - if !message.assets.blank?
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.47
4
+ version: 0.1.1.49
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev
@@ -383,7 +383,9 @@ files:
383
383
  - app/views/wco_email/contexts/summary.csv.erb
384
384
  - app/views/wco_email/contexts/summary.haml
385
385
  - app/views/wco_email/conversations/_actions.haml
386
+ - app/views/wco_email/conversations/_form.haml
386
387
  - app/views/wco_email/conversations/_search.haml
388
+ - app/views/wco_email/conversations/edit.haml
387
389
  - app/views/wco_email/conversations/index.haml
388
390
  - app/views/wco_email/conversations/show.haml
389
391
  - app/views/wco_email/email_action_templates/_form.haml