gists: cleanup UI and make the gist access id use monospace

This commit is contained in:
Daniel Dourvaris 2020-01-14 11:32:41 +01:00
parent eca62d08c5
commit 2c14a575a7
4 changed files with 19 additions and 12 deletions

View file

@ -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()

View file

@ -549,5 +549,12 @@ table.compare_view_commits {
img{
vertical-align: middle;
}
&.td-expire {
width: 200px;
}
&.td-gist-type {
width: 100px;
}
}
}

View file

@ -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,

View file

@ -310,9 +310,9 @@ ${h.style_metatag(tag_type, tag)|n,trim}
<%def name="gist_access_id(gist_access_id, full_contact)">
<div>
<b>
<a href="${h.route_path('gist_show', gist_id=gist_access_id)}">gist: ${gist_access_id}</a>
</b>
<code>
<a href="${h.route_path('gist_show', gist_id=gist_access_id)}">${gist_access_id}</a>
</code>
</div>
</%def>