Merge pull request 'uikit' (#3) from uikit into master

Reviewed-on: #3
This commit is contained in:
Tomasz Sowa 2021-02-16 19:52:36 +01:00
commit d861384889
74 changed files with 2012 additions and 1452 deletions

3
.gitignore vendored
View File

@ -1,3 +1,6 @@
.cproject
.project
.settings/
*.o
*.so
winixd/winix

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2008-2018, Tomasz Sowa
* Copyright (c) 2008-2021, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -186,6 +186,7 @@ void Config::AssignValues(bool stdout_is_closed)
templates_fun_prefix = Text(L"templates_fun_prefix", L"fun_");
templates_fun_postfix = Text(L"templates_fun_postfix", L".html");
templates_index = Text(L"templates_index", L"index.html");
templates_index_generic = Text(L"templates_index_generic", L"index_generic.html");
templates_index_raw = Text(L"templates_index_raw", L"index_raw.html");
template_only_root_use_template_fun = Bool(L"template_only_root_use_template_fun", false);

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2008-2018, Tomasz Sowa
* Copyright (c) 2008-2021, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -181,6 +181,10 @@ public:
// default: index.html
std::wstring templates_index;
// html template used to send generic content - without site-css styles and markup (only uikit)
// default: index_generic.html
std::wstring templates_index_generic;
// html template used to send raw content
// default: index_raw.html
std::wstring templates_index_raw;

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2008-2015, Tomasz Sowa
* Copyright (c) 2008-2021, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -153,6 +153,8 @@ void Request::Clear()
ip = 0;
ip_str.clear();
use_200_status_for_not_found_and_permission_denied = false;
html_template.clear();
}

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2008-2018, Tomasz Sowa
* Copyright (c) 2008-2021, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -339,6 +339,8 @@ struct Request
bool gen_use_special_chars;
// index template name
std::wstring html_template;
/*

View File

@ -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;

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2008-2018, Tomasz Sowa
* Copyright (c) 2008-2021, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -52,6 +52,13 @@ Ls::Ls()
void Ls::MakeGet()
{
// !! IMPROVE ME
// this should be moved to ckeditor function (similarly the html content from fun_ls.html)
if( cur->request->IsParam(L"ckeditor_browse") )
{
cur->request->html_template = config->templates_index_generic;
}
if( !cur->request->is_item )
{
DbItemQuery iq;

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2011-2018, Tomasz Sowa
* Copyright (c) 2011-2021, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -127,6 +127,8 @@ return false;
void Meta::ChangeAdminMeta()
{
// IMPROVE ME we need to show an error msg if the user is not an admin
if( cur->session->puser && cur->session->puser->super_user )
{
const std::wstring & meta_str = cur->request->PostVar(L"itemmeta");

View File

@ -584,12 +584,16 @@ bool Mv::MoveFileOrSymlink2(Item & src_file, const std::wstring & dst_path, bool
if( !ParseDir(dst_path, check_access) )
return false;
if( src_file.parent_id == out_dir_tab.back()->id )
if( out_has_file && src_file.parent_id == out_dir_tab.back()->id && src_file.url == out_item.url )
{
// actually out_filename is here empty
// because ParseDir() have been read it to out_item
if( out_filename.empty() || src_file.url == out_filename )
return true; // the same file -- there is nothing to do
return true; // the same file -- there is nothing to do
}
if( out_has_file )
{
log << log3 << "Mv: such file already exists (skipping)" << logend;
slog << logerror << T("mv_file_exists") << logend;
return false;
}
return MoveFileOrSymlink(src_file, out_dir_tab, out_filename);

View File

@ -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;

View File

@ -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() )

View File

@ -1,4 +1,4 @@
<p class="winix_iteminfo">
<p class="uk-text-meta">
{added_by}: [dir_last_user], [dir_last_date_creation_nice]
[if not dir_last_dates_equal]

View File

@ -1,20 +1,56 @@
<div class="winix">
<h1>Account</h1>
<h1>{account_header}</h1>
[if user_logged]
<p>You are logged as: [user_name]<br>
[if user_super_user]
You are the root
[end]
[# !! IMPROVE ME add info about groups, may other parameters like time zone, language?]
</p>
<table class="uk-table uk-table-divider uk-table-small uk-table-justify">
<tbody>
<tr>
<td class="uk-width-1-4">{account_logged_as}</td>
<td>[user_name]</td>
<td></td>
</tr>
[if user_super_user]
<tr>
<td>{account_admin}</td>
<td>{account_admin_yes}</td>
<td></td>
</tr>
[end]
[if false]
[# improve me]
<tr>
<td>{account_groups}</td>
<td>html, www, foo</td>
<td></td>
</tr>
[end]
<tr>
<td>{account_timezone}</td>
<td>[user_time_zone_name]</td>
<td>
<a href="[dir]timezone" class="uk-button uk-button-default uk-button-small">{change}</a>
</td>
</tr>
<tr>
<td>{account_language}</td>
<td>[user_locale_name]</td>
<td>
<a href="[dir]locale" class="uk-button uk-button-default uk-button-small">{change}</a>
</td>
</tr>
</tbody>
</table>
[else]
<p>You are not logged in.</p>
<p>{account_not_logged}</p>
[end]
</div>

View File

@ -2,39 +2,62 @@
<h1>[if user_logged]{adduser_header_add}[else]{adduser_header_register}[end]</h1>
<form id="additem" method="post" action="[doc_base_url][dir]adduser">
<fieldset>
<legend>{adduser_form_legend}</legend>
<p class="withnext">{adduser_login}:</p>
<input class="edit" type="text" name="login" value="[adduser_last_login]">
<p class="withnext">{adduser_password}:</p>
<input class="edit" type="password" name="password" value="">
<form class="uk-form-stacked" method="post" action="[doc_base_url][dir]adduser">
<p class="withnext">{adduser_confirm_password}:</p>
<input class="edit" type="password" name="passwordconfirm" value="">
<div class="uk-margin">
<label class="uk-form-label" for="winix_adduser_login">{adduser_login}</label>
[if winix_account_need_email_verification]
<p class="withnext">{adduser_need_email}<br>{adduser_need_email2}:</p>
[else]
<p class="withnext">{adduser_email}:</p>
[end]
<input class="edit" type="text" name="email" value="[adduser_last_email]">
<div class="uk-form-controls">
<input class="uk-input" id="winix_adduser_login" type="text" name="login" value="[adduser_last_login]">
</div>
</div>
<div class="uk-margin">
<label class="uk-form-label" for="winix_adduser_password">{adduser_password}</label>
<div class="uk-form-controls">
<input class="uk-input" id="winix_adduser_password" type="password" name="password" value="">
</div>
</div>
<div class="uk-margin">
<label class="uk-form-label" for="winix_adduser_confirm_password">{adduser_confirm_password}</label>
<div class="uk-form-controls">
<input class="uk-input" id="winix_adduser_confirm_password" type="password" name="passwordconfirm" value="">
</div>
</div>
<div class="uk-margin">
[if winix_account_need_email_verification]
<label class="uk-form-label" for="winix_adduser_email">{adduser_need_email}</label>
[else]
<label class="uk-form-label" for="winix_adduser_email">{adduser_email}</label>
[end]
<div class="uk-form-controls">
<input class="uk-input" id="winix_adduser_email" type="text" name="email" value="[adduser_last_email]">
</div>
</div>
[if user_super_user]
<p>
<input type="checkbox" name="autoactivate" id="autoactivate"><label style="display: inline;" for="autoactivate">{adduser_auto_activate}</label>
</p>
<div class="uk-margin">
<div class="uk-form-controls">
<label><input class="uk-checkbox uk-margin-small-right" type="checkbox" name="autoactivate" id="autoactivate">{adduser_auto_activate}</label>
</div>
</div>
[end]
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
<input class="submit" type="submit" value="[if user_logged]{adduser_submit}[else]{register_user_submit}[end]">
</fieldset>
<div class="uk-margin">
<div class="uk-form-controls">
<input class="uk-button uk-button-primary" type="submit" value="[if user_logged]{adduser_submit}[else]{register_user_submit}[end]">
</div>
</div>
</form>
</div>

View File

@ -1,75 +1,80 @@
<div class="winix">
[if item_is]<h1>{edit}</h1>[else]<h1>{add}</h1>[end]
[if mount_type_is "cms"]
<div class="winix_input_a">
<label for="winix_title_id">{title}:</label>
<input id="winix_title_id" type="text" name="subject" value="[item_subject]">
</div>
<div class="winix_input_a">
<label for="winix_url_id">{suggested_url}:</label>
<input id="winix_url_id" type="text" name="url" value="[item_url]">
<form class="uk-form-stacked">
[if one [mount_type_is "cms"] [any [mount_type_is "thread"] [thread_mount_arg_is "subject"]]]
<div class="uk-margin">
<label class="uk-form-label" for="winix_title_id">{title}</label>
<div class="uk-form-controls">
<input class="uk-input" id="winix_title_id" type="text" name="subject" value="[item_subject]" [if not item_is]autofocus [end]>
</div>
</div>
<div class="uk-margin">
<label class="uk-form-label" for="winix_url_id">{suggested_url}</label>
<div class="uk-form-controls">
<input class="uk-input" id="winix_url_id" type="text" name="url" value="[item_url]">
</div>
</div>
[end]
[if any [mount_type_is "thread"] [thread_mount_arg_is "subject"]]
<div class="winix_input_a">
<label for="winix_title_id">{title}:</label>
<input id="winix_title_id" type="text" name="subject" value="[item_subject]">
</div>
<div class="winix_input_a">
<label for="winix_url_id">{suggested_url}:</label>
<input id="winix_url_id" type="text" name="url" value="[item_url]">
</div>
[end]
<div class="winix_input_a">
[if mount_type_is "cms"]<label for="winix_content_id">{form_emacs_content_cms}</label>[end]
[if mount_type_is "thread"]<label for="winix_content_id">{form_emacs_content_thread}</label>[end]
[if mount_type_is "ticket"]<label for="winix_content_id">{form_emacs_content_ticket}</label>[end]
<div class="uk-margin">
[if mount_type_is "cms"]<label class="uk-form-label" for="winix_content_id">{form_emacs_content_cms}</label>[end]
[if mount_type_is "thread"]<label class="uk-form-label" for="winix_content_id">{form_emacs_content_thread}</label>[end]
[if mount_type_is "ticket"]<label class="uk-form-label" for="winix_content_id">{form_emacs_content_ticket}</label>[end]
[# template fun_ls.html uses the name: itemcontent to refer to this textarea item]
<div style="border-top: 1px solid #dadada; border-bottom: 1px solid #dadada; padding: 0.2em 0 0.2em 0; margin: 1em 0 1em 0;" id="winix-editor-content" data-winix-post-name="itemcontent">[item_print_content]</div>
<div class="uk-form-controls">
<div style="border-top: 1px solid #dadada; border-bottom: 1px solid #dadada; padding: 0.2em 0 0.2em 0; margin: 1em 0 1em 0;" id="winix-editor-content" data-winix-post-name="itemcontent">[item_print_content]</div>
</div>
</div>
<input id="contenttype" type="hidden" name="contenttype" value="2">
<div class="uk-form-controls">
<input id="contenttype" type="hidden" name="contenttype" value="2">
</div>
[if not user_logged]
<div class="winix_input_a">
<label for="winix_nick_id">{nick}:</label>
<input id="winix_nick_id" type="text" name="guestname" value="[item_guest_name]">
<div class="uk-margin">
<label class="uk-form-label" for="winix_nick_id">{nick}</label>
<div class="uk-form-controls">
<input class="uk-input" id="winix_nick_id" type="text" name="guestname" value="[item_guest_name]">
</div>
</div>
<div class="winix_input_a">
<label for="winix_rebus_id">{rebus_how_is_it} [rebus_question]?</p>
<input id="winix_rebus_id" type="text" name="rebus">
<div class="uk-margin">
<label class="uk-form-label" for="winix_rebus_id">{rebus_how_is_it} [rebus_question]?</label>
<div class="uk-form-controls">
<input class="uk-input" id="winix_rebus_id" type="text" name="rebus">
</div>
</div>
[include "antispam.html"]
[end]
<div class="winix-update-button-container">
<button class="winix_update_button" data-winix-function-path="[doc_base_url][dir][if item_is][item_url]/[end]ckeditor"
data-winix-content-ckeditor-instances="winix-editor-content"
data-winix-content-inputs="winix_url_id,winix_title_id,contenttype"
data-winix-progressbar-id="winix-editor-progressbar"
data-winix-messages-status-success-id="winix-editor-messages-status-success"
data-winix-messages-status-error-id="winix-editor-messages-status-error"
>
Aktualizuj
</button>
<div class="uk-margin">
<div class="uk-form-controls uk-inline">
<button class="uk-button uk-button-primary winix_update_button"
data-winix-function-path="[doc_base_url][dir][if item_is][item_url]/[end]ckeditor"
data-winix-content-ckeditor-instances="winix-editor-content"
data-winix-content-inputs="winix_url_id,winix_title_id,contenttype"
data-winix-progressbar-id="winix-editor-progressbar"
data-winix-messages-status-success-id="winix-editor-messages-status-success"
data-winix-messages-status-error-id="winix-editor-messages-status-error"
>
{ckeditor_update_button}
</button>
<div id="winix-editor-progressbar" class="uk-invisible uk-position-center-right-out uk-margin-small-left">
<img src="[doc_base_url_common]/progressbars/progressbar_fading_lines_16x16.gif" alt="{ckeditor_update_progressbar_img_alt}">
</div>
<div id="winix-editor-progressbar" class="winix-progressbar">
<img src="[doc_base_url_common]/progressbars/progressbar_fading_lines_16x16.gif" alt="progress bar">
</div>
<div id="winix-editor-messages-status-success" class="winix-editor-messages-status-success">
@ -88,4 +93,6 @@
[ckeditor_old_browsers_support]
[ckeditor "winix-editor-content"]
</form>
</div>

View File

@ -2,38 +2,52 @@
<h1>{cp_header}</h1>
<p>
[if item_is]{cp_page} [item_url] [else]{cp_dir} [dir_without_slash][end]
</p>
<form id="additem" method="post" action="[doc_base_url][dir][if item_is][item_url]/[end]cp[if not item_is]/r[end]">
<fieldset>
<legend>{cp_form_legend}</legend>
<p>
[if item_is]{cp_page} "[item_url]":[else]{cp_dir} "[dir_without_slash]"[end]
</p>
<p class="withnext">{suggested_url}</p>
<input class="edit" type="text" name="to" value="[dir_without_slash][if item_is]/[item_url][end]">
<p>
<label><input type="checkbox" name="preserveattr">{cp_preserve_attr}</label>
[if not item_is]
<label><input type="checkbox" name="onlycontent">{cp_only_content}</label>
<label><input type="checkbox" name="removedefaults" checked="checked">{cp_remove_defaults}</label>
<label><input type="checkbox" name="followsymlinks" checked="checked">{cp_follow_symlinks}</label>
[end]
</p>
<form class="uk-form-stacked uk-width-1-2@s" method="post" action="[doc_base_url][dir][if item_is][item_url]/[end]cp[if not item_is]/r[end]">
<div class="uk-margin">
<label class="uk-form-label" for="winix_url">{suggested_url}</label>
<div class="uk-form-controls">
<input class="uk-input" id="winix_url" type="text" name="to" value="[dir_without_slash][if item_is]/[item_url][end]">
</div>
</div>
<div class="uk-margin">
<div class="uk-margin-small-top">
<label><input class="uk-checkbox uk-margin-small-right" type="checkbox" name="preserveattr">{cp_preserve_attr}</label>
</div>
[if not item_is]
<div class="uk-margin-small-top">
<label><input class="uk-checkbox uk-margin-small-right" type="checkbox" name="onlycontent">{cp_only_content}</label>
</div>
<div class="uk-margin-small-top">
<label><input class="uk-checkbox uk-margin-small-right" type="checkbox" name="removedefaults" checked="checked">{cp_remove_defaults}</label>
</div>
<div class="uk-margin-small-top">
<label><input class="uk-checkbox uk-margin-small-right" type="checkbox" name="followsymlinks" checked="checked">{cp_follow_symlinks}</label>
</div>
[end]
</div>
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
<input class="submit" type="submit" value="{copy}">
</fieldset>
<div class="uk-margin">
<input class="uk-button uk-button-primary" type="submit" value="{copy}">
</div>
</form>
</div>

View File

@ -3,27 +3,40 @@
<h1>{create_thread_header}</h1>
<form id="additem" method="post" action="[doc_base_url][dir]createthread">
<fieldset>
<legend>{form_thread_legend}</legend>
<form class="uk-form-stacked" method="post" action="[doc_base_url][dir]createthread">
<p class="withnext">{title}:</p>
<input class="edit" type="text" name="subject" value="[item_subject]">
<div class="uk-margin">
<label class="uk-form-label" for="winix_title_id">{title}</label>
<div class="uk-form-controls">
<input class="uk-input" id="winix_title_id" type="text" name="subject" value="[item_subject]">
</div>
</div>
[if thread_mount_arg_is "subject"]
<p class="withnext">{suggested_url}:</p>
<input class="edit" type="text" name="url" value="[item_url]">
<div class="uk-margin">
<label class="uk-form-label" for="winix_url_id">{suggested_url}</label>
<div class="uk-form-controls">
<input class="uk-input" id="winix_url_id" type="text" name="url" value="[item_url]">
</div>
</div>
[end]
[include "fun_emacs_post.html"]
[if not user_logged]
<p class="withnext">{nick}:</p>
<input class="edit" type="text" name="guestname" value="[item_guest_name]">
<p class="withnext">{rebus_how_is_it} [rebus_question]?</p>
<input class="edit" type="text" name="rebus">
<div class="uk-margin">
<label class="uk-form-label" for="winix_nick_id">{nick}</label>
<div class="uk-form-controls">
<input class="uk-input" id="winix_nick_id" type="text" name="guestname" value="[item_guest_name]">
</div>
</div>
<div class="uk-margin">
<label class="uk-form-label" for="winix_rebus_id">{rebus_how_is_it} [rebus_question]?</label>
<div class="uk-form-controls">
<input class="uk-input" id="winix_rebus_id" type="text" name="rebus">
</div>
</div>
[include "antispam.html"]
[end]
@ -31,9 +44,12 @@
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
<input class="submit" type="submit" value="{button_thread_submit}">
</fieldset>
<div class="uk-margin">
<input class="uk-button uk-button-primary" type="submit" value="{button_thread_submit}">
</div>
</form>
</div>

View File

@ -8,116 +8,180 @@
<form method="post" action="[doc_base_url][dir][if item_is][item_url]/editticket[else]createticket[end]" enctype="multipart/form-data">
<form class="uk-form-stacked" method="post" action="[doc_base_url][dir][if item_is][item_url]/editticket[else]createticket[end]" enctype="multipart/form-data">
<div class="winix_input_a">
<label for="winix_title_id">{title}:</label>
<input id="winix_title_id" type="text" name="subject" value="[item_subject]">
<div class="uk-margin">
<label class="uk-form-label" for="winix_title_id">{title}</label>
<div class="uk-form-controls">
<input class="uk-input" id="winix_title_id" type="text" name="subject" value="[item_subject]">
</div>
</div>
[if ticket_tab]
<table class="winix_create_ticket">
[for ticket_tab]
<tr>
<th>[filter fil_firstup][ticket_tab_param_name]:[end]</th>
<td>
[if ticket_tab_type_is "select"]
<select name="ticketparam[ticket_tab_param_id]">
[for ticket_tab_select_tab]
<option [if ticket_tab_select_tab_is_selected]selected [end]value="[ticket_tab_select_tab_id]">[ticket_tab_select_tab_name]</option>
[end]
</select>
<div class="uk-margin">
<label class="uk-form-label" for="winix_ticket_select_id_[ticket_tab_param_id]">[filter fil_firstup][ticket_tab_param_name][end]</label>
<div class="uk-form-controls">
<select class="uk-select" id="winix_ticket_select_id_[ticket_tab_param_id]" name="ticketparam[ticket_tab_param_id]">
[for ticket_tab_select_tab]
<option [if ticket_tab_select_tab_is_selected]selected [end]value="[ticket_tab_select_tab_id]">[ticket_tab_select_tab_name]</option>
[end]
</select>
</div>
</div>
[end]
[if one [ticket_tab_type_is "integer"] [ticket_tab_type_is "progress"] [ticket_tab_type_is "string"]]
<input type="text" name="ticketparam[ticket_tab_param_id]" value="[ticket_tab_value]">
<div class="uk-margin">
<label class="uk-form-label" for="winix_ticket_input_id_[ticket_tab_param_id]">[filter fil_firstup][ticket_tab_param_name][end]</label>
<div class="uk-form-controls">
<input class="uk-input" id="winix_ticket_input_id_[ticket_tab_param_id]" type="text" name="ticketparam[ticket_tab_param_id]" value="[ticket_tab_value]">
</div>
</div>
[end]
[if ticket_tab_type_is "multistring"]
<textarea name="ticketparam[ticket_tab_param_id]" rows="10" cols="60">[ticket_tab_value]</textarea>
<div class="uk-margin">
<label class="uk-form-label" for="winix_ticket_textarea_id_[ticket_tab_param_id]">[filter fil_firstup][ticket_tab_param_name][end]</label>
<div class="uk-form-controls">
<textarea class="uk-textarea" id="winix_ticket_textarea_id_[ticket_tab_param_id]" name="ticketparam[ticket_tab_param_id]" rows="10" cols="60">[ticket_tab_value]</textarea>
</div>
</div>
[end]
[if ticket_tab_type_is "images"]
[for ticket_tab_file_tab]
<div class="winix_create_ticket_file_row">
<img src="[doc_base_url][ticket_tab_file_tab_path]/-/thumb" alt="[ticket_tab_file_tab_path]" height="150">
<input type="submit" name="ticketdeletefile_[ticket_tab_file_tab_itemid]" value="{ticket_delete_file}">
<div class="uk-margin">
<label class="uk-form-label" for="winix_ticket_images_id_[ticket_tab_param_id]">[filter fil_firstup][ticket_tab_param_name][end]</label>
<div uk-form-custom="target: true">
<input type="file" id="winix_ticket_images_id_[ticket_tab_param_id]" name="ticketparam[ticket_tab_param_id]" multiple>
<input class="uk-input" type="text" placeholder="{form_ticket_select_file}" disabled>
</div>
<button class="uk-button uk-button-default" type="submit" name="fileuploadsubmit">{add}</button>
</div>
[end]
<div class="uk-margin">
<div class="uk-child-width-1-3@m" uk-grid uk-lightbox="animation: slide">
[for ticket_tab_file_tab]
<div class="uk-inline">
<a class="uk-inline" href="[doc_base_url][ticket_tab_file_tab_path]" data-caption="[ticket_tab_file_tab_path]">
<img src="[doc_base_url][ticket_tab_file_tab_path]/-/thumb" alt="[ticket_tab_file_tab_path]">
</a>
<button class="uk-button uk-button-default uk-button-small uk-position-small uk-position-top-right uk-overlay uk-overlay-default uk-padding-small uk-padding-remove-top uk-padding-remove-bottom"
type="submit"
name="ticketdeletefile_[ticket_tab_file_tab_itemid]"
data-uk-tooltip="title: {ticket_delete_file}">
<span uk-icon="trash"></span>
</button>
</div>
[end]
</div>
</div>
<input size="30" type="file" name="ticketparam[ticket_tab_param_id]" multiple>
<input type="submit" name="fileuploadsubmit" value="{add}">
[end]
[if ticket_tab_type_is "files"]
<div class="uk-margin">
<label class="uk-form-label" for="winix_ticket_files_id_[ticket_tab_param_id]">[filter fil_firstup][ticket_tab_param_name][end]</label>
<div uk-form-custom="target: true">
<input type="file" id="winix_ticket_files_id_[ticket_tab_param_id]" name="ticketparam[ticket_tab_param_id]" multiple>
<input class="uk-input" type="text" placeholder="{form_ticket_select_file}" disabled>
</div>
<button class="uk-button uk-button-default" type="submit" name="fileuploadsubmit">{add}</button>
</div>
[if ticket_tab_file_tab]
<div class="uk-margin">
<ul>
[for ticket_tab_file_tab]
<li>
<a href="[doc_base_url][ticket_tab_file_tab_path]/download">[ticket_tab_file_tab_path]</a>
[# !! CHECK ME how this look like -- css was not set]
<input type="submit" name="ticketdeletefile_[ticket_tab_file_tab_itemid]" value="{ticket_delete_file}">
<button class="uk-button uk-button-default uk-button-small"
type="submit"
name="ticketdeletefile_[ticket_tab_file_tab_itemid]"
value="{ticket_delete_file}"
data-uk-tooltip="title: {ticket_delete_file}">
<span uk-icon="trash"></span>
</button>
</li>
[end]
</ul>
</div>
[end]
<input size="30" type="file" name="ticketparam[ticket_tab_param_id]" multiple>
<input type="submit" name="fileuploadsubmit" value="{add}">
[end]
[if any_not [ticket_tab_type_is "images"] [ticket_tab_type_is "files"] ticket_is_creating_new ticket_tab_has_value]
{ticket_value_not_set}
<div class="uk-alert-warning" uk-alert>
<p>{ticket_value_not_set}</p>
</div>
[end]
</td>
</tr>
[end]
</table>
[end]
[# FIXME !! change names form_emacs_content_thread and form_emacs_content_ticket]
<div class="winix_input_a">
<label for="winix_content_id">{form_emacs_content_ticket}</label>
<textarea id="winix_content_id" rows="10" cols="60" name="itemcontent">[item_content]</textarea>
<div class="uk-margin">
<label for="winix_content_id">{form_emacs_content_ticket}</label>
<div class="uk-form-controls">
<textarea class="uk-textarea" id="winix_content_id" rows="10" cols="60" name="itemcontent">[item_content]</textarea>
</div>
</div>
<div class="winix_input_a">
<label for="winix_content_type_id">{form_emacs_content_type}</label>
<select id="winix_content_type_id" name="contenttype">
<option[if item_content_type_is "text"] selected[end] value="0">{form_emacs_content_type_text}</option>
<option[if item_content_type_is "formatted text"] selected[end] value="1">{form_emacs_content_type_formatted_text}</option>
[if user_can_use_html]<option[if item_content_type_is "html"] selected[end] value="2">{form_emacs_content_type_html}</option>[end]
[if user_can_use_bbcode]<option[if item_content_type_is "bbcode"] selected[end] value="3">{form_emacs_content_type_bbcode}</option>[end]
[if user_can_use_other]<option[if item_content_type_is "other"] selected[end] value="4">{form_emacs_content_type_other}</option>[end]
</select>
<div class="uk-margin">
<label for="winix_content_type_id">{form_emacs_content_type}</label>
<div class="uk-form-controls">
<select class="uk-select" id="winix_content_type_id" name="contenttype">
<option[if item_content_type_is "text"] selected[end] value="0">{form_emacs_content_type_text}</option>
<option[if item_content_type_is "formatted text"] selected[end] value="1">{form_emacs_content_type_formatted_text}</option>
[if user_can_use_html]<option[if item_content_type_is "html"] selected[end] value="2">{form_emacs_content_type_html}</option>[end]
[if user_can_use_bbcode]<option[if item_content_type_is "bbcode"] selected[end] value="3">{form_emacs_content_type_bbcode}</option>[end]
[if user_can_use_other]<option[if item_content_type_is "other"] selected[end] value="4">{form_emacs_content_type_other}</option>[end]
</select>
</div>
</div>
[if not user_logged]
<div class="winix_input_a">
<label for="winix_nick_id">{nick}:</label>
<input id="winix_nick_id" type="text" name="guestname" value="[item_guest_name]">
<div class="uk-margin">
<label class="uk-form-label" for="winix_nick_id">{nick}</label>
<div class="uk-form-controls">
<input class="uk-input" id="winix_nick_id" type="text" name="guestname" value="[item_guest_name]">
</div>
</div>
<div class="winix_input_a">
<label for="winix_rebus_id">{rebus_how_is_it} [rebus_question]?</p>
<input id="winix_rebus_id" type="text" name="rebus">
<div class="uk-margin">
<label class="uk-form-label" for="winix_rebus_id">{rebus_how_is_it} [rebus_question]?</label>
<div class="uk-form-controls">
<input class="uk-input" id="winix_rebus_id" type="text" name="rebus">
</div>
</div>
[include "antispam.html"]
@ -128,8 +192,9 @@
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
<input type="submit" value="[if item_is]{form_ticket_edit_submit}[else]{form_ticket_create_submit}[end]">
<div class="uk-margin">
<input class="uk-button uk-button-primary" type="submit" value="[if item_is]{form_ticket_edit_submit}[else]{form_ticket_create_submit}[end]">
</div>
</form>

View File

@ -3,22 +3,28 @@
<h1>{default_header}</h1>
<form id="additem" method="post" action="[doc_base_url][dir]default">
<fieldset>
<legend>{form_default_legend}</legend>
{url}:<br>
<input class="edit" type="text" name="linkto" value="[dir_last_link_to]">
<form class="uk-form-stacked uk-width-1-2@s" method="post" action="[doc_base_url][dir]default">
<p>
<label><input class="" type="checkbox" name="makeredirect"[if dir_last_is_link_redirect] checked="checked"[end]>{default_make_redirect}</label>
</p>
<div class="uk-margin">
<label class="uk-form-label" for="winix_url">{url}</label>
<div class="uk-form-controls">
<input class="uk-input" id="winix_url" type="text" name="linkto" value="[dir_last_link_to]">
</div>
</div>
<div class="uk-margin">
<label><input class="uk-checkbox uk-margin-small-right" type="checkbox" name="makeredirect"[if dir_last_is_link_redirect] checked="checked"[end]>{default_make_redirect}</label>
</div>
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
<input class="submit" type="submit" value="{change}">
</fieldset>
<div class="uk-margin">
<input class="uk-button uk-button-primary" type="submit" value="{change}">
</div>
</form>

View File

@ -4,39 +4,51 @@
<form method="post" action="[doc_base_url][dir][if item_is][item_url]/[end]emacs">
<div class="winix_input_a">
<label for="winix_title_id">{title}:</label>
<input id="winix_title_id" type="text" name="subject" value="[item_subject]" [if not item_is]autofocus [end]>
<form class="uk-form-stacked" method="post" action="[doc_base_url][dir][if item_is][item_url]/[end]emacs">
<div class="uk-margin">
<label class="uk-form-label" for="winix_title_id">{title}</label>
<div class="uk-form-controls">
<input class="uk-input" id="winix_title_id" type="text" name="subject" value="[item_subject]" [if not item_is]autofocus [end]>
</div>
</div>
<div class="winix_input_a">
<label for="winix_url_id">{suggested_url}:</label>
<input id="winix_url_id" type="text" name="url" value="[item_url]">
<div class="uk-margin">
<label class="uk-form-label" for="winix_url_id">{suggested_url}</label>
<div class="uk-form-controls">
<input class="uk-input" id="winix_url_id" type="text" name="url" value="[item_url]">
</div>
</div>
[include "fun_emacs_post.html"]
[if not user_logged]
<div class="winix_input_a">
<label for="winix_nick_id">{nick}:</label>
<input id="winix_nick_id" type="text" name="guestname" value="[item_guest_name]">
<div class="uk-margin">
<label class="uk-form-label" for="winix_nick_id">{nick}</label>
<div class="uk-form-controls">
<input class="uk-input" id="winix_nick_id" type="text" name="guestname" value="[item_guest_name]">
</div>
</div>
<div class="winix_input_a">
<label for="winix_rebus_id">{rebus_how_is_it} [rebus_question]?</label>
<input id="winix_rebus_id" type="text" name="rebus">
<div class="uk-margin">
<label class="uk-form-label" for="winix_rebus_id">{rebus_how_is_it} [rebus_question]?</label>
<div class="uk-form-controls">
<input class="uk-input" id="winix_rebus_id" type="text" name="rebus">
</div>
</div>
[include "antispam.html"]
[end]
[if winix_function_param_is "postredirect"]
<div class="uk-form-controls">
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
</div>
[end]
<input type="submit" value="[if item_is]{change}[else]{add}[end]">
<div class="uk-margin uk-form-controls">
<input class="uk-button uk-button-primary" type="submit" value="[if item_is]{change}[else]{add}[end]">
</div>
</form>

View File

@ -1,21 +1,24 @@
<div class="winix_input_a">
<div class="uk-margin">
[if winix_function_is "upload"]
<label for="winix_content_id">{upload_content}</label>
<label class="uk-form-label" for="winix_content_id">{upload_content}</label>
[else]
[if mount_type_is "cms"]<label for="winix_content_id">{form_emacs_content_cms}</label>[end]
[if mount_type_is "thread"]<label for="winix_content_id">{form_emacs_content_thread}</label>[end]
[if mount_type_is "ticket"]<label for="winix_content_id">{form_emacs_content_ticket}</label>[end]
[if mount_type_is "cms"]<label class="uk-form-label" for="winix_content_id">{form_emacs_content_cms}</label>[end]
[if mount_type_is "thread"]<label class="uk-form-label" for="winix_content_id">{form_emacs_content_thread}</label>[end]
[if mount_type_is "ticket"]<label class="uk-form-label" for="winix_content_id">{form_emacs_content_ticket}</label>[end]
[end]
<textarea [if item_is]autofocus [end]id="winix_content_id" rows="[if winix_function_is "upload"]7[else][if mount_type_is "cms"]30[else]10[end][end]" cols="60" name="itemcontent">[item_content]</textarea>
<div class="uk-form-controls">
[# CodeMirror doesn't work correctly inside fieldset tag -- horizontal scroll is broken]
<textarea class="uk-textarea" [if item_is]autofocus [end]id="winix_content_id" rows="[if winix_function_is "upload"]7[else][if mount_type_is "cms"]30[else]10[end][end]" cols="60" name="itemcontent">[item_content]</textarea>
</div>
</div>
<div class="winix_input_a">
<label for="winix_contenttype_id">{form_emacs_content_type}</label>
<select name="contenttype" id="winix_contenttype_id">
<div class="uk-margin">
<label class="uk-form-label" for="winix_contenttype_id">{form_emacs_content_type}</label>
<select class="uk-select" name="contenttype" id="winix_contenttype_id">
<option[if item_content_type_is "text"] selected[end] value="0">{form_emacs_content_type_text}</option>
<option[if item_content_type_is "formatted text"] selected[end] value="1">{form_emacs_content_type_formatted_text}</option>
[if user_can_use_html]<option[if item_content_type_is "html"] selected[end] value="2">{form_emacs_content_type_html}</option>[end]

View File

@ -5,51 +5,61 @@
[if user_super_user]
[if winix_function_param_is "a"]
<p class="withnext">{env_change_admin_env_for_user}:</p>
[else]
<p class="withnext">{env_change_env_for_user}:</p>
[end]
<form class="uk-form-stacked uk-width-1-2@s" method="post" action="[doc_base_url][dir][if item_is][item_url]/[end]env[if winix_function_param_is "a"]/a[end]">
<form class="envchangeuser" method="post" action="[doc_base_url][dir][if item_is][item_url]/[end]env[if winix_function_param_is "a"]/a[end]">
<fieldset>
<legend>{form_env_legend}</legend>
<select name="userid">
[for env_user_tab]
<option value="[env_user_tab_id]" [if env_user_tab_is_current]selected="selected"[end]>[env_user_tab_name]</option>
[end]
</select>
<div class="uk-margin">
<label class="uk-form-label" for="winix_env_user_select">
[if winix_function_param_is "a"]
{env_change_admin_env_for_user}
[else]
{env_change_env_for_user}
[end]
</label>
<div class="uk-form-controls">
<select class="uk-select" id="winix_env_user_select" name="userid">
[for env_user_tab]
<option value="[env_user_tab_id]" [if env_user_tab_is_current]selected="selected"[end]>[env_user_tab_name]</option>
[end]
</select>
</div>
</div>
<input type="hidden" name="changeuser">
<input class="submit" type="submit" value="{env_change_user}">
<div class="uk-margin">
<input class="uk-button uk-button-primary" type="submit" value="{env_change_user}">
</div>
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
</fieldset>
</form>
[end]
<form id="additem" method="post" action="[doc_base_url][dir][if item_is][item_url]/[end]env[if winix_function_param_is "a"]/a[end]">
<fieldset>
<legend>{form_env_legend}</legend>
<textarea class="multitext" rows="30" cols="60" name="envvar">[if winix_function_param_is "a"][env_user_admin_env_str][else][env_user_env_str][end]</textarea>
<input type="hidden" name="userid" value="[env_user_id]">
<input class="submit" type="submit" value="{change}">
<form class="uk-margin-medium uk-form-stacked" method="post" action="[doc_base_url][dir][if item_is][item_url]/[end]env[if winix_function_param_is "a"]/a[end]">
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
<div class="uk-margin">
<div class="uk-form-controls">
<textarea class="uk-textarea" rows="20" name="envvar">[if winix_function_param_is "a"][env_user_admin_env_str][else][env_user_env_str][end]</textarea>
</div>
</div>
</fieldset>
<input type="hidden" name="userid" value="[env_user_id]">
<div class="uk-margin">
<input class="uk-button uk-button-primary" type="submit" value="{change}">
</div>
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
</form>

View File

@ -11,17 +11,20 @@
<form action="[doc_base_url][dir][if item_is][item_url]/[end]export" method="post">
<form class="uk-form-stacked" action="[doc_base_url][dir][if item_is][item_url]/[end]export" method="post">
<input type="checkbox" name="staticfilestoo" id="nonstaticfiles"><label for="nonstaticfiles">{export_checkbox_static_file_too}</label>
<br><br>
<input type="submit" value="Export">
<div class="uk-margin">
<label><input class="uk-checkbox uk-margin-small-right" type="checkbox" name="staticfilestoo">{export_checkbox_static_file_too}</label>
</div>
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
<div class="uk-margin">
<button class="uk-button uk-button-primary" type="submit">{export_button}</button>
</div>
</form>

View File

@ -4,12 +4,14 @@
[if mount_page_arg_is "info"][include "dir_last_info.html"][end]
[if one gallery_has_not_mount_type [gallery_mount_type_arg_is "lightbox"]]
[if one gallery_has_not_mount_type [gallery_mount_type_arg_is "uikit"]]
[if gallery_tab]
<ul class="galleryimages">
<ul class="uk-child-width-1-2@s uk-child-width-1-3@m uk-child-width-1-4@l uk-grid" data-uk-lightbox="animation: slide">
[for gallery_tab]
<li><a rel="lightbox\[gallery\]" href="[gallery_tab_link]"><img src="[gallery_tab_link]/-/thumb" alt="[gallery_tab_subject]"></a></li>
<li class="uk-margin-small">
<a href="[gallery_tab_link]"><img src="[gallery_tab_link]/-/thumb" alt="[gallery_tab_subject]"></a>
</li>
[end]
</ul>
[end]
@ -17,7 +19,24 @@
[end]
[if gallery_mount_type_arg_is "galleria"]
[if gallery_mount_type_arg_is "lightbox"]
[# https://lokeshdhakar.com/projects/lightbox2/ ]
[if gallery_tab]
<ul class="uk-child-width-1-2@s uk-child-width-1-3@m uk-child-width-1-4@l uk-grid">
[for gallery_tab]
<li class="uk-margin-small">
<a href="[gallery_tab_link]" data-lightbox="gallery"><img src="[gallery_tab_link]/-/thumb" alt="[gallery_tab_subject]"></a>
</li>
[end]
</ul>
[end]
[end]
[if gallery_mount_type_arg_is "galleriajs"]
[# https://galleriajs.github.io/]
[if gallery_tab]
<ul class="galleryimages" style="width: [gallery_width]; height: [gallery_height];">
@ -25,21 +44,30 @@
<li><a href="[gallery_tab_link]"><img src="[gallery_tab_link]/-/thumb" alt="[gallery_tab_subject]"></a></li>
[end]
</ul>
[if gallery_mount_theme_arg_is "transparent"]
<script type="text/javascript">Galleria.loadTheme('[doc_base_url_common]/aino-galleria/themes/transparent/galleria.transparent.js');</script>
[if gallery_mount_theme_arg_is "azur"]
<script type="text/javascript">Galleria.loadTheme('[doc_base_url_common]/galleriajs/1.6.1/dist/themes/azur/galleria.azur.min.js');</script>
[else]
[if gallery_mount_theme_arg_is "white"]
<script type="text/javascript">Galleria.loadTheme('[doc_base_url_common]/aino-galleria/themes/white/galleria.white.js');</script>
[if gallery_mount_theme_arg_is "twelve"]
<script type="text/javascript">Galleria.loadTheme('[doc_base_url_common]/galleriajs/1.6.1/dist/themes/twelve/galleria.twelve.min.js');</script>
[else]
<script type="text/javascript">Galleria.loadTheme('[doc_base_url_common]/aino-galleria/themes/classic/galleria.classic.js');</script>
[if gallery_mount_theme_arg_is "folio"]
<script type="text/javascript">Galleria.loadTheme('[doc_base_url_common]/galleriajs/1.6.1/dist/themes/folio/galleria.folio.min.js');</script>
[else]
[if gallery_mount_theme_arg_is "fullscreen"]
<script type="text/javascript">Galleria.loadTheme('[doc_base_url_common]/galleriajs/1.6.1/dist/themes/fullscreen/galleria.fullscreen.min.js');</script>
[else]
<script type="text/javascript">Galleria.loadTheme('[doc_base_url_common]/galleriajs/1.6.1/dist/themes/classic/galleria.classic.min.js');</script>
[end]
[else]
[end]
[end]
[if not [winix_function_param_is "image"]]
<script type="text/javascript">$('.galleryimages').galleria();</script>
[else]
[# !! IMPROVE ME add this javascript code to the rest of galleria types]
<script type="text/javascript">var url = window.document.URL.toString(); var num = 0; var re = /\/image:(\d+)/; var numarr = re.exec(url); if( numarr && numarr.length == 2 ) \{var num = numarr\[1\];\}; $('.galleryimages').galleria(\{show: num\});</script>
[end]
[end]
@ -47,120 +75,4 @@
[end]
[if gallery_mount_type_arg_is "galleria1.2.9"]
[if gallery_tab]
<ul class="galleryimages" style="width: [gallery_width]; height: [gallery_height];">
[for gallery_tab]
<li><a href="[gallery_tab_link]"><img src="[gallery_tab_link]/-/thumb" alt="[gallery_tab_subject]"></a></li>
[end]
</ul>
[if gallery_mount_theme_arg_is "transparent"]
<script type="text/javascript">Galleria.loadTheme('[doc_base_url_common]/galleria/themes/transparent/galleria.transparent.js');</script>
[if not [winix_function_param_is "image"]]
<script type="text/javascript">Galleria.configure(\{showInfo:false\}); Galleria.run('.galleryimages');</script>
[else]
<script type="text/javascript">Galleria.configure(\{showInfo:false, show: [winix_function_param_value "image"]\}); Galleria.run('.galleryimages');</script>
[end]
[else]
[if gallery_mount_theme_arg_is "transparentinfo"]
<script type="text/javascript">Galleria.loadTheme('[doc_base_url_common]/galleria/themes/transparentinfo/galleria.transparent.js');</script>
[if not [winix_function_param_is "image"]]
<script type="text/javascript">Galleria.configure(\{\}); Galleria.run('.galleryimages');</script>
[else]
<script type="text/javascript">Galleria.configure(\{show: [winix_function_param_value "image"]\}); Galleria.run('.galleryimages');</script>
[end]
[else]
<script type="text/javascript">Galleria.loadTheme('[doc_base_url_common]/galleria/themes/classic/galleria.classic.js');</script>
[if not [winix_function_param_is "image"]]
<script type="text/javascript">Galleria.configure(\{\}); Galleria.run('.galleryimages');</script>
[else]
<script type="text/javascript">Galleria.configure(\{show: [winix_function_param_value "image"]\}); Galleria.run('.galleryimages');</script>
[end]
[end]
[end]