Merge pull request #17833 from netchampfaris/issue-portal-styling

fix: Issue list portal styling
This commit is contained in:
Nabin Hait 2019-06-03 13:05:53 +05:30 committed by GitHub
commit 2cc5fcf33b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 32 deletions

View File

@ -1,33 +1,30 @@
<div class="web-list-item transaction-list-item">
<a href="/issues?name={{ doc.name }}">
<div class="row">
<div class="col-xs-3">
<span class="indicator {{ "red" if doc.status=="Open" else "darkgrey" }}">
{{ doc.name }}</span>
</div>
<div class="col-xs-5 items-preview ellipsis ellipsis-width">
{{ doc.subject }}</div>
<div class="col-xs-2 text-muted">
<span class="indicator
{% if doc.status == "Open" %}
{% if doc.priority == "Medium" %}
orange"> Medium
{% elif doc.priority == "Low" %}
yellow"> Low
{% else %}
red"> High
{% endif %}
{% elif doc.status == "Closed" %}
green"> Closed
{% else %}
darkgrey"> {{ doc.status }}
{% endif %}
</span>
</div>
<div class="col-xs-3 text-right small text-muted">
{{ frappe.format_date(doc.modified) }}
</div>
</div>
</a>
<a href="/issues?name={{ doc.name }}" class="no-underline">
<div class="row py-4 border-bottom">
<div class="col-3 d-flex align-items-center">
{% set indicator = 'red' if doc.status == 'Open' else 'darkgrey' %}
{% set indicator = 'green' if doc.status == 'Closed' else indicator %}
<span class="d-inline-flex indicator {{ indicator }}"></span>
{{ doc.name }}
</div>
<div class="col-5 text-muted">
{{ doc.subject }}</div>
<div class="col-2 d-flex align-items-center text-muted">
{% set indicator = 'red' if doc.status == 'Open' else 'darkgrey' %}
{% set indicator = 'green' if doc.status == 'Closed' else indicator %}
{% set indicator = 'orange' if doc.status == 'Open' and doc.priority == 'Medium' else indicator %}
{% set indicator = 'yellow' if doc.status == 'Open' and doc.priority == 'Low' else indicator %}
<span class="d-inline-flex indicator {{ indicator }}"></span>
{% if doc.status == "Open" %}
{{ doc.priority }}
{% else %}
{{ doc.status }}
{%- endif -%}
</span>
</div>
<div class="col-2 text-right text-muted">
{{ frappe.format_date(doc.modified) }}
</div>
</div>
</a>
</div>

View File

@ -45,7 +45,7 @@
<div class="card-body">
<h5 class="card-title">{{ card.title }}</h5>
<p class="card-subtitle mb-2 text-muted">{{ card.subtitle or '' }}</p>
<p class="card-text">{{ card.content | truncate(140, True) }}</p>
<p class="card-text">{{ card.content or '' | truncate(140, True) }}</p>
</div>
<div class="card-body flex-grow-0">
<a href="{{ card.route }}" class="card-link">{{ _('More details') }}</a>