wco_email 0.1.1.63 → 0.1.1.64

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: f805c9c1a7afca2746021a03262841dea1d91082a484a8466fbf97aec6f33a45
4
- data.tar.gz: ee6aa3515782753729fed878741e8e10e8751699d0c40c885ca2b4a3c1d1ebbd
3
+ metadata.gz: b555e0ae1bf5c4011332c6205ce52793e687695286f2bd77c6065096927cca53
4
+ data.tar.gz: 0cd20ee64de8c3bc8940dd231e11cacfa8847de88fdd7e75395357db417aca9c
5
5
  SHA512:
6
- metadata.gz: 3c76002ef3aeda957bf51df966885aa2167e267812f974869d912a78031e46103d912030f3d0074d0322b2dd96b9e7b2c7d1b5edd4a3ffaa054bf58bc75eed4e
7
- data.tar.gz: 2f27caae727569baa76656185c9fc68940c11ed5ba42ca29826611ef912b6b848aca4033d37d0646e0553e50b2d3a312d3781743b422ca7185b3152bb322bfed
6
+ metadata.gz: 95a9817a224cb424ed75cb85f8f586c72eefa7f3f15e0a0666967e2256762d01df404ccf28558b87cf9fbe7fa5f2f25cf5de7907e732bf7ca2a821f37631d8db
7
+ data.tar.gz: 328cc45c77685946582895d32f5bd488ca021c12a7cd38e059475fafd5fff964df116214dd44b2ca880cdcf0ed0862c4fd6b9e3cb396ab52418b2040192686c6
@@ -107,7 +107,11 @@ class WcoEmail::ConversationsController < WcoEmail::ApplicationController
107
107
  def show
108
108
  @conversation = ::WcoEmail::Conversation.find( params[:id] )
109
109
  authorize! :show, @conversation
110
- @messages = @conversation.messages.order_by( date: :asc )
110
+ @messages = @conversation.messages(
111
+ ).order_by( date: :asc
112
+ ).page( params[:messages_page ] ).per( @current_profile.per_page
113
+ )
114
+
111
115
  @conversation.update_attributes({ status: Conv::STATUS_READ })
112
116
 
113
117
  @conversation.messages.unread.update_all({ read_at: Time.now })
@@ -7,7 +7,7 @@
7
7
  .conversations-show.maxwidth
8
8
  %h5
9
9
  = @conversation.subject
10
- <b>(#{@conversation.messages.length})</b>
10
+ <b>(#{@messages.length})</b>
11
11
  = link_to '[~]', edit_conversation_path(@conversation)
12
12
  %span.gray.mini= @conversation.id
13
13
 
@@ -31,13 +31,15 @@
31
31
 
32
32
 
33
33
  .m-0.p-0
34
- - @conversation.messages.each do |msg|
34
+ = paginate @messages, param_name: :messages_page
35
+ - @messages.each do |msg|
35
36
  .Message.mb-2
36
37
  = render '/wco_email/messages/meta', message: msg
37
38
  = link_to '[expand]', message_iframe_path(msg, expand_history: true), target: "iframe_#{msg.id}"
38
39
  = link_to '[collapse]', message_iframe_path(msg), target: "iframe_#{msg.id}"
39
40
  %span.collapse-expand{ id: "iframe_#{msg.id}" } [<>]
40
41
  %iframe.message-iframe{ src: message_iframe_path(msg), name: "iframe_#{msg.id}", onload: "resizeIframe(this)" }
42
+ = paginate @messages, param_name: :messages_page
41
43
 
42
- - msg = @conversation.messages.last
44
+ - msg = @messages.last
43
45
  = render '/wco_email/contexts/form_reply', lead_id: msg.lead_id, message: msg, ctx: WcoEmail::Context.new({ from_email: msg.to&.downcase, subject: msg.subject, email_template_id: ET.find_by( slug: 'blank').id })
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wco_email
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1.63
4
+ version: 0.1.1.64
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-08 00:00:00.000000000 Z
11
+ date: 2024-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3