feat: use icon for connections on mobile view

This commit is contained in:
Rucha Mahabal 2021-07-08 16:55:42 +05:30
parent b6715189fb
commit 1a3c335feb
2 changed files with 10 additions and 4 deletions

View File

@ -50,7 +50,7 @@ erpnext.HierarchyChartMobile = class {
image: node.image,
parent: node.parent_id,
connections: node.connections,
is_mobile: 1
is_mobile: true
});
node.parent.append(node_card);

View File

@ -16,10 +16,16 @@
<div class="node-info d-flex flex-row mb-1">
<div class="node-title text-muted ellipsis">{{ title }}</div>
{% if connections == 1 %}
<div class="node-connections text-muted ml-2 ellipsis">· {{ connections }} Connection</div>
{% if is_mobile %}
<div class="node-connections text-muted ml-2 ellipsis">
· {{ connections }} <span class="fa fa-level-down"></span>
</div>
{% else %}
<div class="node-connections text-muted ml-2 ellipsis">· {{ connections }} Connections</div>
{% if connections == 1 %}
<div class="node-connections text-muted ml-2 ellipsis">· {{ connections }} Connection</div>
{% else %}
<div class="node-connections text-muted ml-2 ellipsis">· {{ connections }} Connections</div>
{% endif %}
{% endif %}
</div>
</div>