79 lines
2.6 KiB
HTML
79 lines
2.6 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}{{ project.name }} · Project · CalMiner{% endblock %}
|
|
|
|
{% block content %}
|
|
<nav class="breadcrumb">
|
|
<a href="{{ url_for('projects.project_list_page') }}">Projects</a>
|
|
<span aria-current="page">{{ project.name }}</span>
|
|
</nav>
|
|
|
|
<header class="page-header">
|
|
<div>
|
|
<h1>{{ project.name }}</h1>
|
|
<p class="text-muted">{{ project.operation_type.value.replace('_', ' ') | title }}</p>
|
|
</div>
|
|
<div class="actions">
|
|
<a class="btn btn-secondary" href="{{ url_for('projects.edit_project_form', project_id=project.id) }}">Edit</a>
|
|
<a class="btn btn-primary" href="{{ url_for('scenarios.create_scenario_form', project_id=project.id) }}">New Scenario</a>
|
|
</div>
|
|
</header>
|
|
|
|
<section class="card">
|
|
<h2>Project Overview</h2>
|
|
<dl class="definition-list">
|
|
<div>
|
|
<dt>Location</dt>
|
|
<dd>{{ project.location or '—' }}</dd>
|
|
</div>
|
|
<div>
|
|
<dt>Description</dt>
|
|
<dd>{{ project.description or 'No description provided.' }}</dd>
|
|
</div>
|
|
<div>
|
|
<dt>Created</dt>
|
|
<dd>{{ project.created_at.strftime('%Y-%m-%d %H:%M') }}</dd>
|
|
</div>
|
|
<div>
|
|
<dt>Updated</dt>
|
|
<dd>{{ project.updated_at.strftime('%Y-%m-%d %H:%M') }}</dd>
|
|
</div>
|
|
</dl>
|
|
</section>
|
|
|
|
<section class="card">
|
|
<header class="card-header">
|
|
<h2>Scenarios</h2>
|
|
<a class="btn btn-link" href="{{ url_for('scenarios.create_scenario_form', project_id=project.id) }}">Add Scenario</a>
|
|
</header>
|
|
{% if scenarios %}
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Status</th>
|
|
<th>Currency</th>
|
|
<th>Primary Resource</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for scenario in scenarios %}
|
|
<tr>
|
|
<td>{{ scenario.name }}</td>
|
|
<td>{{ scenario.status.value.title() }}</td>
|
|
<td>{{ scenario.currency or '—' }}</td>
|
|
<td>{{ scenario.primary_resource.value.replace('_', ' ') | title if scenario.primary_resource else '—' }}</td>
|
|
<td class="text-right">
|
|
<a class="btn btn-link" href="{{ url_for('scenarios.view_scenario', scenario_id=scenario.id) }}">View</a>
|
|
<a class="btn btn-link" href="{{ url_for('scenarios.edit_scenario_form', scenario_id=scenario.id) }}">Edit</a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% else %}
|
|
<p>No scenarios yet.</p>
|
|
{% endif %}
|
|
</section>
|
|
{% endblock %}
|