mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
added help page linking
This commit is contained in:
@@ -95,7 +95,7 @@
|
|||||||
class="fas fa-edit fa-fw"></i> {% trans 'Batch Edit' %}</a>
|
class="fas fa-edit fa-fw"></i> {% trans 'Batch Edit' %}</a>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item dropdown {% if request.resolver_match.url_name in 'list_storage,data_sync,list_recipe_import,list_sync_log,data_stats,edit_food' %}active{% endif %}">
|
<li class="nav-item dropdown {% if request.resolver_match.url_name in 'list_storage,data_sync,list_recipe_import,list_sync_log,data_stats,edit_food,edit_storage' %}active{% endif %}">
|
||||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown"
|
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown"
|
||||||
aria-haspopup="true" aria-expanded="false"><i class="fas fa-database"></i> {% trans 'Storage Data' %}
|
aria-haspopup="true" aria-expanded="false"><i class="fas fa-database"></i> {% trans 'Storage Data' %}
|
||||||
</a>
|
</a>
|
||||||
@@ -121,6 +121,9 @@
|
|||||||
|
|
||||||
<ul class="navbar-nav ml-auto">
|
<ul class="navbar-nav ml-auto">
|
||||||
{% if user.is_authenticated %}
|
{% if user.is_authenticated %}
|
||||||
|
{% page_help request.resolver_match.url_name as help_button %}
|
||||||
|
{% if help_button %}{{ help_button|safe }}{% endif %}
|
||||||
|
|
||||||
<li class="nav-item dropdown {% if request.resolver_match.url_name in 'view_settings,view_history,view_system,docs_markdown' %}active{% endif %}">
|
<li class="nav-item dropdown {% if request.resolver_match.url_name in 'view_settings,view_history,view_system,docs_markdown' %}active{% endif %}">
|
||||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown"
|
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown"
|
||||||
aria-haspopup="true" aria-expanded="false"><i
|
aria-haspopup="true" aria-expanded="false"><i
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ from django import template
|
|||||||
from django.db.models import Avg
|
from django.db.models import Avg
|
||||||
from django.urls import NoReverseMatch, reverse
|
from django.urls import NoReverseMatch, reverse
|
||||||
from recipes import settings
|
from recipes import settings
|
||||||
|
from gettext import gettext as _
|
||||||
|
|
||||||
register = template.Library()
|
register = template.Library()
|
||||||
|
|
||||||
@@ -80,6 +81,20 @@ def recipe_last(recipe, user):
|
|||||||
return ''
|
return ''
|
||||||
|
|
||||||
|
|
||||||
|
@register.simple_tag
|
||||||
|
def page_help(page_name):
|
||||||
|
help_pages = {
|
||||||
|
'edit_storage': 'https://vabene1111.github.io/recipes/features/external_recipes/',
|
||||||
|
}
|
||||||
|
|
||||||
|
link = help_pages.get(page_name, '')
|
||||||
|
|
||||||
|
if link != '':
|
||||||
|
return f'<li class="nav-item"><a class="nav-link" target="_blank" rel="nofollow noreferrer" href="{link}"><i class="far fa-question-circle"></i>‌<span class="d-lg-none"> {_("Help")}</span></a></li>'
|
||||||
|
else:
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
@register.simple_tag
|
@register.simple_tag
|
||||||
def message_of_the_day():
|
def message_of_the_day():
|
||||||
return Space.objects.first().message
|
return Space.objects.first().message
|
||||||
|
|||||||
@@ -15,6 +15,11 @@ Lastly you will need to sync with the external path and import recipes you desir
|
|||||||
!!! success
|
!!! success
|
||||||
Currently only Nextcloud and Dropbox are supported. There are plans to add more provider
|
Currently only Nextcloud and Dropbox are supported. There are plans to add more provider
|
||||||
|
|
||||||
|
!!! danger
|
||||||
|
In order for this application to retrieve data from external providers it needs to store authentication information.
|
||||||
|
Please use read only/separate accounts or app passwords wherever possible.
|
||||||
|
There are better ways to do this but they are currently not implemented
|
||||||
|
|
||||||
A `Storage Backend` is a remote storage location where files are **read** from.
|
A `Storage Backend` is a remote storage location where files are **read** from.
|
||||||
To add a new backend click on `Storage Data` and then on `Storage Backends`.
|
To add a new backend click on `Storage Data` and then on `Storage Backends`.
|
||||||
There click the plus button.
|
There click the plus button.
|
||||||
|
|||||||
Reference in New Issue
Block a user