|
@@ -1,5 +1,7 @@
|
|
|
{% extends "PackagistWebBundle::layout.html.twig" %}
|
|
|
|
|
|
+{% set showSearchDesc = 'hide' %}
|
|
|
+
|
|
|
{% block title %}{{ package.name }} - {{ parent() }}{% endblock %}
|
|
|
|
|
|
{% block head_feeds %}
|
|
@@ -15,43 +17,50 @@
|
|
|
{% block content %}
|
|
|
<div class="box">
|
|
|
<div class="package"{% if app.user and package.crawledAt is null and (is_granted('ROLE_EDIT_PACKAGES') or package.maintainers.contains(app.user)) %} data-force-crawl="true"{% endif %}>
|
|
|
+ <section class="row">
|
|
|
+ <div class="col-sm-6 col-md-8">
|
|
|
+ <h2 class="title">
|
|
|
+ {% if is_favorite is defined %}
|
|
|
+ <i class="mark-favorite icon-star{% if not is_favorite %}-empty{% endif %}" data-remove-url="{{ path('user_remove_fav', {name: app.user.username, package: package.name}) }}" data-add-url="{{ path('user_add_fav', {name: app.user.username}) }}" data-package="{{ package.name }}"></i>
|
|
|
+ {% endif %}
|
|
|
+ <a href="{{ path("view_vendor", {"vendor": package.vendor}) }}">{{ package.vendor }}/</a>{{ package.packageName }}
|
|
|
+ <a id="copy" data-clipboard-text="{{ package.name }}" title="Copy to clipboard"><i class="icon-copy"></i></a>
|
|
|
+ </h2>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="col-sm-6 col-md-4">
|
|
|
+ {% if is_granted('ROLE_EDIT_PACKAGES') or package.maintainers.contains(app.user) %}
|
|
|
+ <form class="pull-right action" action="{{ path("edit_package", {name: package.name}) }}">
|
|
|
+ <input class="btn btn-default" type="submit" value="Edit" />
|
|
|
+ </form>
|
|
|
+ {% endif %}
|
|
|
+ {% if is_granted('ROLE_UPDATE_PACKAGES') or package.maintainers.contains(app.user) %}
|
|
|
+ <form class="force-update pull-right action" action="{{ path('update_package', {name: package.name}) }}" method="POST">
|
|
|
+ <input type="hidden" name="_method" value="PUT" />
|
|
|
+ <input type="hidden" name="update" value="1" />
|
|
|
+ <input class="btn btn-success" type="submit" value="Update" />
|
|
|
+ </form>
|
|
|
+ {% endif %}
|
|
|
+ {% if deleteForm is defined %}
|
|
|
+ <form class="delete pull-right action" action="{{ path('delete_package', {name: package.name}) }}" method="POST">
|
|
|
+ <input type="hidden" name="_method" value="DELETE" />
|
|
|
+ {{ form_widget(deleteForm._token) }}
|
|
|
+ <input class="btn btn-danger" type="submit" value="Delete" />
|
|
|
+ </form>
|
|
|
+ {% endif %}
|
|
|
+ {% if (is_granted('ROLE_EDIT_PACKAGES') or package.maintainers.contains(app.user)) and not package.abandoned %}
|
|
|
+ <form class="pull-right action abandon" action="{{ path('abandon_package', {name: package.name}) }}">
|
|
|
+ <input class="btn btn-warning" type="submit" value="Abandon" />
|
|
|
+ </form>
|
|
|
+ {% endif %}
|
|
|
+ {% if (is_granted('ROLE_EDIT_PACKAGES') or package.maintainers.contains(app.user)) and package.abandoned %}
|
|
|
+ <form class="pull-right action un-abandon" action="{{ path('unabandon_package', {name: package.name}) }}">
|
|
|
+ <input class="btn btn-default" type="submit" value="Un-abandon" />
|
|
|
+ </form>
|
|
|
+ {% endif %}
|
|
|
+ </div>
|
|
|
+ </section>
|
|
|
|
|
|
- {% if is_granted('ROLE_EDIT_PACKAGES') or package.maintainers.contains(app.user) %}
|
|
|
- <form class="action" action="{{ path("edit_package", {name: package.name}) }}">
|
|
|
- <input type="submit" value="Edit" />
|
|
|
- </form>
|
|
|
- {% endif %}
|
|
|
- {% if is_granted('ROLE_UPDATE_PACKAGES') or package.maintainers.contains(app.user) %}
|
|
|
- <form class="force-update action" action="{{ path('update_package', {name: package.name}) }}" method="POST">
|
|
|
- <input type="hidden" name="_method" value="PUT" />
|
|
|
- <input type="hidden" name="update" value="1" />
|
|
|
- <input type="submit" value="Force Update" />
|
|
|
- </form>
|
|
|
- {% endif %}
|
|
|
- {% if deleteForm is defined %}
|
|
|
- <form class="delete action" action="{{ path('delete_package', {name: package.name}) }}" method="POST">
|
|
|
- <input type="hidden" name="_method" value="DELETE" />
|
|
|
- {{ form_widget(deleteForm._token) }}
|
|
|
- <input type="submit" value="Delete" />
|
|
|
- </form>
|
|
|
- {% endif %}
|
|
|
- {% if (is_granted('ROLE_EDIT_PACKAGES') or package.maintainers.contains(app.user)) and not package.abandoned %}
|
|
|
- <form class="action abandon" action="{{ path('abandon_package', {name: package.name}) }}">
|
|
|
- <input type="submit" value="Abandon" />
|
|
|
- </form>
|
|
|
- {% endif %}
|
|
|
- {% if (is_granted('ROLE_EDIT_PACKAGES') or package.maintainers.contains(app.user)) and package.abandoned %}
|
|
|
- <form class="action un-abandon" action="{{ path('unabandon_package', {name: package.name}) }}">
|
|
|
- <input type="submit" value="Un-abandon" />
|
|
|
- </form>
|
|
|
- {% endif %}
|
|
|
- <h1>
|
|
|
- {% if is_favorite is defined %}
|
|
|
- <i class="mark-favorite icon-star{% if not is_favorite %}-empty{% endif %}" data-remove-url="{{ path('user_remove_fav', {name: app.user.username, package: package.name}) }}" data-add-url="{{ path('user_add_fav', {name: app.user.username}) }}" data-package="{{ package.name }}"></i>
|
|
|
- {% endif %}
|
|
|
- <a href="{{ path("view_vendor", {"vendor": package.vendor}) }}">{{ package.vendor }}/</a>{{ package.packageName }}
|
|
|
- <a id="copy" data-clipboard-text="{{ package.name }}" title="Copy to clipboard"><i class="icon-copy"></i></a>
|
|
|
- </h1>
|
|
|
{% if version and version.tags|length %}
|
|
|
<p class="tags">
|
|
|
{%- for tag in version.tags -%}
|
|
@@ -62,14 +71,14 @@
|
|
|
|
|
|
{% if not package.autoUpdated and app.user and (package.maintainers.contains(app.user) or is_granted('ROLE_UPDATE_PACKAGES')) %}
|
|
|
{% if "github.com" in package.repository %}
|
|
|
- <p class="warning">This package is not auto-updated. Please set up the <a href="{{ path('fos_user_profile_show') }}">GitHub Service Hook</a> for Packagist so that it gets updated whenever you push!</p>
|
|
|
+ <div class="alert alert-danger">This package is not auto-updated. Please set up the <a href="{{ path('fos_user_profile_show') }}">GitHub Service Hook</a> for Packagist so that it gets updated whenever you push!</div>
|
|
|
{% elseif "bitbucket.org" in package.repository %}
|
|
|
- <p class="warning">This package is not auto-updated. Please set up the <a href="{{ path('fos_user_profile_show') }}">BitBucket POST Service</a> for Packagist so that it gets updated whenever you push!</p>
|
|
|
+ <div class="alert alert-danger">This package is not auto-updated. Please set up the <a href="{{ path('fos_user_profile_show') }}">BitBucket POST Service</a> for Packagist so that it gets updated whenever you push!</div>
|
|
|
{% endif %}
|
|
|
{% endif %}
|
|
|
|
|
|
{% if package.abandoned %}
|
|
|
- <p class="warning">
|
|
|
+ <div class="alert alert-warning">
|
|
|
This package is <strong>abandoned</strong> and no longer maintained.
|
|
|
{% if package.replacementPackage is not empty %}
|
|
|
The author suggests using the <a href="{{ path('view_package', {name: package.replacementPackage}) }}">{{ package.replacementPackage }}</a> package instead.
|
|
@@ -79,12 +88,12 @@
|
|
|
<a href="{{ path('abandon_package', {name: package.name}) }}">Suggest a replacement.</a>
|
|
|
{% endif %}
|
|
|
{% endif %}
|
|
|
- </p>
|
|
|
+ </div>
|
|
|
{% endif %}
|
|
|
{% if package.updateFailureNotified
|
|
|
and app.user and (package.maintainers.contains(app.user) or is_granted('ROLE_UPDATE_PACKAGES'))
|
|
|
%}
|
|
|
- <p class="warning">This package is in a broken state and will not update anymore. Some branches contain invalid data and until you fix them the entire package is frozen. Click "Force Update" above to see details.</p>
|
|
|
+ <div class="alert alert-danger">This package is in a broken state and will not update anymore. Some branches contain invalid data and until you fix them the entire package is frozen. Click "Force Update" above to see details.</div>
|
|
|
{% endif %}
|
|
|
|
|
|
<p class="downloads">
|