Skip to content

Commit

Permalink
merge: Fix template syntax errors (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wuestengecko committed Jan 27, 2025
2 parents 8617e19 + 7a2f7c0 commit a62cdb8
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 23 deletions.
2 changes: 1 addition & 1 deletion templates/__generic__.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{% if object.name %}
<h1>{{ object.name }} <span style="font-size: 60%">({{ object.__class__.__name__ }})</span></h1>
{% else %}
<h1>Unnamed ({{ object.__class__.__name__ }})</small></h1>
<h1>Unnamed ({{ object.__class__.__name__ }})</h1>
{% endif %}

{{show_other_attributes(object) | safe}}
1 change: 0 additions & 1 deletion templates/common_macros.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@
{{req_rels(req.relations, scope=scope) | safe}}
{{show_other_attributes(req, excluded=["related", "relations", "requirements", "text", "owner", "validate", "xtype"], hide_rules_check=True, hide_unset_attrs=True) | safe}}
</td>
</div>
</tr>
{% endfor %}
</table>
Expand Down
14 changes: 8 additions & 6 deletions templates/cross-cutting/region.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,21 @@ Upon completion of all entry activities of <i>{{ render_name_with_icon(tx.source
</ul>
{% endif %}

{% if state.entry %}
<p>On entry into the <b>{{ state.name }}</b> {{ state.__class__.__name__ }} the system shall perform the following activities:
{% for fnc in state.entry %}
{% if state.entries %}
<p>
On entry into the <b>{{ state.name }}</b> {{ state.__class__.__name__ }} the system shall perform the following activities:
{% for fnc in state.entries %}
{{ render_name_with_icon(fnc) | safe }};
{% endfor %}</p>
{% endfor %}
</p>
{% endif %}

{% if state.do_activity %}
<p>While in <b>{{ state.name }}</b> {{ state.__class__.__name__ }} the system may perform the following activities: </p>
<p>While in <b>{{ state.name }}</b> {{ state.__class__.__name__ }} the system may perform the following activities:</p>
<ul>
{% for fnc in state.do_activity %}
<li>{{ render_name_with_icon(fnc) | safe }} </li>
{% endfor %}</p>
{% endfor %}
</ul>
{% endif %}

Expand Down
2 changes: 1 addition & 1 deletion templates/functional.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
<p>The function is available in the following states of the {{ owner | safe }}:</p>
<ul>
{% for state in object.available_in_states %}
<li>{{linked_name_with_icon(state) | safe}}</a></li>
<li>{{linked_name_with_icon(state) | safe}}</li>
{% endfor %}
</ul>
{% else %}
Expand Down
2 changes: 1 addition & 1 deletion templates/logical-architecture/logical-component.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The figure below provides an overview of the logical subsystem and external enti

{{ object.context_diagram.as_svg|safe }}

<h3>Logical interface partners of {{object.name}}</h2>
<h3>Logical interface partners of {{object.name}}</h3>

{% set lexcs = [] %}{% for port in object.ports %}{% for lexc in port.exchanges %}
{% set _ = lexcs.append([lexc, lexc.source.owner if lexc.source.owner != subsystem else lexc.target.owner]) %}
Expand Down
14 changes: 8 additions & 6 deletions templates/logical-architecture/logical-state.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,21 @@ Upon completion of all entry activities of <i>{{ render_name_with_icon(tx.source
</ul>
{% endif %}

{% if object.entry %}
<p>On entry into the <b>{{ object.name }}</b> {{ object.__class__.__name__ }} the system shall perform the following activities:
{% for fnc in object.entry %}
{% if object.entries %}
<p>
On entry into the <b>{{ object.name }}</b> {{ object.__class__.__name__ }} the system shall perform the following activities:
{% for fnc in object.entries %}
{{ render_name_with_icon(fnc) | safe }};
{% endfor %}</p>
{% endfor %}
</p>
{% endif %}

{% if object.do_activity %}
<p>While in <b>{{ object.name }}</b> {{ object.__class__.__name__ }} the system may perform the following activities: </p>
<p>While in <b>{{ object.name }}</b> {{ object.__class__.__name__ }} the system may perform the following activities:</p>
<ul>
{% for fnc in object.do_activity %}
<li>{{ render_name_with_icon(fnc) | safe }} </li>
{% endfor %}</p>
{% endfor %}
</ul>
{% endif %}

Expand Down
2 changes: 1 addition & 1 deletion templates/object_comparison.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
{% if object.name %}
<h1>{{ object.name }} <span style="font-size: 60%">({{ object.__class__.__name__ }})</span></h1>
{% else %}
<h1>Unnamed ({{ object.__class__.__name__ }})</small></h1>
<h1>Unnamed ({{ object.__class__.__name__ }})</h1>
{% endif %}
{{show_other_attributes(object, object_diff, display_modified_changes=display_modified_changes) | safe}}
{% else %}
Expand Down
9 changes: 5 additions & 4 deletions templates/system-analysis/mod-rules-compliance.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
{% endif -%}
{% endmacro -%}

</head>
<body>
<h1>Modeling Rules Compliance Report for System Analysis Layer</h1>
<p>
Expand All @@ -66,7 +65,7 @@
{% if total != 0 %}
<p><span style="color: {{color}}">{{score}}%</span> <small>({{passed}} / {{total}} rule checks)</small> for {{category}} rules category</p>
{% else %}
<p><span style="color: #ccc">No rules in {{category}} category apply to objects under evaluation.</p>
<p><span style="color: #ccc">No rules in {{category}} category apply to objects under evaluation.</span></p>
{% endif -%}
{% endfor %}

Expand Down Expand Up @@ -102,8 +101,10 @@
<table>
<thead>
<tr>
<th width="160px">Rule
<th>Definition
<th width="160px">Rule</th>
<th>Definition</th>
</tr>
</thead>
<tbody>
{% for rule in results.iter_rules() | sort(attribute="id") | sort(attribute="category.value") -%}
{% set rule_results = results.by_rule(rule) -%}
Expand Down
2 changes: 1 addition & 1 deletion templates/system-analysis/system-actor.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<b>{{ object.name }}</b>
</h1>
{% else %}
<h1>Unnamed ({{ object.__class__.__name__ }})</small></h1>
<h1>Unnamed ({{ object.__class__.__name__ }})</h1>
{% endif %}

{{ description(object) | safe }}
Expand Down
2 changes: 1 addition & 1 deletion templates/system-analysis/system-interface.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
{% if object.name %}
<h1>{{ object.name }} <span style="font-size: 60%">({{ object.__class__.__name__ }})</span></h1>
{% else %}
<h1>Unnamed ({{ object.__class__.__name__ }})</small></h1>
<h1>Unnamed ({{ object.__class__.__name__ }})</h1>
{% endif %}

{% set source_provides = [] %}
Expand Down

0 comments on commit a62cdb8

Please sign in to comment.