Skip to content
This repository has been archived by the owner on Mar 17, 2024. It is now read-only.

Commit

Permalink
Template files copied from STUDIO
Browse files Browse the repository at this point in the history
  • Loading branch information
niklastheman committed May 12, 2023
1 parent e299524 commit 0842dbe
Show file tree
Hide file tree
Showing 8 changed files with 188 additions and 9 deletions.
1 change: 1 addition & 0 deletions studio/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@
# Email
EMAIL_BACKEND = "django.core.mail.backends.filebased.EmailBackend"
EMAIL_FILE_PATH = BASE_DIR / "sent_emails"
EMAIL_TEMPLATE_PROTOCOL = "http"

VERSION = "dev"

Expand Down
17 changes: 17 additions & 0 deletions templates/admin/base_site.html
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 %}
6 changes: 4 additions & 2 deletions templates/common/common_head.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
<meta name="description" content="">
<meta name="author" content="">

<link rel="icon" href="{% static 'images/logo.png' %}" type="image/x-icon">
<link rel="icon" href="{% static 'images/faviconV2.png' %}" type="image/x-icon">

<script src="{% static 'js/js-utility.js' %}"></script>
<script src="{% static 'js/bs-tooltip.js' %}" defer></script>

<link href="{% static 'vendor/bootstrap-5.2.3-dist/css/bootstrap.min.css' %}" rel="stylesheet">
<script src="{% static 'vendor/bootstrap-5.2.3-dist/js/bootstrap.bundle.min.js' %}"></script>
Expand All @@ -18,4 +19,5 @@
<link rel="stylesheet" href="{% static 'css/colors.css' %}">
<link rel="stylesheet" href="{% static 'css/text.css' %}">
<link rel="stylesheet" href="{% static 'css/utilities.css' %}">
<link rel="stylesheet" href="{% static 'css/elements.css' %}">
<link rel="stylesheet" href="{% static 'css/elements.css' %}">
<link rel="stylesheet" href="{% static 'css/patterns.css' %}">
10 changes: 5 additions & 5 deletions templates/common/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@
<div class="col-6 text-start">
<ul class="list-inline">
<li class="list-inline-item">
<a href="https://twitter.com/scaleoutsystem" target="_blank">
<button class="btn rounded-100 shadow" style="background-color: #55acee;">
<i class="bi bi-twitter fs-4 text-white"></i>
<a href="https://www.linkedin.com/company/scaleout-systems" class="default" target="_blank">
<button class="btn rounded-100 shadow" style="background-color: #0082ca;">
<i class="bi bi-linkedin fs-4 text-white"></i>
</button>
</a>
</li>
<li class="list-inline-item">
<a
href="https://www.youtube.com/channel/UCZVv30LFXMQUOswNDKuQpNA" target="_blank">
href="https://www.youtube.com/channel/UCZVv30LFXMQUOswNDKuQpNA" class="default" target="_blank">
<button class="btn rounded-100 shadow" style="background-color: #ed302f;">
<i class="bi bi-youtube fs-4 text-white"></i>
</button>
</a>
</li>
<li class="list-inline-item">
<a href="https://github.com/scaleoutsystems" target="_blank">
<a href="https://github.com/scaleoutsystems" class="default" target="_blank">
<button class="btn rounded-100 shadow" style="background-color: #333333;">
<i class="bi bi-github fs-4 text-white"></i>
</button>
Expand Down
26 changes: 26 additions & 0 deletions templates/common/serve_model_link.html
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 %}
131 changes: 131 additions & 0 deletions templates/models/models_details_public.html
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 %}
2 changes: 1 addition & 1 deletion templates/registration/password_reset_confirm.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<div class="row">
<div class="col d-flex justify-content-center">
<img src="{% static 'images/scaleout.png' %}" alt="STACKn Logo" width="200">
<img src="{% static 'images/logo.png' %}" alt="STACKn Logo" width="200">
</div>
</div>

Expand Down
4 changes: 3 additions & 1 deletion templates/registration/password_reset_email.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{% load i18n %}{% autoescape off %}
{% blocktrans %}Hey, You're receiving this email because you requested a password reset for your user account at {{ site_name }}.{% endblocktrans %}
{% load get_setting %}


{% trans "Please go to the following page and choose a new password:" %}
{% block reset_link %}
{{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %}
{% get_setting "EMAIL_TEMPLATE_PROTOCOL" %}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %}
{% endblock %}
{% trans "Your username, in case you've forgotten:" %} {{ user.get_username }}

Expand Down

0 comments on commit 0842dbe

Please sign in to comment.