@ -12,143 +12,15 @@
|
||||
<meta http-equiv="refresh" content="0; url=/{{ settings.LOGIN_URL }}" />
|
||||
{% else %}
|
||||
<link rel="stylesheet" href="{% static 'base.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'code.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'content.css' %}">
|
||||
{% block additional-stylesheet %}{% endblock additional-stylesheet %}
|
||||
<script src="{% static 'functions.js' %}"></script>
|
||||
|
||||
{% endif %}
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{% block body %}
|
||||
<header>
|
||||
|
||||
<h1 id="site-title"><a href="/" style="text-decoration: none; color: inherit;">{% settings_value "SITE_TITLE" %}</a></h1>
|
||||
|
||||
{%if user.is_authenticated %}
|
||||
<div class="dropdown" style="right: 0px; position: fixed; padding-right: 50px;">
|
||||
<button class="dropbtn">{% block user_name %}{%if user.username %}{{ user.username }}{% else %}My Account{% endif %}{% endblock %}</button>
|
||||
<div class="dropdown-content">
|
||||
<!-- <a href="#">Link 1</a> -->
|
||||
{% if user.is_superuser or user.is_staff %}
|
||||
<form action="{% url 'admin:index' %}" method="post">
|
||||
{% csrf_token %}
|
||||
<button class="accbtn">Admin Panel</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
<form action="{% url '_settings_user' pk=user_settings %}" method="post">
|
||||
{% csrf_token %}
|
||||
<button class="accbtn">Settings</button>
|
||||
</form>
|
||||
<form action="{% url 'password_change' %}" method="post">
|
||||
{% csrf_token %}
|
||||
<button class="accbtn">Change Password</button>
|
||||
</form>
|
||||
<form action="{% url 'logout' %}" method="post">
|
||||
{% csrf_token %}
|
||||
<button class="accbtn">Log Out</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<nav style="padding: 0px;">
|
||||
{% include 'navigation.html.j2' %}
|
||||
</nav>
|
||||
|
||||
<style>
|
||||
|
||||
section h2 span svg {
|
||||
height: 100%;
|
||||
margin: auto 0 auto 0;
|
||||
fill: #666;
|
||||
cursor: pointer;
|
||||
width: 30px;
|
||||
/*height: 30px;*/
|
||||
}
|
||||
|
||||
.icon-delete svg {
|
||||
fill: #ff0000;
|
||||
}
|
||||
|
||||
.icon-help svg {
|
||||
fill: #177ee6;
|
||||
}
|
||||
|
||||
.warning-bar {
|
||||
background-color: #f1d599;
|
||||
border: 1px solid #ecb785;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
width: 100%;
|
||||
padding: 0px 20px 0px 20px
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<section>
|
||||
<h2 id="content_title">{% block title %}{{ content_title }}{% endblock %}
|
||||
{% if model_delete_url %}
|
||||
<span title="Delete Item" id="content_header_icon" class="icon-delete" onclick="window.location='{{ model_delete_url }}';">
|
||||
{% include 'icons/delete.svg' %}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if model_docs_path %}
|
||||
<span title="Help" id="content_header_icon" class="icon-help" onclick="window.open('{% settings_value 'DOCS_ROOT' %}{{ model_docs_path }}', '_blank')">
|
||||
{% include 'icons/help.svg' %}
|
||||
</span>
|
||||
{% endif %}
|
||||
</h2>
|
||||
{% if user.is_authenticated %}
|
||||
{% if not user_default_organization %}
|
||||
<div class="warning-bar">You do not have a <b>default organization</b> set, go to <a href="{% url '_settings_user' pk=user_settings %}">user settings</a> to set one</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% block article %}
|
||||
<article id="content-body">
|
||||
{% block content %}{% endblock %}
|
||||
</article>
|
||||
{% endblock article %}
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<footer>
|
||||
<span style=" text-align: left;">
|
||||
<a title="Documentation" href="https://nofusscomputing.com/projects/centurion_erp/" target="_blank">
|
||||
{% include 'icons/documentation.svg' %}
|
||||
</a>
|
||||
<a title="Rest API" href="/api/" target="_blank">
|
||||
{% include 'icons/api.svg' %}
|
||||
</a>
|
||||
<a title="Swagger API Documentation" href="/api/v2/docs" target="_blank">
|
||||
{% include 'icons/swagger_docs.svg' %}
|
||||
</a>
|
||||
<a title="Code Home" href="{{ build_details.project_url }}" target="_blank">
|
||||
{% include 'icons/git.svg' %}
|
||||
</a>
|
||||
</span>
|
||||
<span style="text-align: center;">
|
||||
Centurion ERP brought to you by <a href="https://nofusscomputing.com" target="_blank">No Fuss Computing</a>
|
||||
</span>
|
||||
<span style="text-align: right;">
|
||||
Release:
|
||||
{% if build_details.version %}
|
||||
version: {{ build_details.version }}
|
||||
{% else %}
|
||||
development
|
||||
{% endif %}
|
||||
( {% if build_details.project_url %}<a href="{{ build_details.project_url }}/commit/{{ build_details.sha }}" target="_blank">{% endif %}
|
||||
{{ build_details.sha }}
|
||||
{% if build_details.project_url %}</a>{% endif %} )
|
||||
</span>
|
||||
</footer>
|
||||
</section>
|
||||
</main>
|
||||
{% endblock body %}
|
||||
{% block body %}{% endblock body %}
|
||||
|
||||
</body>
|
||||
|
||||
|
@ -1,101 +0,0 @@
|
||||
{% load json %}
|
||||
{% load markdown %}
|
||||
{% load choice_ids %}
|
||||
|
||||
{% block additional-stylesheet %}
|
||||
{% load static %}
|
||||
<link rel="stylesheet" href="{% static 'ticketing.css' %}">
|
||||
{% endblock additional-stylesheet %}
|
||||
|
||||
{% if field.widget_type == 'textarea' or field.label == 'Notes' %}
|
||||
|
||||
{% if field.name in section.json and field.value %}
|
||||
|
||||
<pre style="width: 80%; text-align: left; display:inline; border: 1px solid #ccc; padding: 22px;">{{ field.value.strip | json_pretty | safe }}</pre>
|
||||
|
||||
{% elif field.name in section.markdown or field.label == 'Notes' %}
|
||||
|
||||
{% if field.label == 'Notes' %}
|
||||
|
||||
<div>
|
||||
<label style="font-weight: bold; width: 100%; border-bottom: 1px solid #ccc; display: block; text-align: inherit;">
|
||||
{{ field.label }}
|
||||
</label>
|
||||
|
||||
<div id="markdown" style="display: inline-block; text-align: left;">
|
||||
{% if field.value %}
|
||||
{{ field.value | markdown | safe }}
|
||||
{% else %}
|
||||
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% else %}
|
||||
|
||||
{% if field.value %}
|
||||
|
||||
<div id="markdown">{{ field.value | markdown | safe }}</div>
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% elif not field.value %}
|
||||
|
||||
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
<div class="detail-view-field">
|
||||
<label>{{ field.label }}</label>
|
||||
<span>
|
||||
{% if field.field.choices %} {# Display the selected choice text value #}
|
||||
|
||||
{% if field.value %}
|
||||
|
||||
{% for field_value in field.value|choice_ids %}
|
||||
|
||||
{% for id, value in field.field.choices %}
|
||||
|
||||
{% if field_value == id %}
|
||||
|
||||
{{ value }},
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
|
||||
{% if field.value is not None %}
|
||||
|
||||
{{ field.value }}
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
@ -1,104 +0,0 @@
|
||||
{% load json %}
|
||||
{% load markdown %}
|
||||
|
||||
{% if not tab.sections %}
|
||||
|
||||
<h3>{{ tab.name }}</h3>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% for section in tab.sections %}
|
||||
|
||||
|
||||
{% if forloop.first %}
|
||||
|
||||
<h3>
|
||||
{{ tab.name }}
|
||||
{% for external_link in external_links %}
|
||||
<span style="font-weight: normal; float: right;">{% include 'icons/external_link.html.j2' with external_link=external_link %}</span>
|
||||
{% endfor %}
|
||||
</h3>
|
||||
|
||||
{% else %}
|
||||
|
||||
<hr />
|
||||
<h3>{{ section.name }}</h3>
|
||||
|
||||
{% endif %}
|
||||
|
||||
<div style="align-items:flex-start; align-content: center; display: flexbox; width: 100%">
|
||||
|
||||
{% if section.layout == 'single' %}
|
||||
|
||||
{% for section_field in section.fields %}
|
||||
{% for field in form %}
|
||||
|
||||
{% if field.name in section_field %}
|
||||
|
||||
{% include 'content/field.html.j2' %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
{% elif section.layout == 'double' %}
|
||||
|
||||
{% if section.left %}
|
||||
|
||||
<div style="display: inline; width: 40%; margin: 30px;">
|
||||
|
||||
{% for section_field in section.left %}
|
||||
{% for field in form %}
|
||||
|
||||
{% if field.name in section_field %}
|
||||
|
||||
{% include 'content/field.html.j2' %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if section.right %}
|
||||
|
||||
<div style="display: inline; width: 40%; margin: 30px; text-align: left;">
|
||||
|
||||
{% for section_field in section.right %}
|
||||
{% for field in form %}
|
||||
|
||||
{% if field.name in section_field %}
|
||||
|
||||
{% include 'content/field.html.j2' %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if forloop.first %}
|
||||
|
||||
{% if tab.edit_url %}
|
||||
|
||||
<div style="display:block;">
|
||||
<input type="button" value="Edit" onclick="window.location='{{ tab.edit_url }}';">
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
@ -1,47 +0,0 @@
|
||||
{% extends 'base.html.j2' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="content-navigation-tabs">
|
||||
|
||||
<button onclick="window.location='{{ form.url_index_view }}';" style="vertical-align: middle; padding: auto; margin: 0px">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="25px" viewBox="0 -960 960 960" width="25px"
|
||||
style="vertical-align: middle; margin: 0px; padding: 0px border: none; " fill="#6a6e73">
|
||||
<path d="m313-480 155 156q11 11 11.5 27.5T468-268q-11 11-28 11t-28-11L228-452q-6-6-8.5-13t-2.5-15q0-8 2.5-15t8.5-13l184-184q11-11 27.5-11.5T468-692q11 11 11 28t-11 28L313-480Zm264 0 155 156q11 11 11.5 27.5T732-268q-11 11-28 11t-28-11L492-452q-6-6-8.5-13t-2.5-15q0-8 2.5-15t8.5-13l184-184q11-11 27.5-11.5T732-692q11 11 11 28t-11 28L577-480Z" />
|
||||
</svg>
|
||||
Back to {{ form.model_name_plural }}
|
||||
</button>
|
||||
|
||||
{% for key, tab in form.tabs.items %}
|
||||
|
||||
{% if forloop.first %}
|
||||
|
||||
<button id="defaultOpen" class="content-navigation-tabs-link" onclick="openContentNavigationTab(event, '{{ tab.slug }}')">{{ tab.name }}</button>
|
||||
|
||||
{% else %}
|
||||
|
||||
<button id="tab-{{ tab.slug }}" class="content-navigation-tabs-link" onclick="openContentNavigationTab(event, '{{ tab.slug }}')">{{ tab.name }}</button>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
|
||||
{% block tabs %}{% endblock %}
|
||||
|
||||
{% if open_tab %}
|
||||
|
||||
<script>
|
||||
document.getElementById("tab-{{ open_tab }}").click();
|
||||
</script>
|
||||
|
||||
{% else %}
|
||||
|
||||
<script>
|
||||
document.getElementById("defaultOpen").click();
|
||||
</script>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
@ -1,12 +0,0 @@
|
||||
{% extends 'base.html.j2' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div>
|
||||
<form method="post" id="dynamic-form">
|
||||
{% csrf_token %}
|
||||
{{ form.as_div }}
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
@ -1,12 +0,0 @@
|
||||
{% extends 'base.html.j2' %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
|
||||
To Do List:
|
||||
|
||||
<ul>
|
||||
<li>{% include 'icons/issue_link.html.j2' with issue=5 %} - Item History</li>
|
||||
</ul>
|
||||
|
||||
{% endblock %}
|
@ -1,86 +0,0 @@
|
||||
{% block navigation %}
|
||||
|
||||
{% for group in nav_items %}
|
||||
<style>
|
||||
|
||||
span.navigation_icon {
|
||||
display: inline-block;
|
||||
line-height: 30px;
|
||||
align-items: center;
|
||||
vertical-align: middle;
|
||||
/*padding: auto;*/
|
||||
margin: 0px;
|
||||
fill: #fff;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
/*vertical-align: middle;*/
|
||||
/*margin: 0px;*/
|
||||
/*padding: 0px;*/
|
||||
border: none;
|
||||
border-radius: 11px;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<button class="collapsible{% if group.is_active %} active{% endif %}">
|
||||
<span class="navigation_icon">
|
||||
{% if group.name == 'Assistance' %}
|
||||
{% include 'icons/assistance.svg' %}
|
||||
{% elif group.name == 'Access' %}
|
||||
{% include 'icons/access.svg' %}
|
||||
{% elif group.name == 'Config Management' %}
|
||||
{% include 'icons/ansible.svg' %}
|
||||
{% elif group.name == 'ITAM' %}
|
||||
{% include 'icons/itam.svg' %}
|
||||
{% elif group.name == 'ITIM' %}
|
||||
{% include 'icons/itim.svg' %}
|
||||
{% elif group.name == 'Settings' %}
|
||||
{% include 'icons/settings.svg' %}
|
||||
{% elif group.name == 'Project Management' %}
|
||||
{% include 'icons/project.svg' %}
|
||||
{% endif %}
|
||||
</span>
|
||||
{{ group.name }}
|
||||
</button>
|
||||
<div class="content"{% if group.is_active %} style="max-height:inherit" {% endif %}>
|
||||
<ul>
|
||||
{% for group_urls in group.urls %}
|
||||
<li{% if group_urls.is_active %} class="active"{% endif %} style="padding-left: 40px">
|
||||
<span class="navigation_icon">
|
||||
{% if group_urls.name == 'Clusters' %}
|
||||
{% include 'icons/clusters.svg' %}
|
||||
{% elif group_urls.name == 'Devices' %}
|
||||
{% include 'icons/devices.svg' %}
|
||||
{% elif group_urls.name == 'Knowledge Base' %}
|
||||
{% include 'icons/information.svg' %}
|
||||
{% elif group_urls.name == 'Services' %}
|
||||
{% include 'icons/service.svg' %}
|
||||
{% elif group_urls.name == 'Software' %}
|
||||
{% include 'icons/software.svg' %}
|
||||
{% elif group_urls.name == 'Groups' %}
|
||||
{% include 'icons/config_management.svg' %}
|
||||
{% endif %}
|
||||
</span>
|
||||
<a href="{{ group_urls.url }}">{{ group_urls.name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<script>
|
||||
var coll = document.getElementsByClassName("collapsible");
|
||||
var i;
|
||||
|
||||
for (i = 0; i < coll.length; i++) {
|
||||
coll[i].addEventListener("click", function () {
|
||||
this.classList.toggle("active");
|
||||
var content = this.nextElementSibling;
|
||||
if (content.style.maxHeight) {
|
||||
content.style.maxHeight = null;
|
||||
} else {
|
||||
content.style.maxHeight = content.scrollHeight + "px";
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
@ -1,13 +0,0 @@
|
||||
{% extends 'base.html.j2' %}
|
||||
|
||||
{% block title %}Change Password{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div>
|
||||
<form action="" method="post">
|
||||
{% csrf_token %}
|
||||
{{ form }}
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user