mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
add cached word count to revision index
This commit is contained in:
parent
6863887c62
commit
b208dd63c1
2
Gemfile
2
Gemfile
@ -88,6 +88,8 @@ gem 'discordrb'
|
||||
# Smarts
|
||||
gem 'word_count_analyzer'
|
||||
|
||||
gem 'will_paginate', '~> 4.0'
|
||||
|
||||
# Workers
|
||||
gem 'sidekiq'
|
||||
gem 'redis'
|
||||
|
||||
@ -1682,6 +1682,7 @@ GEM
|
||||
websocket-driver (0.7.5)
|
||||
websocket-extensions (>= 0.1.0)
|
||||
websocket-extensions (0.1.5)
|
||||
will_paginate (4.0.1)
|
||||
word_count_analyzer (1.0.1)
|
||||
engtagger
|
||||
zeitwerk (2.6.16)
|
||||
@ -1760,6 +1761,7 @@ DEPENDENCIES
|
||||
uglifier (>= 1.3.0)
|
||||
web-console
|
||||
webpacker
|
||||
will_paginate (~> 4.0)
|
||||
word_count_analyzer
|
||||
|
||||
RUBY VERSION
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
<tr>
|
||||
<th>Title</th>
|
||||
<th>Backed up</th>
|
||||
<th>Word Count</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -18,13 +19,14 @@
|
||||
<tr>
|
||||
<td><%= @document.title %></td>
|
||||
<td>Latest version</td>
|
||||
<td><%= @document.cached_word_count %></td>
|
||||
<td><%= link_to 'Edit document', edit_document_path(@document), class: 'btn' %></td>
|
||||
</tr>
|
||||
<% @document_revisions.each do |document_revision| %>
|
||||
<tr>
|
||||
<td><%= document_revision.title %></td>
|
||||
<td><span class="tooltipped" data-tooltip="Backed up at <%= document_revision.created_at %>"><%= time_ago_in_words document_revision.created_at %> ago</span></td>
|
||||
<td>
|
||||
<td><%= document_revision.cached_word_count %></td>
|
||||
<%= link_to 'View', document_document_revision_path(id: document_revision.id), class: 'btn' %>
|
||||
<%= link_to 'Delete', document_document_revision_path(document: @document, id: document_revision.id), method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn red lighten-5 red-text' %>
|
||||
</td>
|
||||
|
||||
@ -1938,6 +1938,7 @@ ActiveRecord::Schema.define(version: 2023_05_12_222601) do
|
||||
t.string "name", null: false
|
||||
t.string "type_of"
|
||||
t.text "description"
|
||||
t.string "map"
|
||||
t.string "population"
|
||||
t.string "language"
|
||||
t.string "currency"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user