Update icons to FA 5

This commit is contained in:
Drew DeVault 2018-09-01 13:43:05 -04:00
parent f10f18c87d
commit 5738410ad2
9 changed files with 19 additions and 27 deletions

View File

@ -1,5 +1,4 @@
@import "base";
@import "font-awesome.min";
.ellipsis {
overflow-x: hidden;

View File

@ -42,8 +42,7 @@
class="btn btn-primary btn-block"
href="{{ url_for("tracker.create_GET") }}"
>
Create new tracker
<i class="fa fa-caret-right"></i>
Create new tracker {{icon("caret-right")}}
</a>
{% endif %}
{% if len(trackers) > 0 %}
@ -68,7 +67,7 @@
username=(user or current_user).username) }}"
class="btn btn-default btn-block"
style="margin-top: 1rem"
>View more <i class="fa fa-caret-right"></i></a>
>View more {{icon("caret-right")}}</a>
{% endif %}
{% endif %}
</div>

View File

@ -81,7 +81,7 @@
<button
type="submit"
class="btn btn-primary"
>Save changes <i class="fa fa-caret-right"></i></button>
>Save changes {{icon("caret-right")}}</button>
</div>
</div>
</div>

View File

@ -45,7 +45,7 @@
{{ event.old_resolution.name.upper() }}
{% endif %}
</strong>
<span class="fa fa-arrow-right"></span>
{{icon("arrow-right", cls="sm")}}
<strong class="text-success">
{{ event.new_status.name.upper() }}
{% if event.new_status == TicketStatus.resolved %}

View File

@ -72,13 +72,13 @@
type="submit"
{% endif %}
>
<i class="fa fa-envelope-o"></i>
{{icon("envelope-o")}}
{% if is_subscribed or tracker_sub %}
Disable notifications
{% else %}
Enable notifications
{% endif %}
<i class="fa fa-caret-right"></i>
{{icon("caret-right")}}
</button>
{% if not tracker_sub %}
</form>
@ -165,8 +165,7 @@
type="submit"
class="btn btn-primary"
>
Comment
<i class="fa fa-caret-right"></i>
Comment {{icon("caret-right")}}
</button>
{% if TicketAccess.edit in access %}
{% if ticket.status != TicketStatus.resolved %}
@ -176,8 +175,7 @@
name="resolve"
value="resolve"
>
Resolve
<i class="fa fa-check"></i>
Resolve {{icon("check")}}
</button>
<select class="form-control" name="resolution">
{% for r in TicketResolution %}
@ -193,8 +191,7 @@
name="reopen"
value="reopen"
>
Re-open
<i class="fa fa-caret-right"></i>
Re-open {{icon("caret-right")}}
</button>
{% endif %}
{% endif %}

View File

@ -156,8 +156,7 @@
class="btn btn-default"
>Cancel</a>
<button type="submit" class="btn btn-primary">
Save
<i class="fa fa-caret-right"></i>
Save {{icon("caret-right")}}
</button>
</span>
</form>

View File

@ -43,16 +43,14 @@
class="btn btn-primary"
name="create"
>
Create tracker
<i class="fa fa-caret-right"></i>
Create tracker {{icon("caret-right")}}
</button>
<button
type="submit"
class="btn btn-default"
name="create-configure"
>
Create &amp; configure
<i class="fa fa-caret-right"></i>
Create &amp; configure {{icon("caret-right")}}
</button>
</form>
</div>

View File

@ -49,13 +49,13 @@
owner=tracker.owner.canonical_name(),
name=tracker.name)}}">
<button class="nav-link active" type="submit">
<i class="fa fa-envelope-o"></i>
{{icon("envelope-o")}}
{% if is_subscribed %}
Disable notifications
{% else %}
Enable notifications
{% endif %}
<i class="fa fa-caret-right"></i>
{{icon("caret-right")}}
</button>
</form>
</li>
@ -101,8 +101,7 @@
type="submit"
class="btn btn-primary"
>
Submit
<i class="fa fa-caret-right"></i>
Submit {{icon("caret-right")}}
</button>
<label class="form-check-label" style="margin-left: 2rem">
<input
@ -146,12 +145,12 @@
</div>
{% if ticket.new_updates(current_user) %}
<div class="comments">
<span class="fa fa-fw fa-comments-o"></span>
{{icon("comments-o")}}
{{ ticket.comments | length }}
</div>
{% else %}
<div class="comments">
<span class="fa fa-fw fa-comments-o"></span>
{{icon("comments")}}
{{ ticket.comments | length }}
</div>
{% endif %}

View File

@ -1,6 +1,7 @@
import sqlalchemy as sa
import sqlalchemy_utils as sau
from srht.database import Base
from datetime import datetime
class TicketSeen(Base):
"""Stores the last time a user viewed this ticket. Calculates if comments have been seen."""
@ -13,4 +14,4 @@ class TicketSeen(Base):
ticket = sa.orm.relationship("Ticket")
def update(self):
self.last_view = sa.sql.func.now()
self.last_view = datetime.utcnow()