Add document links to work items
This commit is contained in:
parent
f712837f91
commit
3d078f215f
@ -8,6 +8,12 @@
|
|||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
||||||
|
<% if work_item.started? && !work_item.completed? %>
|
||||||
|
<%= button_to "Complete",
|
||||||
|
work_item_complete_path(work_item),
|
||||||
|
class: 'action-button'
|
||||||
|
%>
|
||||||
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500" data-controller="popover" data-action="mouseenter->popover#show mouseleave->popover#hide">
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500" data-controller="popover" data-action="mouseenter->popover#show mouseleave->popover#hide">
|
||||||
@ -48,11 +54,8 @@
|
|||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
||||||
<% if work_item.started? && !work_item.completed? %>
|
<% if work_item.document_link.present? %>
|
||||||
<%= button_to "Complete",
|
<%= link_to "Open recording", work_item.document_link %>
|
||||||
work_item_complete_path(work_item),
|
|
||||||
class: 'action-button'
|
|
||||||
%>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@ -0,0 +1,5 @@
|
|||||||
|
class AddDocumentLinkToWorkItems < ActiveRecord::Migration[7.1]
|
||||||
|
def change
|
||||||
|
add_column :work_items, :document_link, :string
|
||||||
|
end
|
||||||
|
end
|
||||||
3
db/schema.rb
generated
3
db/schema.rb
generated
@ -10,7 +10,7 @@
|
|||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema[7.1].define(version: 2023_10_08_152722) do
|
ActiveRecord::Schema[7.1].define(version: 2023_10_08_153855) do
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
|
|
||||||
@ -70,6 +70,7 @@ ActiveRecord::Schema[7.1].define(version: 2023_10_08_152722) do
|
|||||||
t.datetime "updated_at", null: false
|
t.datetime "updated_at", null: false
|
||||||
t.datetime "available_from"
|
t.datetime "available_from"
|
||||||
t.datetime "completed_at"
|
t.datetime "completed_at"
|
||||||
|
t.string "document_link"
|
||||||
t.index ["course_id"], name: "index_work_items_on_course_id"
|
t.index ["course_id"], name: "index_work_items_on_course_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user