This repository has been archived by the owner on Mar 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e299524
commit 0842dbe
Showing
8 changed files
with
188 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{% extends "admin/base.html" %} | ||
{% comment %} {% load i18n eatn_tags static %} {% endcomment %} | ||
{% load i18n %} | ||
{% load static %} | ||
{% block title %}{{ title }} - Studio{% endblock %} | ||
{% block extrastyle %} | ||
|
||
{% endblock %} | ||
{% block branding %} | ||
<img src="{% static 'images/scaleout_black.png' %}" alt="Studio Logo" width="200"> | ||
{% endblock %} | ||
{% block nav-global %} | ||
|
||
{% include 'common/common_fonts.html' %} | ||
|
||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{% load can_create_app %} | ||
|
||
{% can_create_app request.user project model.object_type.all.first.app_slug as can_create %} | ||
|
||
{% if can_create %} | ||
<a class="dropdown-item default" | ||
href="{% url 'apps:serve' request.user project.slug model.object_type.all.first.app_slug model.version %}"> | ||
<i class="bi bi-check2-circle me-1"></i> | ||
Serve | ||
</a> | ||
|
||
{% else %} | ||
|
||
<div class="dropdown-item border-bottom"> | ||
<a class="opacity-50 default"> | ||
<i class="bi bi-check2-circle me-1"></i> | ||
Serve | ||
</a> | ||
<p class="m-0"> | ||
<small> | ||
Max number of apps reached | ||
</small> | ||
</p> | ||
</div> | ||
|
||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
{% extends base_template %} | ||
|
||
{% load custom_tags %} | ||
|
||
{% block content %} | ||
|
||
<div class="row"> | ||
<div class="col"> | ||
|
||
<h3> | ||
Model Details | ||
</h3> | ||
</div> | ||
</div> | ||
|
||
<div class="row pt-3"> | ||
<div class="col-12 col-lg-12"> | ||
<div class="card border-0 shadow"> | ||
<div class="card-header bg-white"> | ||
<h5 class="card-title mb-0">{{ model.name }}</h5> | ||
<p>{{ model.description }}</p> | ||
</div> | ||
<div class="card-body"> | ||
<dl class="row"> | ||
<dt class="col-4 col-xxl-3">Project</dt> | ||
<dd class="col-8 col-xxl-9"> | ||
{{ model.project.name }} | ||
</dd> | ||
<dt class="col-4 col-xxl-3 mb-0">Project Owner</dt> | ||
<dd class="col-8 col-xxl-9 mb-0"> | ||
{{ model.project.owner }} | ||
</dd> | ||
</dl> | ||
<hr> | ||
<dl class="row"> | ||
<dt class="col-4 col-xxl-3">Version</dt> | ||
<dd class="col-8 col-xxl-9"> | ||
<p class="mb-1">{{ model.version }}</p> | ||
</dd> | ||
<dt class="col-4 col-xxl-3 mb-0">Uploaded</dt> | ||
<dd class="col-8 col-xxl-9 mb-0"> | ||
<p class="mb-0">{{ model.uploaded_at }}</p> | ||
</dd> | ||
</dl> | ||
{% if request.user and request.user.is_authenticated and request.user == model.project.owner or request.user.is_superuser %} | ||
<hr> | ||
|
||
<div class="row"> | ||
|
||
<div class="col"> | ||
<div class="row"> | ||
<div class="col-12 col-lg-4"> | ||
<p><strong>Add tag</strong></p> | ||
</div> | ||
<div class="col-12 col-lg-8"> | ||
<form method="POST" action="{% if private %}{% url 'models:add_tag_private' request.user project.slug model.id %}{% else %}{% url 'models:add_tag' published_model.id model.id %}{% endif %}"> | ||
|
||
{% csrf_token %} | ||
|
||
<div class="row"> | ||
<div class="col-12 col-md-6"> | ||
|
||
{% include 'common/autocomplete.html' with str_list=all_tags id_suffix="tags" name="tag" required=True %} | ||
</div> | ||
<div class="col-12 col-md-6 pt-3 pt-md-0"> | ||
|
||
<div class="row"> | ||
<div class="col"> | ||
<input type="submit" class="btn btn-primary" value="Add"> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
|
||
</form> | ||
</div> | ||
</div> | ||
|
||
<div class="row pt-3"> | ||
<div class="col-12 col-lg-4"> | ||
<p><strong>Tags</strong></p> | ||
</div> | ||
<div class="col-12 col-lg-8 d-flex"> | ||
{% with model.tags|split:"," as tags %} | ||
|
||
{% for tag in tags %} | ||
|
||
<form method="post" action="{% if private %}{% url 'models:remove_tag_private' request.user project.slug model.id %}{% else %}{% url 'models:remove_tag' published_model.id model.id %}{% endif %}"> | ||
|
||
{% csrf_token %} | ||
|
||
<div class="align-items-center d-flex m-1 p-2 rounded shadow"> | ||
{{tag}} <button type="submit" class="btn-close ms-1" name="tag" value="{{tag}}" aria-label="Close"></button> | ||
</div> | ||
</form> | ||
|
||
{% endfor %} | ||
|
||
{% endwith %} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
{% endif%} | ||
|
||
</div> | ||
</div> | ||
|
||
<div class="row pt-3"> | ||
<div class="col"> | ||
<div class="card border-0 shadow"> | ||
{% if model.model_card %} | ||
<div class="card-header"> | ||
<h5 class="card-title mb-0">Model Card</h5> | ||
</div> | ||
<div class="card-body"> | ||
{{ model.model_card | safe }} | ||
</div> | ||
{% else %} | ||
<div class="card-body"> | ||
<p>No model card available.</p> | ||
</div> | ||
{% endif %} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters