Skip to content
Snippets Groups Projects
Verified Commit e1b3a67a authored by ornanovitch's avatar ornanovitch
Browse files

Resolve conflicts

parent 3f247c77
No related branches found
No related tags found
No related merge requests found
......@@ -8,35 +8,47 @@
{% for service, profile in profiles %}
{% set service = profile.service %}
{% set status = profile.STATUSES[profile.status] %}
<div class="col-md-4 col-s-6 col">
<div class="col-xs col-md-6 col-lg-4">
<div class="card card-widget widget-user-2">
<div class="widget-user-header bg-{{ macros.colors[loop.index0 % 7] }}">
<span class="btn btn-lg btn-flat bg-gray }} text-black pull-right">{{ status[1] | capitalize }}</span>
<h3 class="widget-header-username">{{ service.name }} / {{ profile.username }}</h3>
<h5 class="widget-header-desc">{{ profile.comment or "No profile description" }}&nbsp;</h5>
<h3>{{ service.name }} / {{ profile.username }}</h3>
<h5>{{ profile.comment or "No profile description" }}</h5>
</div>
<div class="card-footer no-padding">
<ul class="nav flex-column nav-pills nav-fill">
<div class="card-body py-2 px-3">
<div>{{ macros.profile_status(profile) }}</div>
</div>
<div class="card-footer p-0">
<ul class="nav flex-column nav-pills">
{% if not service.single_profile %}
{% if service.policy in ("open", "burst") and profile.__class__.filter(service, current_user).count() < service.max_profiles %}
<li class="nav-item text-left">
<li class="nav-item">
<a class="nav-link" href="{{ utils.url_for("profile.create", service_uuid=service.uuid) }}">
<i class="fas fa-user-plus"></i>&nbsp;
{% trans %}Create another profile{% endtrans %}
</a>
</li>
{% elif service.policy in ("managed", "burst") %}
<li class="nav-item text-left"><a class="nav-link" href="{{ utils.url_for("profile.create", service_uuid=service.uuid) }}"><i class="fas fa-user-plus"></i>&nbsp;&nbsp;{% trans %}Request another profile{% endtrans %}</a></li>
<li class="nav-item">
<a class="nav-link" href="{{ utils.url_for("profile.create", service_uuid=service.uuid) }}">
<i class="fas fa-user-plus"></i>&nbsp;
{% trans %}Request another profile{% endtrans %}
</a>
</li>
{% endif %}
{% if service.policy not in ("locked",) %}
<li class="nav-item text-left"><a class="nav-link" href="{{ utils.url_for("profile.claim", service_uuid=service.uuid) }}"><i class="fas fa-user-plus"></i>&nbsp;&nbsp;{% trans %}Claim another profile{% endtrans %}</a></li>
<li class="nav-item">
<a class="nav-link" href="{{ utils.url_for("profile.claim", service_uuid=service.uuid) }}">
<i class="fas fa-hand-paper"></i>&nbsp;
{% trans %}Claim another profile{% endtrans %}
</a>
</li>
{% endif %}
{% endif %}
{% if profile.transition %}
{% set transition = profile.TRANSITIONS[profile.transition] %}
{% set color, status = profile.STATUSES[transition.to] %}
{% set when = transition.delta(profile) %}
<li class="nav-item text-left">
<li class="nav-item">
<a class="nav-link" href="#">
<i class="fas fa-clock"></i>&nbsp;
{% trans status, when %}Profile will be {{ status }} in {{ when }}{% endtrans %}
......@@ -44,7 +56,12 @@
</li>
{% endif %}
{% for action in common.get_actions(profile) %}
<li class="nav-item text-left"><a class="nav-link" href="{{ action.url(profile=profile) }}"><i class="fas fa-trash"></i>&nbsp;&nbsp;{{ action.description | capitalize }}</a></li>
<li class="nav-item">
<a class="nav-link" href="{{ action.url(profile=profile) }}">
<i class="fas fa-trash"></i>&nbsp;
{{ action.description | capitalize }}
</a>
</li>
{% endfor %}
</ul>
</div>
......
{% if user %}
<div class="row">
<div class="col-md-6">
<div class="card">
<div class="card-body table-responsive p-0">
<table class="table table-striped table-hover text-nowrap">
<thead>
<tr>
<th>{% trans %}Room{% endtrans %}</th>
</tr>
</thead>
<tbody>
{% for room in user["joined_rooms"] %}
<tr>
<td><a href="{{ url_for("service.action", service_uuid=profile.service.uuid, action="get_room", roomid=room) }}">{{ room }}</a></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="card-body table-responsive p-0">
<table class="table table-striped table-hover text-nowrap">
<thead>
<tr>
<th>{% trans %}Room{% endtrans %}</th>
</tr>
</thead>
<tbody>
{% for room in user["joined_rooms"] %}
<tr>
<td><a href="{{ url_for("service.action", service_uuid=profile.service.uuid, action="get_room", roomid=room) }}">{{ room }}</a></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="col-md-6">
<dl>
{% for name, value in user.items() %}
<dt>{{ name }}</dt>
<dd>{{ value }}</dd>
{% endfor %}
</dl>
</div>
<dl>
{% for name, value in user.items() %}
<dt>{{ name }}</dt>
<dd>{{ value }}</dd>
{% endfor %}
</dl>
</div>
</div>
</div>
......
......@@ -9,20 +9,20 @@
<div class="card">
<div class="card-body">
<dl class="row">
<dt class="col-3">{% trans %}Username{% endtrans %}</dt>
<dd class="col-9">{{ profile.username }}</dd>
<dt class="col-lg-3">{% trans %}Username{% endtrans %}</dt>
<dd class="col-lg-9">{{ profile.username }}</dd>
<dt class="col-3">{% trans %}Owner{% endtrans %}</dt>
<dd class="col-9"><a href="{{ url_for("user.details", user_uuid=profile.user_uuid) }}">{{ profile.user.username }}</a></dd>
<dt class="col-lg-3">{% trans %}Owner{% endtrans %}</dt>
<dd class="col-lg-9"><a href="{{ url_for("user.details", user_uuid=profile.user_uuid) }}">{{ profile.user.username }}</a></dd>
<dt class="col-3">{% trans %}UUID{% endtrans %}</dt>
<dd class="col-9"><pre>{{ profile.uuid }}</pre></dd>
<dt class="col-lg-3">{% trans %}UUID{% endtrans %}</dt>
<dd class="col-lg-9"><pre>{{ profile.uuid }}</pre></dd>
<dt class="col-3">{% trans %}Status{% endtrans %}</dt>
<dd class="col-9">{{ macros.profile_status(profile) }}</dd>
<dt class="col-3">{% trans %}Created at{% endtrans %}</dt>
<dd class="col-9">{{ profile.created_at }}</dd>
<dt class="col-lg-3">{% trans %}Created at{% endtrans %}</dt>
<dd class="col-lg-9">{{ profile.created_at }}</dd>
</dl>
</div>
</div>
......@@ -52,6 +52,6 @@
{% block actions %}
{% for action in actions %}
<a href="{{ action.url(profile) }}" class="btn btn-warning">{{ action.label | capitalize }}</a>
<a href="{{ action.url(profile) }}" class="btn btn-info">{{ action.label | capitalize }}</a>
{% endfor %}
{% endblock %}
......@@ -7,7 +7,7 @@
{% block content %}
<div class="row">
{% for profile in profiles %}
<div class="col-md-4 col-s-6 col">
<div class="col-xs col-md-6 col-lg-4">
<div class="card card-widget widget-user-2">
<div class="widget-user-header bg-{{ macros.colors[loop.index0 % 7] }}">
{% if profile.status == profile.ACTIVE %}
......@@ -22,7 +22,7 @@
<h3 class="widget-header-username">{{ profile.username }}</h3>
<h5 class="widget-header-desc">{{ profile.comment or "No profile description" }}&nbsp;</h5>
</div>
<div class="card-footer no-padding">
<div class="card-footer p-0">
<ul class="nav nav-stacked">
{% set created_on = profile.created_at.date() %}
<li><a href="#">{% trans %}Created on {{ created_on }}{% endtrans %}</a></li>
......
......@@ -10,7 +10,7 @@
{% block content %}
<div class="row">
<div class="col-md-4 col-s-6 col">
<div class="col-xs col-md-6 col-lg-4">
<div class="card card-widget widget-user-2">
<div class="widget-user-header bg-primary">
<form method="POST" class="form">
......
......@@ -12,23 +12,23 @@
</div>
<div class="card-body">
<dl class="row">
<dt class="col-3">{% trans %}Service name{% endtrans %}</dt>
<dd class="col-9">{{ service.name }}</dd>
<dt class="col-lg-3">{% trans %}Service name{% endtrans %}</dt>
<dd class="col-lg-9">{{ service.name }}</dd>
<dt class="col-3">{% trans %}Description{% endtrans %}</dt>
<dd class="col-9">{{ service.description }}</dd>
<dt class="col-lg-3">{% trans %}Description{% endtrans %}</dt>
<dd class="col-lg-9">{{ service.description }}</dd>
<dt class="col-3">{% trans %}Provider{% endtrans %}</dt>
<dd class="col-9">{{ service.provider }}</dd>
<dt class="col-lg-3">{% trans %}Provider{% endtrans %}</dt>
<dd class="col-lg-9">{{ service.provider }}</dd>
<dt class="col-3">{% trans %}Application{% endtrans %}</dt>
<dd class="col-9">{{ application.name }}</dd>
<dt class="col-lg-3">{% trans %}Application{% endtrans %}</dt>
<dd class="col-lg-9">{{ application.name }}</dd>
<dt class="col-3">{% trans %}Application destriction{% endtrans %}</dt>
<dd class="col-9">{{ application.__doc__ }}</dd>
<dt class="col-lg-3">{% trans %}Application destriction{% endtrans %}</dt>
<dd class="col-lg-9">{{ application.__doc__ }}</dd>
<dt class="col-3">{% trans %}UUID{% endtrans %}</dt>
<dd class="col-9"><pre>{{ service.uuid }}</pre></dd>
<dt class="col-lg-3">{% trans %}UUID{% endtrans %}</dt>
<dd class="col-lg-9"><pre>{{ service.uuid }}</pre></dd>
</dl>
</div>
</div>
......@@ -42,8 +42,8 @@
<dl class="row">
{% for action, (label, profile, _, function) in application.actions.items() %}
{% if not profile %}
<dt class="col-3"><a href="{{ url_for(".action", service_uuid=service.uuid, action=action) }}">{{ label }}</a></dt>
<dd class="col-9">{{ function.__doc__ }}</dd>
<dt class="col-lg-3"><a href="{{ url_for(".action", service_uuid=service.uuid, action=action) }}">{{ label }}</a></dt>
<dd class="col-lg-9">{{ function.__doc__ }}</dd>
{% endif %}
{% endfor %}
</dl>
......
......@@ -37,16 +37,28 @@
{% if profile.transition_step %}
{% set transition = profile.TRANSITIONS[profile.transition] %}
{% set target = profile.STATUSES[transition.to] %}
<i class="fas fa-arrow-right"></i>
<span class="badge">
<i class="fas fa-arrow-right"></i>
</span>
<span class="badge bg-{{ target[0] }}">{{ target[1] }}</span>
{% if profile.transition_step == profile.INIT %}
<i class="fas fa-clock"></i> {{ transition.delta(profile) }}
<span class="badge">
<i class="fas fa-clock"></i> {{ transition.delta(profile) }}
</span>
{% elif profile.transition_step == profile.START %}
<i class="fas fa-rocket"></i>
<span class="badge">
<i class="fas fa-rocket"></i>
</span>
{% elif profile.transition_step == profile.DONE %}
<i class="fas fa-check"></i>
<span class="badge">
<i class="fas fa-check"></i>
</span>
{% elif profile.transition_step == profile.MANUAL %}
<a href="{{ url_for("profile.complete_transition", profile_uuid=profile.uuid) }}"><i class="fas fa-hand-point-up"></i></a>
<span class="badge">
<a href="{{ url_for("profile.complete_transition", profile_uuid=profile.uuid) }}">
<i class="fas fa-hand-point-up"></i>
</a>
</span>
{% endif %}
{% endif %}
{% endmacro %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment