Skip to content
Snippets Groups Projects
Commit 920c7fd6 authored by Jan Mach's avatar Jan Mach
Browse files

It works again - sort of

Refactoring to at least get working home page.

(Redmine issue: #7544)
parent 8efed232
No related branches found
No related tags found
No related merge requests found
Showing
with 30 additions and 30 deletions
......@@ -81,7 +81,7 @@ from flask_babel import gettext, lazy_gettext
import hawat.const
import hawat.forms
import hawat.db
from hawat.app import HawatBlueprint
from hawat.base import HawatBlueprint
from hawat.view import BaseLoginView, BaseRegisterView
from hawat.view.mixin import HTMLMixin, SQLAlchemyMixin
......
{{ _('Dear administrator,') | wordwrap }}
{{ _('a new account "%(item_id)s" was just registered in %(app_name)s. Please review the following request and activate or delete the account:', item_id = account.login, app_name = vial_appname) | wordwrap }}
{{ _('a new account "%(item_id)s" was just registered in %(app_name)s. Please review the following request and activate or delete the account:', item_id = account.login, app_name = hawat_appname) | wordwrap }}
{{ '{:16s}'.format(_('Login:')) }} {{ account.login }}
{{ '{:16s}'.format(_('Full name:')) }} {{ account.fullname }}
......@@ -24,4 +24,4 @@
{{ _('Have a nice day') | wordwrap }}
-- {{ vial_appname }}
-- {{ hawat_appname }}
{{ _('Dear group manager,') | wordwrap }}
{{ _('a new account "%(item_id)s" was just registered in %(app_name)s and user requested membership in your group "%(group_id)s". Please review the following information and approve or reject the request:', item_id = account.login, app_name = vial_appname, group_id = group.name) | wordwrap }}
{{ _('a new account "%(item_id)s" was just registered in %(app_name)s and user requested membership in your group "%(group_id)s". Please review the following information and approve or reject the request:', item_id = account.login, app_name = hawat_appname, group_id = group.name) | wordwrap }}
{{ '{:16s}'.format(_('Login:')) }} {{ account.login }}
{{ '{:16s}'.format(_('Full name:')) }} {{ account.fullname }}
......@@ -17,4 +17,4 @@
{{ _('Have a nice day') | wordwrap }}
-- {{ vial_appname }}
-- {{ hawat_appname }}
{{ _('Dear user,') | wordwrap }}
{{ _('this email is a confirmation, that you have successfully registered your new user account "%(item_id)s" in %(app_name)s.', item_id = account.login, app_name = vial_appname) | wordwrap }}
{{ _('this email is a confirmation, that you have successfully registered your new user account "%(item_id)s" in %(app_name)s.', item_id = account.login, app_name = hawat_appname) | wordwrap }}
{{ _('During the registration process you have provided following information:') | wordwrap }}
......@@ -28,4 +28,4 @@
{{ _('Have a nice day') | wordwrap }}
-- {{ vial_appname }}
-- {{ hawat_appname }}
......@@ -33,7 +33,7 @@ from flask_babel import lazy_gettext
import hawat.const
import hawat.forms
from hawat.app import HawatBlueprint
from hawat.base import HawatBlueprint
from hawat.view import BaseLoginView, BaseRegisterView
from hawat.view.mixin import HTMLMixin, SQLAlchemyMixin
......
{{ _('Dear administrator,') | wordwrap }}
{{ _('a new account "%(item_id)s" was just registered in %(app_name)s. Please review the following request and activate or delete the account:', item_id = account.login, app_name = vial_appname) | wordwrap }}
{{ _('a new account "%(item_id)s" was just registered in %(app_name)s. Please review the following request and activate or delete the account:', item_id = account.login, app_name = hawat_appname) | wordwrap }}
{{ '{:16s}'.format(_('Login:')) }} {{ account.login }}
{{ '{:16s}'.format(_('Full name:')) }} {{ account.fullname }}
......@@ -24,4 +24,4 @@
{{ _('Have a nice day') | wordwrap }}
-- {{ vial_appname }}
-- {{ hawat_appname }}
{{ _('Dear group manager,') | wordwrap }}
{{ _('a new account "%(item_id)s" was just registered in %(app_name)s and user requested membership in your group "%(group_id)s". Please review the following information and approve or reject the request:', item_id = account.login, app_name = vial_appname, group_id = group.name) | wordwrap }}
{{ _('a new account "%(item_id)s" was just registered in %(app_name)s and user requested membership in your group "%(group_id)s". Please review the following information and approve or reject the request:', item_id = account.login, app_name = hawat_appname, group_id = group.name) | wordwrap }}
{{ '{:16s}'.format(_('Login:')) }} {{ account.login }}
{{ '{:16s}'.format(_('Full name:')) }} {{ account.fullname }}
......@@ -17,4 +17,4 @@
{{ _('Have a nice day') | wordwrap }}
-- {{ vial_appname }}
-- {{ hawat_appname }}
{{ _('Dear user,') | wordwrap }}
{{ _('this email is a confirmation, that you have successfully registered your new user account "%(item_id)s" in %(app_name)s.', item_id = account.login, app_name = vial_appname) | wordwrap }}
{{ _('this email is a confirmation, that you have successfully registered your new user account "%(item_id)s" in %(app_name)s.', item_id = account.login, app_name = hawat_appname) | wordwrap }}
{{ _('During the registration process you have provided following information:') | wordwrap }}
......@@ -28,4 +28,4 @@
{{ _('Have a nice day') | wordwrap }}
-- {{ vial_appname }}
-- {{ hawat_appname }}
......@@ -14,7 +14,7 @@ import flask
from flask_babel import lazy_gettext
import hawat.acl
from hawat.app import HawatBlueprint
from hawat.base import HawatBlueprint
from hawat.view import BaseSearchView, ItemShowView
from hawat.view.mixin import HTMLMixin, SQLAlchemyMixin
from hawat.blueprints.changelogs.forms import ItemChangeLogSearchForm
......
......@@ -31,6 +31,6 @@
{%- block contentsearchresult %}
{{ macros_page.render_changelog_records(items, vial_current_view.get_context_action_menu()) }}
{{ macros_page.render_changelog_records(items, hawat_current_view.get_context_action_menu()) }}
{%- endblock contentsearchresult %}
......@@ -6,7 +6,7 @@
<div class="col-lg-12">
{{ macros_page.render_breadcrumbs(item) }}
<h2>{{ vial_current_view.get_view_title() }}</h2>
<h2>{{ hawat_current_view.get_view_title() }}</h2>
<hr>
<h3>{{ item.__str__() }}</h3>
<br>
......
......@@ -68,7 +68,7 @@ from mentat.datatype.sqldb import UserModel, GroupModel, FilterModel, SettingsRe
import hawat.menu
import hawat.acl
from hawat.app import HawatBlueprint
from hawat.base import HawatBlueprint
from hawat.view import RenderableView, SimpleView
from hawat.view.mixin import HTMLMixin, AJAXMixin, SQLAlchemyMixin
from hawat.forms import ItemActionConfirmForm
......
......@@ -6,9 +6,9 @@
<div class="col-lg-12">
<ol class="breadcrumb">
<li><a href="{{ url_for('home.index') }}">{{ _('Home') }}</a></li>
<li class="active">{{ vial_current_view.get_menu_title() }}</li>
<li class="active">{{ hawat_current_view.get_menu_title() }}</li>
</ol>
<h2>{{ vial_current_view.get_view_title() }}</h2>
<h2>{{ hawat_current_view.get_view_title() }}</h2>
<hr>
</div> <!-- /.col-lg-12 -->
......
......@@ -8,7 +8,7 @@
<li><a href="{{ url_for('home.index') }}">{{ _('Home') }}</a></li>
<li class="active">{{ _('Database status') }}</li>
</ol>
<h2>{{ vial_current_view.get_view_title() }}</h2>
<h2>{{ hawat_current_view.get_view_title() }}</h2>
<hr>
</div> <!-- /.col-lg-12 -->
......
......@@ -34,7 +34,7 @@ Module content
from flask_babel import lazy_gettext
from hawat.app import HawatBlueprint
from hawat.base import HawatBlueprint
#
......
......@@ -184,7 +184,7 @@
----------------------------------------------------------------------->
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">
<title>{% block title %}{{ vial_current_view.get_view_title() }}{% endblock %} - Mentat</title>
<title>{% block title %}{{ hawat_current_view.get_view_title() }}{% endblock %} - Mentat</title>
{%- endblock head %}
</head>
......@@ -216,7 +216,7 @@
</button>
<a class="navbar-brand" href="{{ url_for(config['ENDPOINT_HOME']) }}">
<img src="{{ url_for('static', filename='images/app-logo-mini.png') }}" class="mentat-logo-mini" alt="Mentat logo">
{{ vial_appname }}
{{ hawat_appname }}
</a>
</div> <!-- #navbar-header -->
<div id="navbar" class="navbar-collapse collapse">
......@@ -224,7 +224,7 @@
<ul class="nav navbar-nav navbar-right">
{{ macros_site.render_submenu_auth() }}
{{ macros_site.render_locale_switcher() }}
{%- if vial_current_view.has_help %}
{%- if hawat_current_view.has_help %}
<li>
{{ macros_page.render_help_link(icon = 'help', text = '') }}
</li>
......@@ -266,7 +266,7 @@
<span data-toggle="tooltip" title="{{ _('Page generated in: ') }}">{{ get_icon('stopwatch') }}</span><span class="hidden-sm"> <em>{{ _('Page generated in: ') }}</em></span> {{ get_timedelta(g.requeststart) }}
<br>
<span data-toggle="tooltip" title="{{ hawat_bversion_full }}">
{{ vial_appname }} {{ hawat_version }}
{{ hawat_appname }} {{ hawat_version }}
</span> &#124;
&copy; {{ _('since') }} 2011 &#124;
<a data-toggle="tooltip" title="Go to official web page of CESNET-CERTS, the CSIRT for CESNET2 network" href="http://csirt.cesnet.cz">
......
......@@ -11,7 +11,7 @@
<div class="modal-header">
<h4 class="modal-title">
{{ get_icon('modal-question') }} {{ vial_current_view.get_view_title() }}
{{ get_icon('modal-question') }} {{ hawat_current_view.get_view_title() }}
</h4>
</div>
......
......@@ -19,7 +19,7 @@
<form method="POST" action="{{ form_url }}" id="form-{{ item_type }}-{{ item_action }}">
<fieldset>
<legend>{{ vial_current_view.get_view_title() }}</legend>
<legend>{{ hawat_current_view.get_view_title() }}</legend>
{%- block itemform_fields %}{% endblock itemform_fields %}
......
......@@ -8,7 +8,7 @@
<!-- Search form - BEGIN ---------------------------------->
<div class="jumbotron" style="margin-top: 1em;">
<h2>{{ vial_current_view.get_view_title() }}</h2>
<h2>{{ hawat_current_view.get_view_title() }}</h2>
<hr>
<form method="GET" class="form-horizontal" id="form-events-simple" action="{{ url_for(request.endpoint) }}">
<div>
......
......@@ -7,7 +7,7 @@
{{ macros_page.render_breadcrumbs() }}
<h2>{{ vial_current_view.get_view_title() }}</h2>
<h2>{{ hawat_current_view.get_view_title() }}</h2>
<div class="pull-right">
{{ macros_page.render_menu_actions() }}
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment