pagination
This commit is contained in:
parent
9af882826b
commit
4b12b69c25
2
Gemfile
2
Gemfile
|
@ -42,6 +42,8 @@ gem 'net-ldap'
|
|||
|
||||
gem 'devise'
|
||||
|
||||
gem "kaminari"
|
||||
|
||||
# Reduces boot times through caching; required in config/boot.rb
|
||||
gem 'bootsnap', '>= 1.4.2', require: false
|
||||
|
||||
|
|
13
Gemfile.lock
13
Gemfile.lock
|
@ -119,6 +119,18 @@ GEM
|
|||
concurrent-ruby (~> 1.0)
|
||||
jbuilder (2.10.1)
|
||||
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)
|
||||
rb-fsevent (~> 0.10, >= 0.10.3)
|
||||
rb-inotify (~> 0.9, >= 0.9.10)
|
||||
|
@ -263,6 +275,7 @@ DEPENDENCIES
|
|||
elasticsearch-persistence
|
||||
elasticsearch-rails
|
||||
jbuilder (~> 2.7)
|
||||
kaminari
|
||||
listen (~> 3.2)
|
||||
net-ldap
|
||||
nokogiri (= 1.11.0)
|
||||
|
|
|
@ -36,7 +36,7 @@ Pour injecter les metadonnées issues de LDAP :
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@ class EmailsController < ApplicationController
|
|||
# GET /emails
|
||||
# GET /emails.json
|
||||
def index
|
||||
@emails = Email.all
|
||||
@emails = Email.order(date: :desc).page(params[:page])
|
||||
end
|
||||
|
||||
# GET /emails/1
|
||||
|
|
|
@ -42,6 +42,8 @@
|
|||
</tbody>
|
||||
</table>
|
||||
|
||||
<%= paginate @emails %>
|
||||
|
||||
<br>
|
||||
|
||||
<%= link_to 'New Email', new_email_path %>
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
<tr>
|
||||
<th>From Cron</th>
|
||||
<td>
|
||||
<%= @email.cron? ? "Yes" : "No" %>
|
||||
<span class="<%= @email.cron? ? "email_attribute_cron" : "" %>"><%= @email.cron? ? "Yes" : "No" %></span>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
Loading…
Reference in a new issue