2020-04-01 20:47:47 +02:00
|
|
|
{% extends "project-base.html" %}
|
2020-04-01 21:16:20 +02:00
|
|
|
{% import "event.html" as eventutil with context %}
|
2020-04-28 19:39:46 +02:00
|
|
|
{% block title %}
|
|
|
|
<title>{{project.name}}: {{project.description}}</title>
|
|
|
|
{% endblock %}
|
2020-04-01 20:47:47 +02:00
|
|
|
{% block content %}
|
2020-03-24 15:26:15 +01:00
|
|
|
<div class="container">
|
2020-04-02 17:48:41 +02:00
|
|
|
{% if not project.checklist_complete %}
|
2020-03-24 15:26:15 +01:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12 event-list">
|
2020-04-02 17:48:41 +02:00
|
|
|
<form
|
|
|
|
class="event"
|
|
|
|
method="POST"
|
|
|
|
action="{{url_for("projects.dismiss_checklist_POST",
|
|
|
|
owner=owner.canonical_name, project_name=project.name)}}"
|
|
|
|
>
|
|
|
|
{{csrf_token()}}
|
2020-03-24 15:26:15 +01:00
|
|
|
<h3>
|
|
|
|
New project checklist
|
2020-04-02 17:48:41 +02:00
|
|
|
<button class="btn btn-link text-muted pull-right" type="submit">
|
|
|
|
<small style="font-size: 0.9rem;">
|
|
|
|
dismiss
|
|
|
|
</small>
|
|
|
|
</button>
|
2020-03-24 15:26:15 +01:00
|
|
|
</h3>
|
|
|
|
<ul class="checklist">
|
|
|
|
<li>
|
2020-04-02 15:36:27 +02:00
|
|
|
{% set ncomplete = 0 %}
|
2020-03-24 16:22:33 +01:00
|
|
|
{% if any(project.source_repos) %}
|
2020-04-02 15:36:27 +02:00
|
|
|
{% set ncomplete = ncomplete + 1 %}
|
2020-03-24 15:26:15 +01:00
|
|
|
{{icon('check', cls='text-success')}}
|
|
|
|
Add source code repositories
|
2020-03-24 16:22:33 +01:00
|
|
|
<br />
|
|
|
|
<small class="text-muted">
|
|
|
|
You can see the list of your source repositories by clicking
|
|
|
|
"sources" on the project navigation.
|
|
|
|
</small>
|
|
|
|
{% else %}
|
2020-03-24 15:26:15 +01:00
|
|
|
{{icon('plus-square', cls='text-info')}}
|
|
|
|
<a
|
2020-04-01 19:30:57 +02:00
|
|
|
href="{{url_for("sources.new_GET",
|
2020-03-24 15:26:15 +01:00
|
|
|
owner=owner.canonical_name, project_name=project.name)}}"
|
|
|
|
>Add source code repositories {{icon('arrow-right')}}</a>
|
|
|
|
<br />
|
|
|
|
<small class="text-muted">
|
|
|
|
Git and Mercurial repositories help you share this project's
|
|
|
|
source code with your collaborators.
|
|
|
|
</small>
|
2020-03-24 16:22:33 +01:00
|
|
|
{% endif %}
|
2020-03-24 15:26:15 +01:00
|
|
|
</li>
|
|
|
|
<li>
|
2020-03-25 15:08:29 +01:00
|
|
|
{% if any(project.mailing_lists) %}
|
2020-04-02 15:36:27 +02:00
|
|
|
{% set ncomplete = ncomplete + 1 %}
|
2020-03-25 15:08:29 +01:00
|
|
|
{{icon('check', cls='text-success')}}
|
|
|
|
Add mailing lists
|
|
|
|
<br />
|
|
|
|
<small class="text-muted">
|
|
|
|
You can see the list of your mailing lists by clicking
|
|
|
|
"mailing lists" on the project navigation.
|
|
|
|
</small>
|
|
|
|
{% else %}
|
2020-03-24 15:26:15 +01:00
|
|
|
{{icon('plus-square', cls='text-info')}}
|
2020-03-25 15:08:29 +01:00
|
|
|
<a
|
2020-04-01 19:35:25 +02:00
|
|
|
href="{{url_for("mailing_lists.new_GET",
|
2020-03-25 15:08:29 +01:00
|
|
|
owner=owner.canonical_name, project_name=project.name)}}"
|
|
|
|
>Add mailing lists {{icon('arrow-right')}}</a>
|
2020-03-24 15:26:15 +01:00
|
|
|
<br />
|
|
|
|
<small class="text-muted">
|
2020-04-02 18:55:05 +02:00
|
|
|
Mailing lists give users a place to ask questions about the
|
|
|
|
project or send patches to contribute to the code.
|
2020-03-24 15:26:15 +01:00
|
|
|
</small>
|
2020-03-25 15:08:29 +01:00
|
|
|
{% endif %}
|
2020-03-24 15:26:15 +01:00
|
|
|
</li>
|
|
|
|
<li>
|
2020-04-02 15:24:29 +02:00
|
|
|
{% if any(project.trackers) %}
|
2020-04-02 15:36:27 +02:00
|
|
|
{% set ncomplete = ncomplete + 1 %}
|
2020-04-02 15:24:29 +02:00
|
|
|
{{icon('check', cls='text-success')}}
|
|
|
|
Add bug trackers
|
|
|
|
<br />
|
|
|
|
<small class="text-muted">
|
|
|
|
You can see the list of your ticket trackers by clicking
|
|
|
|
"tickets" on the project navigation.
|
|
|
|
</small>
|
|
|
|
{% else %}
|
2020-03-24 15:26:15 +01:00
|
|
|
{{icon('plus-square', cls='text-info')}}
|
2020-04-02 00:51:14 +02:00
|
|
|
<a
|
|
|
|
href="{{url_for("trackers.new_GET",
|
|
|
|
owner=owner.canonical_name, project_name=project.name)}}"
|
|
|
|
>Add bug trackers {{icon('arrow-right')}}</a>
|
2020-03-24 15:26:15 +01:00
|
|
|
<br />
|
|
|
|
<small class="text-muted">
|
|
|
|
Bug trackers give you a place to organize your tasks and record
|
|
|
|
known defects.
|
|
|
|
</small>
|
2020-04-02 15:24:29 +02:00
|
|
|
{% endif %}
|
2020-03-24 15:26:15 +01:00
|
|
|
</li>
|
|
|
|
</ul>
|
2020-04-02 15:36:27 +02:00
|
|
|
{% if ncomplete == 3 %}
|
|
|
|
<div class="alert alert-info">
|
|
|
|
<p>
|
2020-04-02 17:48:41 +02:00
|
|
|
<button class="btn btn-link text-muted pull-right" type="submit">
|
|
|
|
dismiss
|
|
|
|
</button>
|
2020-04-02 15:36:27 +02:00
|
|
|
You're all set! If you want to set up more things for your project,
|
2020-04-02 18:55:05 +02:00
|
|
|
click "more +" on the top right.
|
2020-04-02 15:36:27 +02:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2020-03-24 15:26:15 +01:00
|
|
|
</div>
|
2020-04-02 17:48:41 +02:00
|
|
|
</form>
|
2020-03-24 15:26:15 +01:00
|
|
|
</div>
|
2020-04-02 17:48:41 +02:00
|
|
|
{% endif %}
|
2020-03-24 16:22:33 +01:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
|
|
|
<div class="event-list project-events">
|
2020-04-01 21:03:12 +02:00
|
|
|
{% for event in events %}
|
2020-04-01 21:16:20 +02:00
|
|
|
{{ eventutil.event(event) }}
|
2020-04-01 21:03:12 +02:00
|
|
|
{% endfor %}
|
2020-03-24 16:22:33 +01:00
|
|
|
<div class="view-more">
|
|
|
|
<a
|
2020-04-01 21:16:20 +02:00
|
|
|
href="{{url_for("projects.feed_GET",
|
|
|
|
owner=owner, project_name=project.name)}}"
|
2020-03-24 16:22:33 +01:00
|
|
|
class="btn btn-link"
|
|
|
|
>View project feed {{icon("caret-right")}}</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-03-24 15:26:15 +01:00
|
|
|
{% if not current_user or current_user != owner %}
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
|
|
|
<div class="alert alert-info">
|
|
|
|
This is a new project. It doesn't have any resources associated with it
|
|
|
|
yet. Come back later?
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
<div class="row">
|
2020-03-24 16:22:33 +01:00
|
|
|
{% if project.summary_repo_id != None %}
|
2020-03-24 15:26:15 +01:00
|
|
|
<div class="col-md-10">
|
2020-04-02 00:26:52 +02:00
|
|
|
{% if current_user and current_user.id == project.owner_id
|
|
|
|
and not summary and not summary_error %}
|
2020-04-01 14:58:48 +02:00
|
|
|
<div class="alert alert-danger">
|
2020-04-01 19:30:57 +02:00
|
|
|
<strong>Head's up!</strong> This project is configured to use
|
|
|
|
"<code>README.md</code>" from
|
2020-04-01 14:58:48 +02:00
|
|
|
<a href="{{project.summary_repo.url()}}">
|
|
|
|
{{project.summary_repo.owner.canonical_name}}/{{project.summary_repo.name}}
|
|
|
|
</a>
|
2020-04-01 19:30:57 +02:00
|
|
|
as the project summary, but there is no such file. Push one to update
|
|
|
|
the project summary, or
|
|
|
|
<a
|
|
|
|
href="{{url_for("sources.manage_GET",
|
|
|
|
owner=owner.canonical_name, project_name=project.name)}}"
|
|
|
|
>choose a different repository</a>.
|
2020-04-01 14:58:48 +02:00
|
|
|
</div>
|
|
|
|
{% else %}
|
2020-04-02 00:26:52 +02:00
|
|
|
{% if not summary_error %}
|
2020-03-24 16:22:33 +01:00
|
|
|
{{summary | extended_md}}
|
2020-04-02 00:26:52 +02:00
|
|
|
{% else %}
|
|
|
|
<div class="alert alert-danger">
|
|
|
|
An internal error occured fetching the README.md for this project.
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2020-04-01 14:58:48 +02:00
|
|
|
{% endif %}
|
2020-03-24 16:22:33 +01:00
|
|
|
</div>
|
|
|
|
{% elif current_user and current_user.id == project.owner_id %}
|
|
|
|
<div class="col-md-8 offset-md-2">
|
|
|
|
{% if any(project.source_repos) %}
|
|
|
|
<div class="alert alert-success">
|
|
|
|
You have added {{len(project.source_repos)}} source
|
|
|
|
repositor{{"ies" if len(project.source_repos) > 1 else "y"}}
|
|
|
|
to this project. Would you like to display the README.md file on this
|
|
|
|
page?
|
|
|
|
</div>
|
|
|
|
<div class="event-list select-resource">
|
|
|
|
{% for repo in project.source_repos %}
|
|
|
|
<form
|
|
|
|
class="event"
|
|
|
|
method="POST"
|
2020-04-01 19:30:57 +02:00
|
|
|
action="{{url_for("sources.summary_POST",
|
2020-03-24 16:22:33 +01:00
|
|
|
owner=project.owner.canonical_name,
|
|
|
|
project_name=project.name,
|
|
|
|
repo_id=repo.id)}}"
|
|
|
|
>
|
|
|
|
{{csrf_token()}}
|
|
|
|
<h3>
|
|
|
|
<button
|
|
|
|
type="submit"
|
|
|
|
class="pull-right btn btn-primary btn-lg"
|
|
|
|
>Use README.md {{ icon("caret-right") }}</button>
|
|
|
|
<a
|
|
|
|
href="{{get_origin("git.sr.ht",
|
|
|
|
external=True)}}/{{ repo.owner.canonical_name }}/{{repo.name}}"
|
|
|
|
target="_blank"
|
|
|
|
rel="noopener"
|
|
|
|
>{{ repo.name }}</a>
|
|
|
|
</h3>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2020-03-24 15:26:15 +01:00
|
|
|
</div>
|
2020-03-24 16:22:33 +01:00
|
|
|
{% endif %}
|
2020-03-24 15:26:15 +01:00
|
|
|
</div>
|
2020-04-28 20:08:56 +02:00
|
|
|
{% if current_user and current_user.user_type.value == "admin" %}
|
|
|
|
<div class="row" style="margin-top: 5rem">
|
|
|
|
<div class="col-md-6">
|
|
|
|
<h3>Feature this project</h3>
|
|
|
|
<form action="{{url_for("projects.feature_POST",
|
|
|
|
owner=project.owner.canonical_name,
|
|
|
|
project_name=project.name)}}"
|
|
|
|
method="POST">
|
|
|
|
{{csrf_token()}}
|
|
|
|
<div class="form-group">
|
|
|
|
<textarea
|
|
|
|
class="form-control"
|
|
|
|
name="summary"
|
|
|
|
rows="3"
|
|
|
|
placeholder="Featured project summary"
|
|
|
|
></textarea>
|
|
|
|
</div>
|
|
|
|
<button
|
|
|
|
type="submit"
|
|
|
|
class="btn btn-primary"
|
|
|
|
>Feature project {{icon('caret-right')}}</button>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2020-03-24 15:26:15 +01:00
|
|
|
</div>
|
|
|
|
{% endblock %}
|