Commit 36a14a40 by Kálmán Viktor

dashboard: fix store items with long name

parent 08ae48fe
...@@ -740,6 +740,7 @@ textarea[name="list-new-namelist"] { ...@@ -740,6 +740,7 @@ textarea[name="list-new-namelist"] {
text-align: center; text-align: center;
display: inline-block; display: inline-block;
margin-right: 15px; margin-right: 15px;
float: left;
} }
.store-list-item-size { .store-list-item-size {
...@@ -765,20 +766,12 @@ textarea[name="list-new-namelist"] { ...@@ -765,20 +766,12 @@ textarea[name="list-new-namelist"] {
background: #5bc0dc; background: #5bc0dc;
} }
.store-download-button { .store-list-item-icon-directory {
position: absolute; color: #ff8c00;
right: 15px;
top: 18px;
} }
.store-remove-button { .store-remove-button {
position: absolute; margin-top: 8px;
right: 15px;
top: 55px;
}
.store-list-item-icon-directory {
color: #ff8c00;
} }
#dashboard-files-toplist div.list-group-item { #dashboard-files-toplist div.list-group-item {
...@@ -789,6 +782,19 @@ textarea[name="list-new-namelist"] { ...@@ -789,6 +782,19 @@ textarea[name="list-new-namelist"] {
background: #eee; background: #eee;
} }
.store-list-item-name {
max-width: 70%;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
float: left;
}
.dashboard-toplist-icon {
float: left;
padding: 2px 5px 0 0;
}
.no-hover:hover { .no-hover:hover {
background: none !important; background: none !important;
} }
......
...@@ -20,7 +20,9 @@ ...@@ -20,7 +20,9 @@
fa fa-{% if f.TYPE == "D" %}folder-open store-list-item-icon-directory{% else %}file{% endif %}" fa fa-{% if f.TYPE == "D" %}folder-open store-list-item-icon-directory{% else %}file{% endif %}"
></i> ></i>
</div> </div>
{{ f.NAME }} <div class="store-list-item-name">
{{ f.NAME }}
</div>
<div class="store-list-item-new"> <div class="store-list-item-new">
{% if f.is_new and f.TYPE == "F" %} {% if f.is_new and f.TYPE == "F" %}
<span class="badge badge-pulse">{% trans "new" %}</span> <span class="badge badge-pulse">{% trans "new" %}</span>
...@@ -33,26 +35,32 @@ ...@@ -33,26 +35,32 @@
<div class="clearfix"></div> <div class="clearfix"></div>
</a> </a>
<div class="store-list-file-infos"> <div class="store-list-file-infos">
<a href="{% url "dashboard.views.store-download" %}?path={{ f.path }}" <div class="row">
class="btn btn-primary btn-sm store-download-button"> <div class="col-sm-10">
<i class="fa fa-download"></i> <dl class="dl-horizontal" style="margin: 0; padding: 0;">
{% trans "Download" %} <dt>{% trans "Filename" %}</dt>
</a> <dd>{{ f.NAME }}</dd>
<a href="{% url "dashboard.views.store-remove" %}?path={{ f.path }}"
class="btn btn-danger btn-xs store-remove-button">
<i class="fa fa-times"></i>
{% trans "Remove" %}
</a>
<dl class="dl-horizontal" style="margin: 0; padding: 0;">
<dt>{% trans "Filename" %}</dt>
<dd>{{ f.NAME }}</dd>
<dt>{% trans "Size" %}</dt> <dt>{% trans "Size" %}</dt>
<dd>{{ f.human_readable_size }}</dd> <dd>{{ f.human_readable_size }}</dd>
<dt>{% trans "Latest modification" %}</dt> <dt>{% trans "Latest modification" %}</dt>
<dd>{{ f.human_readable_date }}</dd> <dd>{{ f.human_readable_date }}</dd>
</dl> </dl>
</div>
<div class="col-sm-2" style="text-align: right;">
<a href="{% url "dashboard.views.store-download" %}?path={{ f.path }}"
class="btn btn-primary btn-sm store-download-button">
<i class="fa fa-download"></i>
{% trans "Download" %}
</a>
<a href="{% url "dashboard.views.store-remove" %}?path={{ f.path }}"
class="btn btn-danger btn-xs store-remove-button">
<i class="fa fa-times"></i>
{% trans "Remove" %}
</a>
</div>
</div><!-- .row -->
</div> </div>
{% empty %} {% empty %}
<a class="list-group-item"> <a class="list-group-item">
......
...@@ -13,7 +13,10 @@ ...@@ -13,7 +13,10 @@
{% for t in toplist %} {% for t in toplist %}
{% if t.TYPE == "F" %} {% if t.TYPE == "F" %}
<div class="list-group-item"> <div class="list-group-item">
<i class="fa fa-file"></i> {{ t.NAME }} <i class="fa fa-file dashboard-toplist-icon"></i>
<div class="store-list-item-name">
{{ t.NAME }}
</div>
<a href="{% url "dashboard.views.store-download" %}?path={{ t.path }}" <a href="{% url "dashboard.views.store-download" %}?path={{ t.path }}"
class="pull-right btn btn-xs" style="color: black;"> class="pull-right btn btn-xs" style="color: black;">
<i class="fa fa-cloud-download" title="{% trans "Download" %}"></i> <i class="fa fa-cloud-download" title="{% trans "Download" %}"></i>
...@@ -22,10 +25,16 @@ ...@@ -22,10 +25,16 @@
class="pull-right btn btn-xs" style="color: black;"> class="pull-right btn btn-xs" style="color: black;">
<i class="fa fa-folder-open" title="{% trans "Show in directory" %}"></i> <i class="fa fa-folder-open" title="{% trans "Show in directory" %}"></i>
</a> </a>
<div style="clear: both;"></div>
</div> </div>
{% else %} {% else %}
<a href="{% url "dashboard.views.store-list" %}?directory={{ t.path }}" class="list-group-item"> <a href="{% url "dashboard.views.store-list" %}?directory={{ t.path }}"
<i class="fa fa-folder-open"></i> {{ t.NAME }} class="list-group-item">
<i class="fa fa-folder-open dashboard-toplist-icon"></i>
<div class="store-list-item-name">
{{ t.NAME }}
</div>
<div style="clear: both;"></div>
</a> </a>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment