added: generic html template: index_generic.html
(config option: templates_index_generic) this is a generic template without additional site-css (only uikit), at the moment used only in ckeditor file browser added: to Request class: index_template (std::wstring) - a name of an index html template
This commit is contained in:
@@ -51,6 +51,9 @@ Cat::Cat()
|
||||
|
||||
void Cat::MakeGet()
|
||||
{
|
||||
// IMPROVE ME this probably should be set for all winix functions
|
||||
cur->request->html_template = cur->request->last_item->html_template;
|
||||
|
||||
if( !cur->request->is_item )
|
||||
{
|
||||
log << log1 << "Content: cat function requires an item" << logend;
|
||||
|
||||
@@ -56,7 +56,7 @@ void Ls::MakeGet()
|
||||
// this should be moved to ckeditor function (similarly the html content from fun_ls.html)
|
||||
if( cur->request->IsParam(L"ckeditor_browse") )
|
||||
{
|
||||
cur->request->index_template = config->templates_index_generic;
|
||||
cur->request->html_template = config->templates_index_generic;
|
||||
}
|
||||
|
||||
if( !cur->request->is_item )
|
||||
|
||||
@@ -60,6 +60,9 @@ void Run::MakePost()
|
||||
|
||||
void Run::MakeGet()
|
||||
{
|
||||
// IMPROVE ME this probably should be set for all winix functions
|
||||
cur->request->html_template = cur->request->last_item->html_template;
|
||||
|
||||
if( !cur->request->is_item )
|
||||
{
|
||||
log << log1 << "Content: Run function requires an item" << logend;
|
||||
|
||||
@@ -97,12 +97,17 @@ void Template::CreateTemplateFileName(const std::wstring & index_str)
|
||||
}
|
||||
else
|
||||
if( index == 1 )
|
||||
{
|
||||
html_template = config->templates_index_generic;
|
||||
}
|
||||
else
|
||||
if( index == 2 )
|
||||
{
|
||||
html_template = config->templates_index_raw;
|
||||
}
|
||||
else
|
||||
{
|
||||
index -= 2;
|
||||
index -= 3;
|
||||
Mount::ParamRow & par = system->mounts.pmount->param[system->mounts.MountParHtmlTemplate()];
|
||||
|
||||
if( !par.defined || (size_t)index >= par.arg.size() )
|
||||
|
||||
Reference in New Issue
Block a user