Skip to content

Commit

Permalink
Merge pull request #2888 from benwbrum/2883-status-of-works-in-sets
Browse files Browse the repository at this point in the history
#2883 display status instead of collaboration in set work list
  • Loading branch information
benwbrum committed Apr 13, 2022
2 parents 0a860fd + 4c0008e commit 64695c0
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
16 changes: 13 additions & 3 deletions app/views/document_sets/index.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ br
thead
tr
th =t('.work')
th =t('.collaboration')
th =t('.status')
-@collection.document_sets.each do |document_set|
th
=document_set.title
Expand All @@ -57,9 +57,19 @@ br
tr
td
=work.title

-work_stats(work)
td
i
=work.restrict_scribes ? t('.restricted') : t('.unrestricted')
span(title="#{pluralize(work.work_statistic.total_pages, 'page')}: #{@wording}")
.progress
-unless @collection.subjects_disabled
span(style="width:#{@progress_annotated}%")
span(style="width:#{@progress_completed - @progress_annotated}%")
span(style="width:#{@progress_review}%")
-else
span(style="width:#{@progress_completed}%")
span(style="width:#{@progress_review}%")

-ids = work.document_sets.ids
-@collection.document_sets.each do |document_set|
td
Expand Down
16 changes: 13 additions & 3 deletions app/views/document_sets/settings.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
thead
tr
th =t('.work')
th =t('.collaboration')
th =t('.status')
th =t('.add')
tbody
-@works.each do |work|
Expand All @@ -37,8 +37,18 @@
span
ocr
td
i
=work.restrict_scribes ? t('.restricted') : t('.unrestricted')
-work_stats(work)
span(title="#{pluralize(work.work_statistic.total_pages, 'page')}: #{@wording}")
.progress
-unless @collection.subjects_disabled
span(style="width:#{@progress_annotated}%")
span(style="width:#{@progress_completed - @progress_annotated}%")
span(style="width:#{@progress_review}%")

-else
span(style="width:#{@progress_completed}%")
span(style="width:#{@progress_review}%")

td.document_set
=check_box_tag("work[#{work.id}]", "work[#{work.id}]", false, {"title" => t('.add_work_title_to_document_set', work_title: work.title)})
br
Expand Down

0 comments on commit 64695c0

Please sign in to comment.