{#- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -#} {% macro csrf() -%} {% if request is defined -%} {{ request.cookies['_session_id'] or request.environ['_session_id'] }} {%- endif %} {%- endmacro %} {% macro csrf_token() -%} {% if request is defined %} {% endif %} {%- endmacro %} {% macro related_artifacts(artifact) -%} {% set related_artifacts = artifact.related_artifacts(user=c.user) %} {% if related_artifacts %}
{% for related in related_artifacts %}
{% if not related.app_config|default %}
{# e.g. a Commit is not currently an Artifact #}
{% set prefix = related.type_s %}
{% else %}
{% set tool = related.app_config.options.mount_label %}
{% if related.project != artifact.project %}
{% set prefix = '%s: %s' % (related.project.name, tool) %}
{% else %}
{% set prefix = tool %}
{% endif %}
{% endif %}
{{prefix}}: {{related.link_text()}}
{% endfor %}
{{config.site_name}} uses markdown syntax everywhere to allow you to create rich
text markup, and extends markdown in several ways to allow for quick linking
to other artifacts in your project.
Markdown was created to be easy to read, easy to write, and still readable in plain text format.