admin/logs viewer implemented
This commit is contained in:
parent
79bf7a2276
commit
b1dbcef80b
8 changed files with 27 additions and 15 deletions
|
|
@ -1,2 +0,0 @@
|
|||
h1 Admin#integration
|
||||
p Find me in app/views/admin/integration.html.slim
|
||||
27
app/views/admin/logs.slim
Normal file
27
app/views/admin/logs.slim
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
// Paginator and search bar
|
||||
.grid-x
|
||||
.small-6.medium-8.large-9.cell
|
||||
// Paginator
|
||||
= render 'admin/logs/paginator'
|
||||
|
||||
.small-6.medium-4.large-3.cell
|
||||
// Search form
|
||||
= form_tag url_for, :method=>'GET'
|
||||
= text_field_tag(:search, params[:search], placeholder: "Search...", maxlength: 50, size: 20, autofocus: true)
|
||||
|
||||
// List of log messages
|
||||
.grid-x
|
||||
- if @logs.length>0
|
||||
table
|
||||
tr
|
||||
th Timestamp
|
||||
th Message
|
||||
- @logs.each do |log|
|
||||
tr
|
||||
td =log.created_at
|
||||
td =log.message
|
||||
- else
|
||||
p No logs found. Crazy.
|
||||
|
||||
// Second paginator at the bottom so the user does not have to scroll up again
|
||||
= render 'admin/logs/paginator'
|
||||
8
app/views/admin/logs/_paginator.slim
Normal file
8
app/views/admin/logs/_paginator.slim
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
- if @logs.length>0
|
||||
// Use different pagination navigators depending on the screen width
|
||||
div.show-for-large
|
||||
=will_paginate @logs, :renderer => FoundationPagination::Rails, :inner_window => 3
|
||||
div.show-for-medium-only
|
||||
=will_paginate @logs, :renderer => FoundationPagination::Rails, :inner_window => 1
|
||||
div.show-for-small-only
|
||||
=will_paginate @logs, :renderer => FoundationPagination::Rails, :page_links => false
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
h1 Admin#screenshots
|
||||
p Find me in app/views/admin/screenshots.html.slim
|
||||
Loading…
Add table
Add a link
Reference in a new issue