Table placeholder styling

d42/ebin
informatic 2017-10-08 22:39:47 +02:00
parent 6d365b8716
commit 887e6949c0
3 changed files with 18 additions and 5 deletions

11
static/css/custom.css Normal file
View File

@ -0,0 +1,11 @@
.table td.placeholder {
text-align: center;
color: #999;
}
.table td.placeholder a {
display: block;
text-decoration: none;
color: inherit;
font-weight: bold;
}

View File

@ -45,7 +45,7 @@
{% for k, v in item.props.items %}
<tr><td>{{ k }}</td><td>{{ v|urlize }}</td></tr>
{% empty %}
<tr><td colspan=2>No properties</td></tr>
<tr><td colspan=2 class="placeholder">No properties</td></tr>
{% endfor %}
</table>
@ -80,11 +80,12 @@
<table class="table table-striped table-hover">
{% for child in children|dictsort:"name" %}
<tr><td><a href="{{ child.get_absolute_url }}">{{ child.name }}</a></td></tr>
{% empty %}
<tr><td colspan=2>No children</td></tr>
{% endfor %}
<tr><td colspan=2>
<a href="/admin/storage/item/add?parent={{ item.uuid }}" %}"><span class="glyphicon glyphicon-plus"></span></a>
<tr><td colspan=2 class="placeholder">
<a href="/admin/storage/item/add?parent={{ item.uuid }}">
<span class="glyphicon glyphicon-plus"></span>
Add child
</a>
</td></tr>
</table>
</div>

View File

@ -7,6 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="stylesheet" href="{% static 'css/bootstrap.css' %}" media="screen">
<link rel="stylesheet" href="{% static 'css/custom.css' %}" media="screen">
</head>
<body>
{% block body %}