Sam Jeston
History
47 lines·
2.4 KB
·HTML
| 1 | {% extends "base.html" %} |
| 2 | {% block title %}New repository · Openhub{% endblock %} |
| 3 | {% block content %} |
| 4 | <div class="narrow"> |
| 5 | <div class="page-header"> |
| 6 | <h1>Create a new repository</h1> |
| 7 | <p class="text-muted">A repository contains all your project's files and their revision history.</p> |
| 8 | </div> |
| 9 | {% if let Some(e) = error %}<div class="flash flash-error">{{ crate::web::fmt::icon("circle-alert")|safe }}<span>{{ e }}</span></div>{% endif %} |
| 10 | <form method="post" action="/new" class="form"> |
| 11 | <div class="field-row"> |
| 12 | <div class="field"> |
| 13 | <span class="field-label">Owner</span> |
| 14 | <div class="input input-static">{% if let Some(u) = ctx.user %}{{ crate::web::fmt::avatar(u.username, 18)|safe }} {{ u.username }}{% endif %}</div> |
| 15 | </div> |
| 16 | <span class="field-row-sep">/</span> |
| 17 | <label class="field field-grow"> |
| 18 | <span class="field-label">Repository name</span> |
| 19 | <input class="input" type="text" name="name" value="{{ name }}" maxlength="100" autocapitalize="off" autofocus required> |
| 20 | </label> |
| 21 | </div> |
| 22 | <label class="field"> |
| 23 | <span class="field-label">Description <span class="text-muted">(optional)</span></span> |
| 24 | <input class="input" type="text" name="description" value="{{ description }}" maxlength="350"> |
| 25 | </label> |
| 26 | <fieldset class="field radio-cards"> |
| 27 | <label class="radio-card"> |
| 28 | <input type="radio" name="visibility" value="public"{% if !private %} checked{% endif %}> |
| 29 | {{ crate::web::fmt::icon("book-marked")|safe }} |
| 30 | <span><strong>Public</strong><span class="text-muted">Anyone who can reach this server can see and clone this repository.</span></span> |
| 31 | </label> |
| 32 | <label class="radio-card"> |
| 33 | <input type="radio" name="visibility" value="private"{% if private %} checked{% endif %}> |
| 34 | {{ crate::web::fmt::icon("lock")|safe }} |
| 35 | <span><strong>Private</strong><span class="text-muted">Only you and collaborators you add can see this repository.</span></span> |
| 36 | </label> |
| 37 | </fieldset> |
| 38 | <label class="checkbox"> |
| 39 | <input type="checkbox" name="readme" value="1"{% if readme %} checked{% endif %}> |
| 40 | <span><strong>Add a README file</strong><span class="text-muted">Start with an initial commit so you can clone the repository right away.</span></span> |
| 41 | </label> |
| 42 | <div class="form-actions"> |
| 43 | <button class="btn btn-primary" type="submit">Create repository</button> |
| 44 | </div> |
| 45 | </form> |
| 46 | </div> |
| 47 | {% endblock %} |