Skip to content

Commit

Permalink
Added column to data set summary #3025
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisala committed Nov 9, 2023
1 parent f3881da commit 5a2a5c8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion grails-app/assets/javascripts/dataSets.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@

var MONITOR_APP = 'Monitor';
/**
* This view model backs the "Data set summary" tab that is optionally displayed on project
* pages that support it.
Expand Down Expand Up @@ -26,6 +28,7 @@ var DataSetsViewModel =function(dataSets, projectService, config) {
this.editUrl = config.editDataSetUrl + '?dataSetId='+dataSet.dataSetId;
this.viewUrl = config.viewDataSetUrl + '?dataSetId='+dataSet.dataSetId;
this.name = dataSet.name;
this.createdIn = dataSet.collectionApp === MONITOR_APP ? MONITOR_APP : 'MERIT';
this.progress = dataSet.progress;
this.deleteDataSet = function() {
bootbox.confirm("Are you sure?", function(yes) {
Expand Down Expand Up @@ -127,7 +130,7 @@ var DataSetViewModel = function(dataSet, projectService, options) {
self.publicationUrl = ko.observable(dataSet.publicationUrl);
self.format = ko.observable(dataSet.format);
self.collectionApp.subscribe(function(collectionApp) {
if (collectionApp == 'Monitor') {
if (collectionApp == MONITOR_APP) {
self.format('Database Table');
self.publicationUrl('Biodiversity Data Repository (URL pending)');
}
Expand Down
4 changes: 3 additions & 1 deletion grails-app/views/project/dataset/_dataSets.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<tr>
<th class="actions">Actions</th>
<th class="dataset-name">Title</th>
<th class="created-in">Created in</th>
<th class="dataset-progress">Status</th>
</tr>
</thead>
Expand All @@ -31,9 +32,10 @@
</a>
</td>
<td class="dataset-name" data-bind="text:name"></td>
<td class="created-in" data-bind="text:createdIn"></td>
<td><button type="button" class="btn btn-sm" data-bind="activityProgress:progress">
<span data-bind="text: progress"></span>
</button>
</button>
</td>
</tr>
</tbody>
Expand Down

0 comments on commit 5a2a5c8

Please sign in to comment.