Skip to content

Commit

Permalink
Merge pull request #3029 from AtlasOfLivingAustralia/feature/issue3005
Browse files Browse the repository at this point in the history
Move reports to top of org Reporting tab, update declaration #3005
  • Loading branch information
salomon-j authored Nov 13, 2023
2 parents e4ce849 + 65ad777 commit 4dd2ed4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
3 changes: 2 additions & 1 deletion grails-app/assets/javascripts/dataSets.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ var DataSetViewModel = function(dataSet, projectService, options) {
}
});

self.collectionApp = ko.observable(dataSet.collectionApp);
self.collectionApp = ko.observable();
self.location = ko.observable(dataSet.location);
self.siteId = ko.observable(dataSet.siteId);
self.siteUrl = options.viewSiteUrl + '/' + dataSet.siteId;
Expand All @@ -135,6 +135,7 @@ var DataSetViewModel = function(dataSet, projectService, options) {
self.publicationUrl('Biodiversity Data Repository (URL pending)');
}
});
self.collectionApp(dataSet.collectionApp); // Set this after declaration to trigger the subscription above.

if (dataSet.sensitivities && !_.isArray(dataSet.sensitivities)) {
dataSet.sensitivities = [dataSet.sensitivities];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class OrganisationController {
Map projectGroups = projectGroupingHelper.groupProjectsByProgram(projects, programGroups, ["organisationId:"+organisation.organisationId], true)

[about : [label: 'About', visible: true, stopBinding: false, type:'tab', default:!reportingVisible, displayedPrograms:projectGroups.displayedPrograms, servicesDashboard:[visible:true]],
projects : [label: 'Reporting', template:"/shared/projectListByProgram", visible: reportingVisible, stopBinding:true, default:reportingVisible, type: 'tab', reports:organisation.reports, adHocReportTypes:adHocReportTypes, reportOrder:reportOrder, hideDueDate:true, displayedPrograms:projectGroups.displayedPrograms],
projects : [label: 'Reporting', template:"/shared/projectListByProgram", visible: reportingVisible, stopBinding:true, default:reportingVisible, type: 'tab', reports:organisation.reports, adHocReportTypes:adHocReportTypes, reportOrder:reportOrder, hideDueDate:true, displayedPrograms:projectGroups.displayedPrograms, reportsFirst:true, declarationType:SettingPageType.RDP_REPORT_DECLARATION],
sites : [label: 'Sites', visible: reportingVisible, type: 'tab', stopBinding:true, projectCount:organisation.projects?.size()?:0, showShapefileDownload:hasAdminAccess],
dashboard : [label: 'Dashboard', visible: reportingVisible, stopBinding:true, type: 'tab', template:'/shared/dashboard', reports:dashboardReports],
admin : [label: 'Admin', visible: hasAdminAccess, type: 'tab', template:'admin', showEditAnnoucements:showEditAnnoucements, availableReportCategories:availableReportCategories]]
Expand Down
5 changes: 5 additions & 0 deletions grails-app/views/shared/_categorizedReportsAndDeclaration.gsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<!-- ko stopBinding:true -->
<g:render template="/shared/categorizedReporting"/>

<g:render template="/shared/declaration_bs4" model="${[declarationType:declarationType ?: au.org.ala.merit.SettingPageType.RLP_REPORT_DECLARATION]}"/>
<!-- /ko -->
12 changes: 6 additions & 6 deletions grails-app/views/shared/_projectListByProgram.gsp
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

<g:if test="${reportsFirst}">
<g:render template="/shared/categorizedReportsAndDeclaration"/>
</g:if>
<div class="projects-wrapper d-none d-md-block">
<g:if test="${displayedPrograms}">
<g:each var="programDetails" status="i" in="${displayedPrograms}">
Expand Down Expand Up @@ -32,8 +34,6 @@
</g:if>
</div>

<!-- ko stopBinding:true -->
<g:render template="/shared/categorizedReporting"/>

<g:render template="/shared/declaration_bs4" model="${[declarationType:au.org.ala.merit.SettingPageType.RLP_REPORT_DECLARATION]}"/>
<!-- /ko -->
<g:if test="${!reportsFirst}">
<g:render template="/shared/categorizedReportsAndDeclaration"/>
</g:if>

0 comments on commit 4dd2ed4

Please sign in to comment.