pagination
This commit is contained in:
parent
9af882826b
commit
4b12b69c25
2
Gemfile
2
Gemfile
|
@ -42,6 +42,8 @@ gem 'net-ldap'
|
||||||
|
|
||||||
gem 'devise'
|
gem 'devise'
|
||||||
|
|
||||||
|
gem "kaminari"
|
||||||
|
|
||||||
# Reduces boot times through caching; required in config/boot.rb
|
# Reduces boot times through caching; required in config/boot.rb
|
||||||
gem 'bootsnap', '>= 1.4.2', require: false
|
gem 'bootsnap', '>= 1.4.2', require: false
|
||||||
|
|
||||||
|
|
13
Gemfile.lock
13
Gemfile.lock
|
@ -119,6 +119,18 @@ GEM
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
jbuilder (2.10.1)
|
jbuilder (2.10.1)
|
||||||
activesupport (>= 5.0.0)
|
activesupport (>= 5.0.0)
|
||||||
|
kaminari (1.2.1)
|
||||||
|
activesupport (>= 4.1.0)
|
||||||
|
kaminari-actionview (= 1.2.1)
|
||||||
|
kaminari-activerecord (= 1.2.1)
|
||||||
|
kaminari-core (= 1.2.1)
|
||||||
|
kaminari-actionview (1.2.1)
|
||||||
|
actionview
|
||||||
|
kaminari-core (= 1.2.1)
|
||||||
|
kaminari-activerecord (1.2.1)
|
||||||
|
activerecord
|
||||||
|
kaminari-core (= 1.2.1)
|
||||||
|
kaminari-core (1.2.1)
|
||||||
listen (3.3.3)
|
listen (3.3.3)
|
||||||
rb-fsevent (~> 0.10, >= 0.10.3)
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
||||||
rb-inotify (~> 0.9, >= 0.9.10)
|
rb-inotify (~> 0.9, >= 0.9.10)
|
||||||
|
@ -263,6 +275,7 @@ DEPENDENCIES
|
||||||
elasticsearch-persistence
|
elasticsearch-persistence
|
||||||
elasticsearch-rails
|
elasticsearch-rails
|
||||||
jbuilder (~> 2.7)
|
jbuilder (~> 2.7)
|
||||||
|
kaminari
|
||||||
listen (~> 3.2)
|
listen (~> 3.2)
|
||||||
net-ldap
|
net-ldap
|
||||||
nokogiri (= 1.11.0)
|
nokogiri (= 1.11.0)
|
||||||
|
|
|
@ -36,7 +36,7 @@ Pour injecter les metadonnées issues de LDAP :
|
||||||
rails metadata_mappings:import
|
rails metadata_mappings:import
|
||||||
```
|
```
|
||||||
|
|
||||||
Pour injecter manuellement des mails dans le système :
|
Pour injecter manuellement des mails dans le système (le serveur Rails doit tourner) :
|
||||||
|
|
||||||
```
|
```
|
||||||
for file in tmp/equipe-select/*.eml; do cat "${file}" | rails action_mailbox:ingress:postfix URL=http://0.0.0.0:3000/rails/action_mailbox/relay/inbound_emails INGRESS_PASSWORD=XXXXXXXX; done
|
for file in tmp/equipe-select/*.eml; do cat "${file}" | rails action_mailbox:ingress:postfix URL=http://0.0.0.0:3000/rails/action_mailbox/relay/inbound_emails INGRESS_PASSWORD=XXXXXXXX; done
|
||||||
|
|
|
@ -4,7 +4,7 @@ class EmailsController < ApplicationController
|
||||||
# GET /emails
|
# GET /emails
|
||||||
# GET /emails.json
|
# GET /emails.json
|
||||||
def index
|
def index
|
||||||
@emails = Email.all
|
@emails = Email.order(date: :desc).page(params[:page])
|
||||||
end
|
end
|
||||||
|
|
||||||
# GET /emails/1
|
# GET /emails/1
|
||||||
|
|
|
@ -42,6 +42,8 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<%= paginate @emails %>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<%= link_to 'New Email', new_email_path %>
|
<%= link_to 'New Email', new_email_path %>
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th>From Cron</th>
|
<th>From Cron</th>
|
||||||
<td>
|
<td>
|
||||||
<%= @email.cron? ? "Yes" : "No" %>
|
<span class="<%= @email.cron? ? "email_attribute_cron" : "" %>"><%= @email.cron? ? "Yes" : "No" %></span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
Loading…
Reference in a new issue