added: a new index template: index_fullscreen.html
is chosen automatically when 'fullscreen' parameter is passed git-svn-id: svn://ttmath.org/publicrep/winix/trunk@776 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
parent
7902389ef1
commit
024ce8e73c
|
@ -26,6 +26,7 @@
|
|||
[if mount_type_is "thread"]<p class="withnext">{form_emacs_content_thread}</p>[end]
|
||||
[if mount_type_is "ticket"]<p class="withnext">{form_emacs_content_ticket}</p>[end]
|
||||
|
||||
[# template fun_ls.html uses the name: itemcontent to refer to this textarea item]
|
||||
<textarea class="multitext" rows="[if mount_type_is "cms"]30[else]10[end]" cols="60" name="itemcontent">[item_content]</textarea>
|
||||
|
||||
<input type="hidden" name="contenttype" value="2">
|
||||
|
|
|
@ -3,18 +3,48 @@
|
|||
[if winix_function_param_is "ckeditor_browse"]
|
||||
<script type="text/javascript">function select(link) \{ window.opener.CKEDITOR.tools.callFunction([ls_ckeditor_funnum_browse], link); window.close(); \} </script>
|
||||
|
||||
<div id="winix_ls_browse_leftcolumn">
|
||||
|
||||
[if-any item_tab]
|
||||
<ul class="ls_browse">
|
||||
|
||||
[for item_tab]
|
||||
<li><a href="javascript:select('[item_tab_link]')"><img src="[item_tab_link]/-/thumb" alt="[item_tab_subject]" height="120"></a></li>
|
||||
[if dir_childs_tab "with_parent"]
|
||||
<h2>[for dir_tab]<a href="[dir_tab_link]ls/ckeditor_browse/fullscreen/CKEditor:itemcontent/CKEditorFuncNum:[ls_ckeditor_funnum_browse]">[dir_tab_url]/</a>[end]</h2>
|
||||
|
||||
<ul>
|
||||
[for dir_childs_tab "with_parent"]
|
||||
<li>
|
||||
[if dir_childs_is_parent]
|
||||
[# make sure the name of the textarea in fun_ckeditor.html is called: itemcontent]
|
||||
[# is it needed?]
|
||||
<a href="[doc_base_url][dir_parent]ls/ckeditor_browse/fullscreen/CKEditor:itemcontent/CKEditorFuncNum:[ls_ckeditor_funnum_browse]">../</a>
|
||||
[else]
|
||||
<a href="[doc_base_url][dir][dir_childs_tab_url]/ls/ckeditor_browse/fullscreen/CKEditor:itemcontent/CKEditorFuncNum:[ls_ckeditor_funnum_browse]">[dir_childs_tab_url]/</a>
|
||||
[end]
|
||||
</li>
|
||||
[end]
|
||||
</ul>
|
||||
[end]
|
||||
|
||||
</ul>
|
||||
[end]
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="winix_ls_browse_rightcolumn">
|
||||
|
||||
|
||||
|
||||
[if-any item_tab]
|
||||
|
||||
<h2>{ls_pictures_in_dir} [dir]</h2>
|
||||
<ul>
|
||||
|
||||
[for item_tab]
|
||||
<li><a href="javascript:select('[item_tab_link]')"><img src="[item_tab_link]/-/thumb" alt="[item_tab_subject]" height="120"></a></li>
|
||||
[end]
|
||||
|
||||
</ul>
|
||||
[else]
|
||||
<h2>{ls_no_picture}</h2>
|
||||
[end]
|
||||
|
||||
</div>
|
||||
|
||||
[else]
|
||||
|
||||
<h1>{ls_header}</h1>
|
||||
|
@ -24,6 +54,7 @@
|
|||
[if winix_function_param_is "l"]
|
||||
|
||||
[# loading dir childs table with a parent directory]
|
||||
[# now the parameter can be passed directly to if-one]
|
||||
[dir_childs_tab "with_parent"]
|
||||
|
||||
[if-one dir_childs_tab item_tab]
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
|
||||
[include "index_head.html"]
|
||||
|
||||
|
||||
[# now we don't need the check of fullscreen here]
|
||||
[# we've got a second template for fullscreen -- index_fullscreen.html]
|
||||
[if-no winix_function_param_is "fullscreen"]
|
||||
|
||||
<body>
|
||||
|
@ -44,6 +45,6 @@
|
|||
</div> <!-- winix_containerfull -->
|
||||
</body>
|
||||
|
||||
[end] [# is-no winix_function_param_is "fullscreen"]
|
||||
[end] [# if-no winix_function_param_is "fullscreen"]
|
||||
|
||||
</html>
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
|
||||
<html lang="{language}">
|
||||
|
||||
<head>
|
||||
|
||||
<title>[doc_title]</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset={charset}">
|
||||
|
||||
[if doc_css_tab]
|
||||
[for doc_css_tab]
|
||||
<link rel="stylesheet" href="[if-no doc_css_tab_file_is_global][doc_base_url_static][end][doc_css_tab_file]" type="text/css">
|
||||
[end]
|
||||
[else]
|
||||
<link rel="stylesheet" href="[doc_base_url_static]/winix/winix.css" type="text/css">
|
||||
[end]
|
||||
|
||||
[include "index_head_functions_add.html"]
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="winix_containerfull">
|
||||
[include "slog.html"]
|
||||
[content]
|
||||
</div> <!-- winix_containerfull -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -121,6 +121,9 @@ last_none = There is no anything information.
|
|||
|
||||
|
||||
ls_header = Directory listing
|
||||
ls_pictures_in_dir = Pictures in directory
|
||||
ls_no_picture = There are not any pictures in this directory
|
||||
|
||||
|
||||
meta_header = Meta
|
||||
form_meta_legend = Form for changing meta info
|
||||
|
|
|
@ -120,6 +120,9 @@ last_none = Nie ma dostępnych żadnych informacji.
|
|||
|
||||
|
||||
ls_header = Zawartość katalogu
|
||||
ls_pictures_in_dir = Obrazy w katalogu
|
||||
ls_no_picture = W tym katalogu nie ma żadnego obrazu
|
||||
|
||||
|
||||
meta_header = Meta
|
||||
form_meta_legend = Formularz zmiany meta informacji
|
||||
|
|
|
@ -403,11 +403,56 @@ float: right;
|
|||
}
|
||||
|
||||
|
||||
ul.ls_browse li {
|
||||
|
||||
div#winix_ls_browse_leftcolumn {
|
||||
float: left;
|
||||
width: 30%;
|
||||
margin: 0 2em 1em 1em;
|
||||
}
|
||||
|
||||
div#winix_ls_browse_leftcolumn li {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style-type: none;
|
||||
list-style-image: none;
|
||||
background: none;
|
||||
}
|
||||
|
||||
div#winix_ls_browse_leftcolumn a {
|
||||
text-decoration: none;
|
||||
outline-style: none;
|
||||
}
|
||||
|
||||
div#winix_ls_browse_leftcolumn a:hover, div#winix_ls_browse_leftcolumn a:focus {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
div#winix_ls_browse_rightcolumn {
|
||||
float: left;
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
div#winix_ls_browse_rightcolumn li {
|
||||
display: block;
|
||||
float: left;
|
||||
margin: 10px;
|
||||
margin: 0 1em 1em 0;
|
||||
padding: 0;
|
||||
list-style-type: none;
|
||||
list-style-image: none;
|
||||
background: none;
|
||||
}
|
||||
|
||||
div#winix_ls_browse_rightcolumn li a img {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
div#winix_ls_browse_rightcolumn li a:focus {
|
||||
outline-style: none;
|
||||
}
|
||||
|
||||
div#winix_ls_browse_rightcolumn li a:hover img, div#winix_ls_browse_rightcolumn li a:focus img {
|
||||
border: 1px solid black;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -742,13 +742,58 @@ float: right;
|
|||
}
|
||||
|
||||
|
||||
ul.ls_browse li {
|
||||
div#winix_ls_browse_leftcolumn {
|
||||
float: left;
|
||||
width: 30%;
|
||||
margin: 0 2em 1em 1em;
|
||||
}
|
||||
|
||||
div#winix_ls_browse_leftcolumn li {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style-type: none;
|
||||
list-style-image: none;
|
||||
background: none;
|
||||
}
|
||||
|
||||
div#winix_ls_browse_leftcolumn a {
|
||||
text-decoration: none;
|
||||
outline-style: none;
|
||||
}
|
||||
|
||||
div#winix_ls_browse_leftcolumn a:hover, div#winix_ls_browse_leftcolumn a:focus {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
div#winix_ls_browse_rightcolumn {
|
||||
float: left;
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
div#winix_ls_browse_rightcolumn li {
|
||||
display: block;
|
||||
float: left;
|
||||
margin: 10px;
|
||||
margin: 0 1em 1em 0;
|
||||
padding: 0;
|
||||
list-style-type: none;
|
||||
list-style-image: none;
|
||||
background: none;
|
||||
}
|
||||
|
||||
div#winix_ls_browse_rightcolumn li a img {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
div#winix_ls_browse_rightcolumn li a:focus {
|
||||
outline-style: none;
|
||||
}
|
||||
|
||||
div#winix_ls_browse_rightcolumn li a:hover img, div#winix_ls_browse_rightcolumn li a:focus img {
|
||||
border: 1px solid black;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
strong {
|
||||
font-weight: bold;
|
||||
|
|
|
@ -18,13 +18,14 @@
|
|||
namespace TemplatesFunctions
|
||||
{
|
||||
|
||||
size_t pat_index;
|
||||
size_t pat_err_404;
|
||||
size_t pat_err_per_denied;
|
||||
size_t pat_index; // main index pattern
|
||||
size_t pat_index_fullscreen; // an empty pattern (without menus etc., used for ckeditor images browser)
|
||||
size_t pat_err_404; // 404 error
|
||||
size_t pat_err_per_denied; // permission denied error
|
||||
|
||||
Patterns patterns; // all html patterns
|
||||
IndexPatterns index_patterns; // patterns for main index template (those from mountpoint)
|
||||
// index_atterns uses patterns as a storage
|
||||
// index_patterns uses patterns as a storage
|
||||
ChangePatterns change_patterns; // patterns for change_template mount option (storage is in 'patterns' too)
|
||||
PatternCacher pattern_cacher; // patterns for user items (files with an executable bit set)
|
||||
|
||||
|
@ -690,9 +691,10 @@ using namespace TemplatesFunctions;
|
|||
index_patterns.Clear();
|
||||
change_patterns.Clear();
|
||||
|
||||
pat_index = patterns.Add(config->templates_index);
|
||||
pat_err_404 = patterns.Add(L"err_404.html");
|
||||
pat_err_per_denied = patterns.Add(L"err_per_denied.html");
|
||||
pat_index = patterns.Add(config->templates_index);
|
||||
pat_index_fullscreen = patterns.Add(L"index_fullscreen.html");
|
||||
pat_err_404 = patterns.Add(L"err_404.html");
|
||||
pat_err_per_denied = patterns.Add(L"err_per_denied.html");
|
||||
|
||||
ReadTemplatesForFunctions();
|
||||
ReadIndexTemplates();
|
||||
|
@ -744,20 +746,27 @@ using namespace TemplatesFunctions;
|
|||
Ezc::Pattern * index = 0;
|
||||
const std::wstring * index_file_local = 0;
|
||||
|
||||
if( !cur->request->last_item->html_template.empty() )
|
||||
index_file_local = &cur->request->last_item->html_template;
|
||||
|
||||
if( !index_file_local )
|
||||
if( cur->request->IsParam(L"fullscreen") )
|
||||
{
|
||||
Mounts & mounts = TemplatesFunctions::system->mounts;
|
||||
const std::wstring & temp = cur->mount->FirstArg(mounts.MountParHtmlTemplate());
|
||||
|
||||
if( !temp.empty() )
|
||||
index_file_local = &temp;
|
||||
index = patterns.Get(pat_index_fullscreen, locale.GetLang());
|
||||
}
|
||||
else
|
||||
{
|
||||
if( !cur->request->last_item->html_template.empty() )
|
||||
index_file_local = &cur->request->last_item->html_template;
|
||||
|
||||
if( index_file_local && *index_file_local != config->templates_index )
|
||||
index = index_patterns.Get(*index_file_local, locale.GetLang());
|
||||
if( !index_file_local )
|
||||
{
|
||||
Mounts & mounts = TemplatesFunctions::system->mounts;
|
||||
const std::wstring & temp = cur->mount->FirstArg(mounts.MountParHtmlTemplate());
|
||||
|
||||
if( !temp.empty() )
|
||||
index_file_local = &temp;
|
||||
}
|
||||
|
||||
if( index_file_local && *index_file_local != config->templates_index )
|
||||
index = index_patterns.Get(*index_file_local, locale.GetLang());
|
||||
}
|
||||
|
||||
if( !index )
|
||||
index = change_patterns.Get(cur->mount->dir_id, config->templates_index, locale.GetLang());
|
||||
|
|
Loading…
Reference in New Issue