Responsiveness improvements

This commit is contained in:
Drew DeVault 2020-03-10 11:03:49 -04:00
parent 6a920745a8
commit dd416c6a59
4 changed files with 44 additions and 85 deletions

View File

@ -28,48 +28,6 @@ select.form-control {
}
}
.header-tabbed {
border-bottom: 3px solid #ddd;
margin-bottom: 1rem;
display: flex;
align-items: flex-end;
flex-wrap: wrap;
&.vertical {
align-items: inherit;
flex-direction: column;
}
h2 {
margin: 0;
@include media-breakpoint-down(xs) {
flex-grow: 1;
text-align: center;
}
}
.nav {
border: none;
margin: 0;
flex-grow: 1;
padding-top: 0.5rem;
@include media-breakpoint-down(xs) {
padding-top: 1rem;
justify-content: center;
}
}
form {
margin: 0;
}
button.nav-link {
background: inherit;
}
}
.ticket-list {
border-right: 1px solid #ced4da;
border-bottom: 1px solid #ced4da;

View File

@ -7,15 +7,16 @@
class="nav-link {% if view == title %}active{% endif %}"
href="{{ path }}">{{ title }}</a>
{% endmacro %}
<h2>
<a
href="{{ tracker.owner|user_url }}"
>{{ tracker.owner }}</a>/{{ tracker.name }}
</h2>
<ul class="nav nav-tabs">
<h2>
<a href="{{ tracker.owner|user_url }}">{{ tracker.owner }}</a
>/{{ tracker.name }}
</h2>
<li class="nav-item">
<a class="nav-link"
href="{{tracker|tracker_url}}"
>{{icon("caret-left")}} back</a>
>{{icon("caret-left")}}&nbsp;back</a>
</li>
<li class="nav-item">
{{link(url_for("settings.details_GET",

View File

@ -13,7 +13,7 @@
<a href="{{ tracker.owner|user_url }}"
>{{ tracker.owner }}</a>/<a href="{{ tracker|tracker_url }}"
>{{ tracker.name }}</a>#{{ ticket.scoped_id }}<span
class="d-none d-md-inline">:&nbsp;</span>
class="d-none d-md-inline">:</span>&nbsp;
</div>
<div id="title-field">
{{ticket.title}}
@ -21,7 +21,18 @@
</h2>
</div>
<div class="header-tabbed">
{% if not tracker_sub %}
<form method="POST" action="{{url_for("ticket." +
("disable_notifications" if ticket_sub else "enable_notifications"),
owner=tracker.owner.canonical_name,
name=tracker.name,
ticket_id=ticket.scoped_id)}}"
class="container"
>
{{csrf_token()}}
{% else %}
<div class="container">
{% endif %}
<ul class="nav nav-tabs">
<li class="nav-item">
<a href="{{ ticket|ticket_url }}"
@ -34,44 +45,33 @@
</li>
{% endif %}
{% if current_user %}
<li class="flex-grow-1 d-none d-sm-block"></li>
<li class="nav-item d-none d-sm-block">
{% if not tracker_sub %}
<form method="POST" action="{{url_for("ticket." +
("disable_notifications" if ticket_sub else "enable_notifications"),
owner=tracker.owner.canonical_name,
name=tracker.name,
ticket_id=ticket.scoped_id)}}">
{{csrf_token()}}
{% else %}
<div>
{% endif %}
<button
class="nav-link active"
{% if tracker_sub %}
title="you are subscribed to all activity on this tracker"
disabled
{% else %}
type="submit"
{% endif %}
>
{{icon("envelope-o")}}
{% if ticket_sub or tracker_sub %}
disable notifications
{% else %}
enable notifications
{% endif %}
{{icon("caret-right")}}
</button>
{% if not tracker_sub %}
</form>
{% else %}
</div>
{% endif %}
<li class="flex-grow-1 d-none d-md-block"></li>
<li class="nav-item">
<button
class="nav-link active"
{% if tracker_sub %}
title="you are subscribed to all activity on this tracker"
disabled
{% else %}
type="submit"
{% endif %}
>
{{icon("envelope-o")}}
{% if ticket_sub or tracker_sub %}
disable notifications
{% else %}
enable notifications
{% endif %}
{{icon("caret-right")}}
</button>
</li>
{% endif %}
</ul>
{% if not tracker_sub %}
</form>
{% else %}
</div>
{% endif %}
</div>
<div class="container">
<div class="row">
@ -236,7 +236,7 @@
</div>
</div>
<div class="row">
<div class="col-md-10 event-list ticket-events">
<div class="col-md-12 event-list ticket-events">
{% for event in events %}
{% if event.event_type not in [
EventType.created,

View File

@ -68,7 +68,7 @@
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="col-lg-4 col-md-12">
{% if tracker.description %}
{{ tracker.description | md }}
{% endif %}
@ -143,7 +143,7 @@
<p>You need to <a href="{{ oauth_url }}">log in</a> to submit tickets.</p>
{% endif %}
</div>
<div class="col-md-8">
<div class="col-md-12 col-lg-8">
{% if tracker.import_in_progress %}
<div class="alert alert-primary">
An import operation is currently in progress.