diff options
Diffstat (limited to 'gstudio')
13 files changed, 95 insertions, 17 deletions
diff --git a/gstudio/templates/gstudio/_header.html b/gstudio/templates/gstudio/_header.html index 51061794..f1f21d17 100644 --- a/gstudio/templates/gstudio/_header.html +++ b/gstudio/templates/gstudio/_header.html @@ -9,11 +9,12 @@ grappelli_admin_title }}{% else %}{% get_admin_title %}{% endif %} | <a href="/">Home</a> | <a href="{{ get_absolute_url }}/objects">objects</a> + {% if user.is_authenticated %} - {% if user.is_staff%} + | <a href="{{ get_absolute_url }}/gstudio/userdashboard">My Dashboard</a> + {% if user.is_staff %} | <a href="{{ get_absolute_url }}/admin">Admin Dashboard</a> - {% else %} - | <a href="{{ get_absolute_url }}/gstudio/userdashboard">My Dashboard</a> + {% endif %} {% endif %} diff --git a/gstudio/templates/gstudiodashboard/dashboard.html b/gstudio/templates/gstudiodashboard/dashboard.html index d70c4510..43ea1edd 100644 --- a/gstudio/templates/gstudiodashboard/dashboard.html +++ b/gstudio/templates/gstudiodashboard/dashboard.html @@ -6,18 +6,18 @@ <h1>Welcome {% firstof user.first_name user.username %}</h1> <h2>Gstudio</h2> <ul> - <li><a href="{{get_absoulute_url}}/gstudio/add/metatype">{% trans 'Add Metatype' %}</a></li> - <li><a href="{{get_absoulute_url}}/gstudio/add/metatype">{% trans 'Add Metatype' %}</a></li> - <li><a href="{{get_absoulute_url}}/gstudio/add/objecttype">{% trans 'Add Object type' %}</a></li> - <li><a href="{{get_absoulute_url}}/gstudio/add/relationtype">{% trans 'Add Relation type' %}</a></li> - <li><a href="{{get_absoulute_url}}/gstudio/add/attributetype">{% trans 'Add Attribute Type' %}</a></li> - <li><a href="{{get_absoulute_url}}/gstudio/add/systemtype">{% trans 'Add System Type' %}</li> - <li><a href="{{get_absoulute_url}}/gstudio/add/processtype">{% trans 'Add Process Type' %}</li> - <li><a href="{{get_absoulute_url}}/gstudio/add/attribute">{% trans 'Add Attribute' %}</li> - <li><a href="{{get_absoulute_url}}/gstudio/add/relation">{% trans 'Add Relation' %}</li> - <li><a href="{{get_absoulute_url}}/gstudio/add/complement">{% trans 'Add Complement' %}</li> - <li><a href="{{get_absoulute_url}}/gstudio/add/intersection">{% trans 'Add Intersection' %}</li> - <li><a href="{{get_absoulute_url}}/gstudio/add/union">{% trans 'Add Union' %}</li> + <li><a href="{{get_absoulute_url}}/nodetypes/add/metatype">{% trans 'Add Metatype' %}</a></li> + <li><a href="{{get_absoulute_url}}/nodetypes/add/metatype">{% trans 'Add Metatype' %}</a></li> + <li><a href="{{get_absoulute_url}}/nodetypes/add/objecttype">{% trans 'Add Object type' %}</a></li> + <li><a href="{{get_absoulute_url}}/nodetypes/add/relationtype">{% trans 'Add Relation type' %}</a></li> + <li><a href="{{get_absoulute_url}}/nodetypes/add/attributetype">{% trans 'Add Attribute Type' %}</a></li> + <li><a href="{{get_absoulute_url}}/nodetypes/add/systemtype">{% trans 'Add System Type' %}</li> + <li><a href="{{get_absoulute_url}}/nodetypes/add/processtype">{% trans 'Add Process Type' %}</li> + <li><a href="{{get_absoulute_url}}/nodetypes/add/attribute">{% trans 'Add Attribute' %}</li> + <li><a href="{{get_absoulute_url}}/nodetypes/add/relation">{% trans 'Add Relation' %}</li> + <li><a href="{{get_absoulute_url}}/nodetypes/add/complement">{% trans 'Add Complement' %}</li> + <li><a href="{{get_absoulute_url}}/nodetypes/add/intersection">{% trans 'Add Intersection' %}</li> + <li><a href="{{get_absoulute_url}}/nodetypes/add/union">{% trans 'Add Union' %}</li> </ul> <h2>Objects</h2> <ul> diff --git a/gstudio/templates/gstudioforms/gstudioattributeform.html b/gstudio/templates/gstudioforms/gstudioattributeform.html index 6779ab52..38e85fa5 100644 --- a/gstudio/templates/gstudioforms/gstudioattributeform.html +++ b/gstudio/templates/gstudioforms/gstudioattributeform.html @@ -4,6 +4,7 @@ {% block content %} <form method="post" action="."> {% csrf_token %} +{% if user.is_authenticated %} <h2>Form to add attributes</h2> {% for field in formset %} @@ -12,10 +13,18 @@ {{ field.errors }}<br> + {% endfor %} + + <input type="Submit" value="{% trans 'ADD' %}" /> <input type="hidden" name="next" value="{{ next }}" /> + {% else %} + <h2>Sorry either you are not logged in or dont have permission to view this content</h2> + <a href="{{get_absoulute_url}}/accounts/login">{% trans 'Login' %}</a><br> + <a href="{{get_absoulute_url}}/accounts/register">{% trans 'Register' %}</a><br> + {% endif %} </form> {% endblock %} diff --git a/gstudio/templates/gstudioforms/gstudioattributetypeform.html b/gstudio/templates/gstudioforms/gstudioattributetypeform.html index 7b5529f4..2a04811f 100644 --- a/gstudio/templates/gstudioforms/gstudioattributetypeform.html +++ b/gstudio/templates/gstudioforms/gstudioattributetypeform.html @@ -4,6 +4,7 @@ {% block content %} <form method="post" action="."> {% csrf_token %} +{% if user.is_authenticated %} <h2>Form to add Attributetypes</h2> {% for field in formset %} @@ -17,5 +18,11 @@ <input type="Submit" value="{% trans 'ADD' %}" /> <input type="hidden" name="next" value="{{ next }}" /> </form> + {% else %} + <h2>Sorry either you are not logged in or dont have permission to view this content</h2> + <a href="{{get_absoulute_url}}/accounts/login">{% trans 'Login' %}</a><br> + <a href="{{get_absoulute_url}}/accounts/register">{% trans 'Register' %}</a><br> + {% endif %} + {% endblock %} diff --git a/gstudio/templates/gstudioforms/gstudiocomplementform.html b/gstudio/templates/gstudioforms/gstudiocomplementform.html index 4304d242..7066541c 100644 --- a/gstudio/templates/gstudioforms/gstudiocomplementform.html +++ b/gstudio/templates/gstudioforms/gstudiocomplementform.html @@ -4,6 +4,7 @@ {% block content %} <form method="post" action="."> {% csrf_token %} +{% if user.is_authenticated %} <h2>Form to add Complements</h2> {% for field in formset %} @@ -17,5 +18,11 @@ <input type="Submit" value="{% trans 'ADD' %}" /> <input type="hidden" name="next" value="{{ next }}" /> </form> + {% else %} + <h2>Sorry either you are not logged in or dont have permission to view this content</h2> + <a href="{{get_absoulute_url}}/accounts/login">{% trans 'Login' %}</a><br> + <a href="{{get_absoulute_url}}/accounts/register">{% trans 'Register' %}</a><br> + {% endif %} + {% endblock %} diff --git a/gstudio/templates/gstudioforms/gstudiointersectionform.html b/gstudio/templates/gstudioforms/gstudiointersectionform.html index 71533ff6..13cbeccb 100644 --- a/gstudio/templates/gstudioforms/gstudiointersectionform.html +++ b/gstudio/templates/gstudioforms/gstudiointersectionform.html @@ -3,7 +3,8 @@ {% block content %} <form method="post" action="."> -{% csrf_token %} +{% csrf_token %} +{% if user.is_authenticated %} <h2>Form to add Intersection</h2> {% for field in formset %} @@ -17,5 +18,11 @@ <input type="Submit" value="{% trans 'ADD' %}" /> <input type="hidden" name="next" value="{{ next }}" /> </form> + {% else %} + <h2>Sorry either you are not logged in or dont have permission to view this content</h2> + <a href="{{get_absoulute_url}}/accounts/login">{% trans 'Login' %}</a><br> + <a href="{{get_absoulute_url}}/accounts/register">{% trans 'Register' %}</a><br> + {% endif %} + {% endblock %} diff --git a/gstudio/templates/gstudioforms/gstudiometatypeform.html b/gstudio/templates/gstudioforms/gstudiometatypeform.html index b86b50e3..bdb91165 100644 --- a/gstudio/templates/gstudioforms/gstudiometatypeform.html +++ b/gstudio/templates/gstudioforms/gstudiometatypeform.html @@ -4,6 +4,7 @@ {% block content %} <form method="post" action="."> {% csrf_token %} +{% if user.is_authenticated %} <h2>Form to add Metatypes</h2> {% for field in formset %} @@ -18,5 +19,11 @@ <input type="Submit" value="{% trans 'ADD' %}" /> <input type="hidden" name="next" value="{{ next }}" /> </form> + {% else %} + <h2>Sorry either you are not logged in or dont have permission to view this content</h2> + <a href="{{get_absoulute_url}}/accounts/login">{% trans 'Login' %}</a><br> + <a href="{{get_absoulute_url}}/accounts/register">{% trans 'Register' %}</a><br> + {% endif %} + {% endblock %} diff --git a/gstudio/templates/gstudioforms/gstudioobjecttypeform.html b/gstudio/templates/gstudioforms/gstudioobjecttypeform.html index c4d8bcb8..2fc2fba9 100644 --- a/gstudio/templates/gstudioforms/gstudioobjecttypeform.html +++ b/gstudio/templates/gstudioforms/gstudioobjecttypeform.html @@ -4,6 +4,7 @@ {% block content %} <form method="post" action="."> {% csrf_token %} +{% if user.is_authenticated %} <h2>Form to add Objecttypes</h2> {% for field in formset %} @@ -17,5 +18,11 @@ <input type="Submit" value="{% trans 'ADD' %}" /> <input type="hidden" name="next" value="{{ next }}" /> </form> + {% else %} + <h2>Sorry either you are not logged in or dont have permission to view this content</h2> + <a href="{{get_absoulute_url}}/accounts/login">{% trans 'Login' %}</a><br> + <a href="{{get_absoulute_url}}/accounts/register">{% trans 'Register' %}</a><br> + {% endif %} + {% endblock %} diff --git a/gstudio/templates/gstudioforms/gstudioprocesstypeform.html b/gstudio/templates/gstudioforms/gstudioprocesstypeform.html index 00939595..0ecfbc05 100644 --- a/gstudio/templates/gstudioforms/gstudioprocesstypeform.html +++ b/gstudio/templates/gstudioforms/gstudioprocesstypeform.html @@ -4,6 +4,7 @@ {% block content %} <form method="post" action="."> {% csrf_token %} +{% if user.is_authenticated %} <h2>Form to add Processtypes</h2> {% for field in formset %} @@ -16,5 +17,10 @@ <input type="Submit" value="{% trans 'ADD' %}" /> <input type="hidden" name="next" value="{{ next }}" /> </form> + {% else %} + <h2>Sorry either you are not logged in or dont have permission to view this content</h2> + <a href="{{get_absoulute_url}}/accounts/login">{% trans 'Login' %}</a><br> + <a href="{{get_absoulute_url}}/accounts/register">{% trans 'Register' %}</a><br> + {% endif %} {% endblock %} diff --git a/gstudio/templates/gstudioforms/gstudiorelationform.html b/gstudio/templates/gstudioforms/gstudiorelationform.html index b87d6a0a..79c5ba78 100644 --- a/gstudio/templates/gstudioforms/gstudiorelationform.html +++ b/gstudio/templates/gstudioforms/gstudiorelationform.html @@ -3,6 +3,7 @@ {% block content %} <form method="post" action="."> +{% if user.is_authenticated %} {% csrf_token %} <h2>Form to add Relations</h2> {% for field in formset %} @@ -17,5 +18,10 @@ <input type="Submit" value="{% trans 'ADD' %}" /> <input type="hidden" name="next" value="{{ next }}" /> </form> + {% else %} + <h2>Sorry either you are not logged in or dont have permission to view this content</h2> + <a href="{{get_absoulute_url}}/accounts/login">{% trans 'Login' %}</a><br> + <a href="{{get_absoulute_url}}/accounts/register">{% trans 'Register' %}</a><br> + {% endif %} {% endblock %} diff --git a/gstudio/templates/gstudioforms/gstudiorelationtypeform.html b/gstudio/templates/gstudioforms/gstudiorelationtypeform.html index 947e0e05..48531b92 100644 --- a/gstudio/templates/gstudioforms/gstudiorelationtypeform.html +++ b/gstudio/templates/gstudioforms/gstudiorelationtypeform.html @@ -3,6 +3,8 @@ {% block content %} <form method="post" action="."> +{% if user.is_authenticated %} + {% csrf_token %} <h2>Form to add Relationtypes</h2> {% for field in formset %} @@ -16,5 +18,11 @@ <input type="Submit" value="{% trans 'ADD' %}" /> <input type="hidden" name="next" value="{{ next }}" /> </form> + {% else %} + <h2>Sorry either you are not logged in or dont have permission to view this content</h2> + <a href="{{get_absoulute_url}}/accounts/login">{% trans 'Login' %}</a><br> + <a href="{{get_absoulute_url}}/accounts/register">{% trans 'Register' %}</a><br> + {% endif %} + {% endblock %} diff --git a/gstudio/templates/gstudioforms/gstudiosystemtypeform.html b/gstudio/templates/gstudioforms/gstudiosystemtypeform.html index c2238f19..780a38e3 100644 --- a/gstudio/templates/gstudioforms/gstudiosystemtypeform.html +++ b/gstudio/templates/gstudioforms/gstudiosystemtypeform.html @@ -3,6 +3,7 @@ {% block content %} <form method="post" action="."> +{% if user.is_authenticated %} {% csrf_token %} <h2>Form to add Systemtypes</h2> {% for field in formset %} @@ -17,5 +18,11 @@ <input type="Submit" value="{% trans 'ADD' %}" /> <input type="hidden" name="next" value="{{ next }}" /> </form> + {% else %} + <h2>Sorry either you are not logged in or dont have permission to view this content</h2> + <a href="{{get_absoulute_url}}/accounts/login">{% trans 'Login' %}</a><br> + <a href="{{get_absoulute_url}}/accounts/register">{% trans 'Register' %}</a><br> + {% endif %} + {% endblock %} diff --git a/gstudio/templates/gstudioforms/gstudiounionform.html b/gstudio/templates/gstudioforms/gstudiounionform.html index 7d7ec4d9..e9310132 100644 --- a/gstudio/templates/gstudioforms/gstudiounionform.html +++ b/gstudio/templates/gstudioforms/gstudiounionform.html @@ -3,6 +3,7 @@ {% block content %} <form method="post" action="."> +{% if user.is_authenticated %} {% csrf_token %} <h2>Form to add unions</h2> {% for field in formset %} @@ -17,5 +18,10 @@ <input type="Submit" value="{% trans 'ADD' %}" /> <input type="hidden" name="next" value="{{ next }}" /> </form> - + {% else %} + <h2>Sorry either you are not logged in or dont have permission to view this content</h2> + <a href="{{get_absoulute_url}}/accounts/login">{% trans 'Login' %}</a><br> + <a href="{{get_absoulute_url}}/accounts/register">{% trans 'Register' %}</a><br> + {% endif %} +x {% endblock %} |