From 2c14a575a76538d3aa3f16ca656c90fe31eba5e0 Mon Sep 17 00:00:00 2001 From: Daniel Dourvaris Date: Tue, 14 Jan 2020 11:32:41 +0100 Subject: [PATCH] gists: cleanup UI and make the gist access id use monospace --- rhodecode/apps/gist/tests/test_admin_gists.py | 14 +++++++------- rhodecode/public/css/tables.less | 7 +++++++ rhodecode/templates/admin/gists/gist_index.mako | 4 ++-- rhodecode/templates/data_table/_dt_elements.mako | 6 +++--- 4 files changed, 19 insertions(+), 12 deletions(-) diff --git a/rhodecode/apps/gist/tests/test_admin_gists.py b/rhodecode/apps/gist/tests/test_admin_gists.py index 29e85131..3f16c233 100644 --- a/rhodecode/apps/gist/tests/test_admin_gists.py +++ b/rhodecode/apps/gist/tests/test_admin_gists.py @@ -105,11 +105,11 @@ class TestGistsController(TestController): g4 = create_gist('gist4', gist_type='private').gist_access_id response = self.app.get(route_path('gists_show')) - response.mustcontain('gist: %s' % g1.gist_access_id) - response.mustcontain('gist: %s' % g2.gist_access_id) - response.mustcontain('gist: %s' % g3.gist_access_id) + response.mustcontain(g1.gist_access_id) + response.mustcontain(g2.gist_access_id) + response.mustcontain(g3.gist_access_id) response.mustcontain('gist3-desc') - response.mustcontain(no=['gist: %s' % g4]) + response.mustcontain(no=[g4]) # Expiration information should be visible expires_tag = '%s' % h.age_component( @@ -122,7 +122,7 @@ class TestGistsController(TestController): response = self.app.get(route_path('gists_show', params=dict(private=1))) # and privates - response.mustcontain('gist: %s' % gist.gist_access_id) + response.mustcontain(gist.gist_access_id) def test_index_show_all(self, create_gist): self.log_user() @@ -136,7 +136,7 @@ class TestGistsController(TestController): assert len(GistModel.get_all()) == 4 # and privates for gist in GistModel.get_all(): - response.mustcontain('gist: %s' % gist.gist_access_id) + response.mustcontain(gist.gist_access_id) def test_index_show_all_hidden_from_regular(self, create_gist): self.log_user(TEST_USER_REGULAR_LOGIN, TEST_USER_REGULAR_PASS) @@ -150,7 +150,7 @@ class TestGistsController(TestController): # since we don't have access to private in this view, we # should see nothing for gist in GistModel.get_all(): - response.mustcontain(no=['gist: %s' % gist.gist_access_id]) + response.mustcontain(no=[gist.gist_access_id]) def test_create(self): self.log_user() diff --git a/rhodecode/public/css/tables.less b/rhodecode/public/css/tables.less index 3b22e421..6ad8b35d 100644 --- a/rhodecode/public/css/tables.less +++ b/rhodecode/public/css/tables.less @@ -549,5 +549,12 @@ table.compare_view_commits { img{ vertical-align: middle; } + + &.td-expire { + width: 200px; + } + &.td-gist-type { + width: 100px; + } } } diff --git a/rhodecode/templates/admin/gists/gist_index.mako b/rhodecode/templates/admin/gists/gist_index.mako index b3dc2e32..cfb550d9 100644 --- a/rhodecode/templates/admin/gists/gist_index.mako +++ b/rhodecode/templates/admin/gists/gist_index.mako @@ -102,7 +102,7 @@ $(document).ready(function() { { data: {"_": "author", "sort": "author_raw"}, title: "${_("Author")}", width: "250px", className: "td-user" }, { data: {"_": "type", - "sort": "type"}, title: "${_("Type")}", width: "70px", className: "td-tags" }, + "sort": "type"}, title: "${_("Type")}", width: "100px", className: "td-gist-type" }, { data: {"_": "access_id", "sort": "access_id"}, title: "${_("Name")}", width:"150px", className: "td-componentname" }, { data: {"_": "description", @@ -110,7 +110,7 @@ $(document).ready(function() { { data: {"_": "created_on", "sort": "created_on_raw"}, title: "${_("Created on")}", className: "td-time" }, { data: {"_": "expires", - "sort": "expires"}, title: "${_("Expires")}", className: "td-exp" } + "sort": "expires"}, title: "${_("Expires")}", width: "200px", className: "td-expire" } ], language: { paginate: DEFAULT_GRID_PAGINATION, diff --git a/rhodecode/templates/data_table/_dt_elements.mako b/rhodecode/templates/data_table/_dt_elements.mako index a69c8b3b..8ca432f7 100644 --- a/rhodecode/templates/data_table/_dt_elements.mako +++ b/rhodecode/templates/data_table/_dt_elements.mako @@ -310,9 +310,9 @@ ${h.style_metatag(tag_type, tag)|n,trim} <%def name="gist_access_id(gist_access_id, full_contact)">
- - gist: ${gist_access_id} - + + ${gist_access_id} +