Printing: generate a Grantlee statistics template

As there are two types of templates, Grantlee need to support both.

This commit adds the support to generating a statistics HTML code from
a statistics template.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
This commit is contained in:
Gehad elrobey 2015-08-21 19:03:42 +02:00 committed by Lubomir I. Ivanov
parent 70e8862efc
commit b0e84e7e2b
2 changed files with 49 additions and 2 deletions

View file

@ -10,7 +10,7 @@
int getTotalWork(print_options *printOptions);
void find_all_templates();
extern QList<QString> grantlee_templates;
extern QList<QString> grantlee_templates, grantlee_statistics_templates;
class TemplateLayout : public QObject {
Q_OBJECT
@ -18,6 +18,7 @@ public:
TemplateLayout(print_options *PrintOptions, template_options *templateOptions);
~TemplateLayout();
QString generate();
QString generateStatistics();
static QString readTemplate(QString template_name);
static void writeTemplate(QString template_name, QString grantlee_template);
@ -198,7 +199,6 @@ if (property == "grayscale") {
GRANTLEE_END_LOOKUP
GRANTLEE_BEGIN_LOOKUP(YearInfo)
if (property == "year") {
return object.year->period;
} else if (property == "dives") {