Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
configurable tutorial link included in base.html
  • Loading branch information
proost committed Dec 5, 2017
1 parent 08d5a08 commit 60b279b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions conekt/app.py
Expand Up @@ -352,6 +352,7 @@ def configure_hooks(app):
LOGIN_ENABLED = app.config['LOGIN_ENABLED']
BLAST_ENABLED = app.config['BLAST_ENABLED']
TWITTER_HANDLE = app.config['TWITTER_HANDLE'] if 'TWITTER_HANDLE' in app.config.keys() else None
TUTORIAL_URL = app.config['TUTORIAL_URL'] if 'TUTORIAL_URL' in app.config.keys() else None
IMPRINT = app.config['IMPRINT_URL'] if 'IMPRINT_URL' in app.config.keys() else None
PRIVACY = app.config['PRIVACY_POLICY_URL'] if 'PRIVACY_POLICY_URL' in app.config.keys() else None

Expand All @@ -364,6 +365,8 @@ def before_request():
g.imprint = IMPRINT
g.privacy = PRIVACY

g.tutorial = TUTORIAL_URL

g.page_items = 30

g.debug = app.config['DEBUG'] if 'DEBUG' in app.config else False
Expand Down
5 changes: 3 additions & 2 deletions conekt/templates/base.html
Expand Up @@ -94,8 +94,9 @@
<li>
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Help <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">Tutorial <span class="text-muted">(Coming soon)</span></a></li>
<li><a href="#">FAQ <span class="text-muted">(Coming soon)</span></a></li>
{% if g.tutorial %}
<li><a href="{{ g.tutorial }}">Tutorial <span class="text-muted"></span></a></li>
{% endif %}
<li><a href="{{ url_for('main.contact') }}">Contact</a></li>
</li>
</ul>
Expand Down
3 changes: 3 additions & 0 deletions config.template.py
Expand Up @@ -78,6 +78,9 @@
GLOB_MSG = None
GLOB_MSG_TITLE = 'Info'

# Tutorial URL
TUTORIAL_URL = "https://github.molgen.mpg.de/proost/CoNekT/blob/master/docs/tutorials/overview.md"

# Customize link to Imprint and Privacy Policy(legal requirement in Germany)
IMPRINT_URL = None
PRIVACY_POLICY_URL = None

0 comments on commit 60b279b

Please sign in to comment.