From 685479da7b45b8476cd773b049247379b8cb70bc Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Fri, 27 Sep 2013 13:49:50 -0400 Subject: [PATCH] Slightly better repo list screen --- endpoints/api.py | 6 +++++- static/css/quay.css | 25 ++++++++++++++++++++++++- static/partials/repo-list.html | 4 +++- templates/index.html | 1 - 4 files changed, 32 insertions(+), 4 deletions(-) diff --git a/endpoints/api.py b/endpoints/api.py index 5cb455da1..e762f0b93 100644 --- a/endpoints/api.py +++ b/endpoints/api.py @@ -43,10 +43,13 @@ def create_repo_api(): @login_required def list_repos_api(): def repo_view(repo_perm): + + return { 'namespace': repo_perm.repository.namespace, 'name': repo_perm.repository.name, 'role': repo_perm.role.name, + 'description': repo_perm.repository.description, } repos = [repo_view(repo) @@ -131,6 +134,7 @@ def list_repo_permissions(namespace, repository): abort(403) # Permission denied + @app.route('/api/repository//permissions/', methods=['PUT']) @login_required @@ -144,4 +148,4 @@ def change_permissions(namespace, repository, username): 'setting_permission_to': [permission_view(repo_perm) for repo_perm in repo_perms] }) - abort(403) # Permission denied \ No newline at end of file + abort(403) # Permission denied diff --git a/static/css/quay.css b/static/css/quay.css index 68acdd592..99fc35f7b 100644 --- a/static/css/quay.css +++ b/static/css/quay.css @@ -74,4 +74,27 @@ p.editable:hover i { padding: 4px; border: 1px solid #ddd; width: 300px; -} \ No newline at end of file +} + +.repo-listing { + display: block; + margin-bottom: 20px; + border-bottom: 1px solid #eee; + padding: 10px; +} + +.repo-listing a { + font-size: 1.5em; +} + +.repo-listing i { + font-size: 1.5em; + color: #999; + display: inline-block; + margin-right: 6px; +} + +.repo-listing .description { + margin-top: 6px; + padding-left: 36px; +} diff --git a/static/partials/repo-list.html b/static/partials/repo-list.html index 736c58d73..3a97b77e6 100644 --- a/static/partials/repo-list.html +++ b/static/partials/repo-list.html @@ -1,6 +1,8 @@

Repositories

-
+
+ {{repository.namespace}}/{{repository.name}} +
{{repository.description}}
diff --git a/templates/index.html b/templates/index.html index f749e47fa..1bd017634 100644 --- a/templates/index.html +++ b/templates/index.html @@ -55,7 +55,6 @@ {{ user.username }}