<script type="text/html" id="project-documentation-widget-template">
    <div class="right-pane-widget--container no-top-border project-documentation--container">
        <div class="item-dropdown-widget">
            <div class="item-dropdown--title">{@= name @}</div>
            <div class="item--dropdown">
                <div class="item--body">
                    <div class="item--body-title">
                        <div class="item--left-column">Release</div>
                        <div class="item--right-column">Documentation</div>
                    </div>
                    {@ _.each(releases, function(release) { @}
                    <div class="item--body--version">
                        <div class="item--left-column">
                            <p>{@= release.version @}</p>
                            <div class="spring-icon {@= release.statusIconClass() @}"></div>
                        </div>
                        <div class="item--right-column">
                            <a href='{@= release.refDocUrl @}' class="docs-link reference-link">Reference</a>
                            <a href='{@= release.apiDocUrl @}' class="docs-link api-link">API</a>
                        </div>
                    </div>
                    {@ }); @}
                </div>
            </div>
        </div>
    </div>
</script>

<script type="text/html" id="project-download-widget-controls-template">
    <div class="js-download-widget-selector">
        <select class='selector selectpicker'>
            {@ _.each(releases, function(release, index) { @}
            <option value="{@= index @}" data-content="<span>{@= release.versionDisplayName @}</span><div class='spring-icon {@= release.statusIconClass() @}'/>" data-current="{@= release.current @}"> ()</option>
            {@ }); @}
        </select>
    </div>

    <div class="item-slider-widget js-item-slider--wrapper">
        <div class="item-slider--container">
            <div class="item--slider js-item--slider"></div>
            <div class="item js-active js-item" data-snippet-type='maven'>
                Maven
            </div>
            <div class="item js-item" data-snippet-type='gradle'>
                Gradle
            </div>
            <div class="item js-item" data-snippet-type='zip'>
                Zip
            </div>
        </div>
    </div>

</script>


{% capture maven_pom_template %}
{% include pom.xml %}
{% endcapture %}

{%if maven_pom_template contains 'not found in _includes directory' %}
{% capture maven_pom_template %}
<dependencies>
    <dependency>
        <groupId>{@= groupId @}</groupId>
        <artifactId>{@= artifactId @}</artifactId>
        <version>{@= version @}</version>
    </dependency>
</dependencies>
{@ if (repository) { @}
<repositories>
    <repository>
        <id>{@= repository.id @}</id>
        <name>{@= repository.name @}</name>
        <url>{@= repository.url @}</url>
        <snapshots>
            <enabled>{@= repository.snapshotsEnabled @}</enabled>
        </snapshots>
    </repository>
</repositories>{@ } @}
{% endcapture %}
{% endif %}

<script type="text/html" id="project-download-maven-widget-template">{{ maven_pom_template | escape }}</script>

{% capture gradle_template %}
{% include build.gradle %}
{% endcapture %}

{%if gradle_template contains 'not found in _includes directory' %}
{% capture gradle_template %}
dependencies {
    compile '{@= groupId @}:{@= artifactId @}:{@= version @}'
}
{@ if (repository) { @}
repositories {
    maven {
        url '{@= repository.url @}'
    }
}
{@ } @}
{% endcapture %}
{% endif %}

<script type="text/html" id="project-download-gradle-widget-template">{{ gradle_template | escape }}</script>

<script type="text/html" id="project-download-zip-widget-template">
This is a zip url
</script>