瀏覽代碼

Show warning to maintainers when a package fails to update

Jordi Boggiano 12 年之前
父節點
當前提交
4f2dd25c65
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. 7 1
      src/Packagist/WebBundle/Resources/views/Web/viewPackage.html.twig

+ 7 - 1
src/Packagist/WebBundle/Resources/views/Web/viewPackage.html.twig

@@ -49,12 +49,18 @@
             {% endif %}
 
             {% if not package.autoUpdated
-                and app.user and package.maintainers.contains(app.user)
+                and app.user and (package.maintainers.contains(app.user) or is_granted('ROLE_UPDATE_PACKAGES'))
                 and "//github.com/" in package.repository
             %}
                 <p class="warning">This package is not auto-updated. Go and 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>
             {% 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>
+            {% endif %}
+
             <p class="downloads">
                 <span>Overall:</span> {{ downloads.total }} installs<br />
                 <span>This month:</span> {{ downloads.monthly }} installs<br />