Skip to content

Commit

Permalink
Update to metamodel v14, release 1.19.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MarekSuchanek committed Sep 2, 2024
1 parent 5a1c296 commit 1ab078b
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 13 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ This document template for DSW is available as open-source via GitHub Repository

## Changelog

### 1.19.0

- Adjusted to template metamodel version 14 (released in DSW 4.10.0)

### 1.18.1

- Fixed nested bullet points would display unwanted characters
Expand Down
10 changes: 5 additions & 5 deletions src/header.html.j2
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<header>
<p class="dmp"></p>
<h1>
{{ ctx.questionnaireName }}
{{ ctx.questionnaire.name }}
</h1>
<div class="dmp-info">
<dl>
Expand Down Expand Up @@ -60,18 +60,18 @@
<dd>{{ km.entities.phases[ctx.phaseUuid].title }}</dd>
{%- endif -%}

{%- if ctx.createdBy -%}
{%- if ctx.questionnaire.createdBy -%}
<dt>Created by</dt>
<dd><span class="contact-name">{{ ctx.createdBy.firstName }} {{ ctx.createdBy.lastName }}</span> ({{ macros.formatEmail(ctx.createdBy.email) }}){% if ctx.createdBy.affiliation %}<br>{{ ctx.createdBy.affiliation }}{% endif %}</dd>
<dd><span class="contact-name">{{ ctx.questionnaire.createdBy.firstName }} {{ ctx.questionnaire.createdBy.lastName }}</span> ({{ macros.formatEmail(ctx.createdBy.email) }}){% if ctx.createdBy.affiliation %}<br>{{ ctx.createdBy.affiliation }}{% endif %}</dd>
{%- endif -%}

{% for version in ctx.questionnaireVersions if version.uuid == ctx.questionnaireVersion %}
{% for version in ctx.questionnaire.versions if version.uuid == ctx.questionnaire.versionUuid %}
<dt>Version</dt>
<dd>{{version.name}} ({{ version.createdAt|datetime_format("%d %b %Y") }})</dd>
{% endfor %}

<dt>Generated on</dt>
<dd>{{ ctx.createdAt|datetime_format("%d %b %Y") }}</dd>
<dd>{{ ctx.document.createdAt|datetime_format("%d %b %Y") }}</dd>
</dl>
<p class="note">
Data Management Plan created in {{ globals.fullName }} &laquo;<a href="{{ globals.linkUrl }}" target="_blank">{{ globals.link }}</a>&raquo;
Expand Down
2 changes: 1 addition & 1 deletion src/index.html.j2
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!DOCTYPE HTML>
{%- set km = ctx.knowledgeModel -%}
{%- set repliesMap = ctx.questionnaireReplies -%}
{%- set repliesMap = ctx.questionnaire.replies -%}
{%- set report = ctx.report -%}
{%- set dc = ctx|to_context_obj -%}
{% import "src/macros.html.j2" as macros with context %}
Expand Down
6 changes: 3 additions & 3 deletions src/questions/14-dm-responsible.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<h3>14. Who (for example role, position, and institution) will be responsible for data management (i.e. the data steward)?</h3>

<div class="answer">
{# NOTE: Public questionnaires does not have "ctx.createdBy" filled #}
{%- if ctx.createdBy %}
<p>{{ctx.createdBy.firstName}} {{ctx.createdBy.lastName}} is responsible for implementing the DMP, and ensuring it is reviewed and revised.</p>
{# NOTE: Public questionnaires does not have "ctx.questionnaire.createdBy" filled #}
{%- if ctx.questionnaire.createdBy %}
<p>{{ctx.questionnaire.createdBy.firstName}} {{ctx.questionnaire.createdBy.lastName}} is responsible for implementing the DMP, and ensuring it is reviewed and revised.</p>
{%- endif -%}

{%- set contributorsPath = [uuids.adminDetailsCUuid, uuids.contributorsQUuid]|reply_path -%}
Expand Down
4 changes: 2 additions & 2 deletions src/word/index.html.j2
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<!DOCTYPE HTML>
{%- set km = ctx.knowledgeModel -%}
{%- set repliesMap = ctx.questionnaireReplies -%}
{%- set repliesMap = ctx.questionnaire.replies -%}
{%- set report = ctx.report -%}
{%- set dc = ctx|to_context_obj -%}
{% import "src/macros.html.j2" as macros with context %}
{% import "src/uuids.j2" as uuids with context %}
{% import "src/globals.j2" as globals with context %}
<html lang="en">
<head>
<title>{{ ctx.questionnaireName }}</title>
<title>{{ ctx.questionnaire.name }}</title>
<meta charset="utf-8">
<style>
{% include "src/style.css" %}
Expand Down
4 changes: 2 additions & 2 deletions template.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"organizationId": "dsw",
"templateId": "science-europe",
"version": "1.18.1",
"version": "1.19.0",
"name": "Science Europe DMP Template",
"description": "Default DCC DMP Template recommended by Science Europe",
"license": "Apache-2.0",
"metamodelVersion": 13,
"metamodelVersion": 14,
"allowedPackages": [
{
"orgId": "dsw",
Expand Down

0 comments on commit 1ab078b

Please sign in to comment.