added controller to render markdown documentation #129
This commit is contained in:
@@ -41,13 +41,6 @@
|
||||
|
||||
{% block avanzu_footer %}
|
||||
{% block footer %}
|
||||
<footer class="main-footer no-print">
|
||||
<div class="pull-right hidden-xs">
|
||||
<b>Version</b> 2.0 dev
|
||||
</div>
|
||||
Made with ♥ by <a href="http://www.kevinpapst.de">Kevin Papst</a>.
|
||||
{{ 'footer.license'|trans }}
|
||||
</footer>
|
||||
<!-- Page rendered on {{ 'now'|localizeddate('long', 'long', null, 'UTC') }} -->
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
26
templates/help/index.html.twig
Normal file
26
templates/help/index.html.twig
Normal file
@@ -0,0 +1,26 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block page_title %}{{ 'help.title'|trans }}{% endblock %}
|
||||
{% block page_subtitle %}{{ 'help.subtitle'|trans }}{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
|
||||
{% set replacer = {
|
||||
'.md"': '"',
|
||||
'<table>': '<table class="table">',
|
||||
'href="../../': 'target="_blank" href="'~github~'blob/master/',
|
||||
('href="' ~ github): 'target="_blank" href="'~github
|
||||
} %}
|
||||
|
||||
<div class="box">
|
||||
{% if chapter != 'README' %}
|
||||
<div class="box-header with-border">
|
||||
<a href="{{ path('help') }}">{{ 'action.back'|trans }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="box-body">
|
||||
{{ documentation|md2html|replace(replacer)|raw }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,11 +1,24 @@
|
||||
<h3 class="control-sidebar-heading">{{ 'home.title'|trans({}, 'sidebar') }}</h3>
|
||||
<div class="form-group">
|
||||
{{ 'home.betainfo'|trans({}, 'sidebar')|raw|nl2br }}
|
||||
<ul class="control-sidebar-menu">
|
||||
<li>
|
||||
<a href="https://github.com/kevinpapst/kimai2/" target="_blank">{{ 'home.link.issues'|trans({}, 'sidebar') }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<h3 class="control-sidebar-heading">{{ 'help.title'|trans({}, 'sidebar') }}</h3>
|
||||
<div class="form-group">
|
||||
<a href="{{ path('help') }}" class="btn btn-success">{{ 'help.link'|trans({}, 'sidebar') }}</a>
|
||||
</div>
|
||||
|
||||
<h3 class="control-sidebar-heading">{{ 'about.title'|trans({}, 'sidebar') }}</h3>
|
||||
<div class="form-group">
|
||||
<p>
|
||||
Kimai {{ constant('App\\Constants::VERSION') }}
|
||||
</p>
|
||||
<p>
|
||||
{{ 'made.by.license'|trans({'%kevin%': '<a href="http://www.kevinpapst.de" target="_blank">Kevin Papst</a>', '%simon%': '<a href="https://github.com/simonschaufi" target="_blank">Simon Schaufelberger</a>'}, 'sidebar')|raw }}
|
||||
</p>
|
||||
<p>
|
||||
{{ 'github.link'|trans({'%url%': constant('App\\Constants::GITHUB')}, 'sidebar')|raw }}
|
||||
</p>
|
||||
</div>
|
||||
{#
|
||||
<ul class="control-sidebar-menu">
|
||||
|
||||
Reference in New Issue
Block a user