diff options
Diffstat (limited to 'view/tpl')
-rw-r--r-- | view/tpl/admin_accounts.tpl | 2 | ||||
-rw-r--r-- | view/tpl/admin_channels.tpl | 2 | ||||
-rw-r--r-- | view/tpl/cdav_calendar.tpl | 4 | ||||
-rw-r--r-- | view/tpl/contact_edit_modal.tpl | 8 | ||||
-rw-r--r-- | view/tpl/field_input.tpl | 17 | ||||
-rw-r--r-- | view/tpl/hdr.tpl | 1 | ||||
-rw-r--r-- | view/tpl/help.tpl | 8 | ||||
-rw-r--r-- | view/tpl/install.tpl | 4 | ||||
-rw-r--r-- | view/tpl/invite.tpl | 1 | ||||
-rw-r--r-- | view/tpl/jot-header.tpl | 2 | ||||
-rw-r--r-- | view/tpl/notifications_widget.tpl | 5 | ||||
-rw-r--r-- | view/tpl/nwiki_page_history.tpl | 59 | ||||
-rw-r--r-- | view/tpl/oembed_video.tpl | 5 | ||||
-rw-r--r-- | view/tpl/profile_vcard.tpl | 3 | ||||
-rw-r--r-- | view/tpl/register.tpl | 2 | ||||
-rw-r--r-- | view/tpl/siteinfo.tpl | 2 | ||||
-rw-r--r-- | view/tpl/totp_setup.tpl | 4 | ||||
-rw-r--r-- | view/tpl/widget.tpl | 12 |
18 files changed, 52 insertions, 89 deletions
diff --git a/view/tpl/admin_accounts.tpl b/view/tpl/admin_accounts.tpl index 1f5617f00..4e2b79876 100644 --- a/view/tpl/admin_accounts.tpl +++ b/view/tpl/admin_accounts.tpl @@ -1,4 +1,4 @@ -<div class="generic-content-wrapper-styled" id="adminpage"> +<div class="generic-content-wrapper-styled table-responsive" id="adminpage"> <h1>{{$title}} - {{$page}}</h1> <form action="{{$baseurl}}/admin/accounts" method="post"> diff --git a/view/tpl/admin_channels.tpl b/view/tpl/admin_channels.tpl index 75db77593..19b3c292f 100644 --- a/view/tpl/admin_channels.tpl +++ b/view/tpl/admin_channels.tpl @@ -10,7 +10,7 @@ return false; } </script> -<div class = "generic-content-wrapper-styled" id='adminpage'> +<div class="generic-content-wrapper-styled table-responsive" id='adminpage'> <h1>{{$title}} - {{$page}}</h1> <form action="{{$baseurl}}/admin/channels" method="post"> diff --git a/view/tpl/cdav_calendar.tpl b/view/tpl/cdav_calendar.tpl index 88aa0789d..5d8c6115f 100644 --- a/view/tpl/cdav_calendar.tpl +++ b/view/tpl/cdav_calendar.tpl @@ -480,7 +480,7 @@ function on_submit() { eventSource.refetch(); } else { - $.jGrowl('{{$disabled_warning}}', { sticky: false, theme: 'notice', life: 10000 }); + toast('{{$disabled_warning}}', 'danger'); } reset_form(); }); @@ -506,7 +506,7 @@ function on_submit() { eventSource.refetch(); } else { - $.jGrowl('{{$disabled_warning}}', { sticky: false, theme: 'notice', life: 10000 }); + toast('{{$disabled_warning}}', 'danger'); } reset_form(); }); diff --git a/view/tpl/contact_edit_modal.tpl b/view/tpl/contact_edit_modal.tpl index 72feb7138..b9d9ead08 100644 --- a/view/tpl/contact_edit_modal.tpl +++ b/view/tpl/contact_edit_modal.tpl @@ -54,11 +54,11 @@ $.post('contactedit/' + poi, form_data, function(data) { if (!data.success) { - $.jGrowl(data.message, {sticky: false, theme: 'notice', life: 10000}); + toast(data.message, 'danger'); return; } activate(data); - $.jGrowl(data.message, {sticky: false, theme: ((data.success) ? 'info' : 'notice'), life: ((data.success) ? 3000 : 10000)}); + toast(data.message, ((data.success) ? 'info' : 'danger')); // $('#edit-modal').modal('hide'); }); @@ -70,7 +70,7 @@ $.get('contactedit/' + poi + '/' + cmd, function(data) { $('#edit-modal-tools').html(data.tools); - $.jGrowl(data.message, {sticky: false, theme: ((data.success) ? 'info' : 'notice'), life: ((data.success) ? 3000 : 10000)}); + toast(data.message, ((data.success) ? 'info' : 'danger')); if (cmd === 'drop') { if ($('#contact-entry-wrapper-' + poi).length) { $('#contact-entry-wrapper-' + poi).fadeOut(); @@ -110,7 +110,7 @@ $('.contact-edit-icon-' + poi).hide(); $.get('contactedit/' + poi, function(data) { if (!data.success) { - $.jGrowl(data.message, {sticky: false, theme: 'notice', life: 10000}); + toast(data.message, 'danger'); return; } $('#edit-modal').modal('show'); diff --git a/view/tpl/field_input.tpl b/view/tpl/field_input.tpl index 2f9f83ac5..1b548221f 100644 --- a/view/tpl/field_input.tpl +++ b/view/tpl/field_input.tpl @@ -1,7 +1,18 @@ <div id="id_{{$field.0}}_wrapper" class="mb-3"> - <label for="id_{{$field.0}}" id="label_{{$field.0}}">{{$field.1}}{{if $field.4}}<sup class="required zuiqmid"> {{$field.4}}</sup>{{/if}}</label> - <input class="form-control" name="{{$field.0}}" id="id_{{$field.0}}" type="text" value="{{$field.2}}"{{if $field.5}} {{$field.5}}{{/if}}> - <small id="help_{{$field.0}}" class="form-text text-muted">{{$field.3}}</small> + <label for="id_{{$field.0}}" id="label_{{$field.0}}"> + {{$field.1}}{{if $field.4}}<sup class="required zuiqmid"> {{$field.4}}</sup>{{/if}} + </label> + <input + class="form-control" + name="{{$field.0}}" + id="id_{{$field.0}}" + type="text" + value="{{$field.2|escape:'html':'UTF-8':FALSE}}" + {{if $field.5}}{{$field.5}}{{/if}} + > + <small id="help_{{$field.0}}" class="form-text text-muted"> + {{$field.3}} + </small> </div> {{* COMMENTS for this template: diff --git a/view/tpl/hdr.tpl b/view/tpl/hdr.tpl index e69de29bb..f4f346fb7 100644 --- a/view/tpl/hdr.tpl +++ b/view/tpl/hdr.tpl @@ -0,0 +1 @@ +<div id="toast-container" class="vstack gap-3 m-3 position-fixed top-0 end-0"></div> diff --git a/view/tpl/help.tpl b/view/tpl/help.tpl index 5022e7b1b..ba61a43ce 100644 --- a/view/tpl/help.tpl +++ b/view/tpl/help.tpl @@ -13,19 +13,19 @@ </div> </div> </div> - <h2>{{$title}}: {{$heading}}</h2> + <h2>{{$module->get_page_title()}}</h2> </div> <div class="section-content-wrapper" id="doco-content"> <h3 id="doco-top-toc-heading"> <span class="fakelink" onclick="docoTocToggle(); return false;"> <i class="fa fa-fw fa-caret-right fakelink" id="doco-toc-toggle"></i> - {{$tocHeading}} + {{$module->get_toc_heading()}} </span> </h3> <ul id="doco-top-toc" style="margin-bottom: 1.5em; display: none;"></ul> - {{$content}} + {{$module->render_content()}} </div> </div> <script> - var help_language = '{{$language}}' + var help_language = '{{$module->lang["language"]}}' </script> diff --git a/view/tpl/install.tpl b/view/tpl/install.tpl index 5ab722b12..56faa0527 100644 --- a/view/tpl/install.tpl +++ b/view/tpl/install.tpl @@ -2,7 +2,9 @@ <div class="jumbotron"> <h1>{{$title}}</h1> <hr class="my-4"> + {{if $icon}} <h2><i class="fa fa-{{$icon}}"></i> {{$pass}}</h2> + {{/if}} </div> {{if $status}} @@ -11,5 +13,5 @@ <div class="alert alert-info">{{$text}}</div> <br> - {{$what_next}} + {{if $what_next}}{{$what_next}}{{/if}} </div> diff --git a/view/tpl/invite.tpl b/view/tpl/invite.tpl index 304816e0b..08c984a5e 100644 --- a/view/tpl/invite.tpl +++ b/view/tpl/invite.tpl @@ -76,7 +76,6 @@ ' .zai_n { width: 5em; text-align: center; }'+ ' #id_zaiexpire_fs { display: inline-block; }'+ ' .invites { text-transform: capitalize; }'+ - ' .jGrowl-message { font-family: monospace; }'+ '</style>'); $('#zai-txt').attr('placeholder','{{$personal_pointer}}'); zaitx(); diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index ca3cabd61..67ba1824b 100644 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -184,7 +184,6 @@ var activeCommentText = ''; } function jotGetExpiry() { - //reply = prompt("{{$expirewhen}}", $('#jot-expire').val()); $('#expiryModal').modal('show'); $('#expiry-modal-OKButton').on('click', function() { reply=$('#expiration-date').val(); @@ -196,7 +195,6 @@ var activeCommentText = ''; } function jotGetPubDate() { - //reply = prompt("{{$expirewhen}}", $('#jot-expire').val()); $('#createdModal').modal('show'); $('#created-modal-OKButton').on('click', function() { reply=$('#created-date').val(); diff --git a/view/tpl/notifications_widget.tpl b/view/tpl/notifications_widget.tpl index 9ea5ffec6..a9d98dae9 100644 --- a/view/tpl/notifications_widget.tpl +++ b/view/tpl/notifications_widget.tpl @@ -337,17 +337,16 @@ sse_setNotificationsStatus(); // notice and info - $.jGrowl.defaults.closerTemplate = '<div>[ ' + aStr.closeAll + ']</div>'; if(obj.notice) { $(obj.notice.notifications).each(function() { - $.jGrowl(this, { sticky: true, theme: 'notice' }); + toast(this, 'danger'); }); } if(obj.info) { $(obj.info.notifications).each(function(){ - $.jGrowl(this, { sticky: false, theme: 'info', life: 10000 }); + toast(this, 'info'); }); } diff --git a/view/tpl/nwiki_page_history.tpl b/view/tpl/nwiki_page_history.tpl deleted file mode 100644 index 6926cca2d..000000000 --- a/view/tpl/nwiki_page_history.tpl +++ /dev/null @@ -1,59 +0,0 @@ -<style> - .diff { - width:100%; - word-break: break-all; - } - - .diff td{ - padding:0 0.667em; - vertical-align:top; - white-space:pre; - white-space:pre-wrap; - font-family:Consolas,'Courier New',Courier,monospace; - font-size:1.0em; - line-height:1.333; - } - - .diff span{ - display:block; - min-height:1.333em; - margin-top:-1px; - padding:0 3px; - } - - * html .diff span{ - height:1.333em; - } - - .diff span:first-child{ - margin-top:0; - } - - .diffDeleted span{ - border:1px solid rgb(255,192,192); - background:rgb(255,224,224); - } - - .diffInserted span{ - border:1px solid rgb(192,255,192); - background:rgb(224,255,224); - } -</style> -<table class="" style="width: 100%;"> - {{foreach $pageHistory as $commit}} - <tr class="wikis-index-row"><td> - <table id="rev-{{$commit.revision}}" onclick="$('#details-{{$commit.revision}}').show()" style="width: 100%;"> - <tr><td width="10%">{{$date_lbl}}</td><td width="70%">{{$commit.date}}</td> - <td rowspan="3" width="20%" align="right"> - {{if $permsWrite}} - <button id="revert-{{$commit.revision}}" class="btn btn-danger btn-sm" onclick="wiki_revert_page('{{$commit.revision}}')">{{$revert_btn}}</button> - <br><br> - {{/if}} - <button id="compare-{{$commit.revision}}" class="btn btn-warning btn-sm" onclick="wiki_compare_page('{{$commit.revision}}')">{{$compare_btn}}</button> - </td></tr> - <tr><td>{{$name_lbl}}</td><td>{{$commit.name}}</td></tr> - <tr><td>{{$msg_label}}</td><td>{{$commit.title}}</td></tr> - </table> - </td></tr> - {{/foreach}} -</table>
\ No newline at end of file diff --git a/view/tpl/oembed_video.tpl b/view/tpl/oembed_video.tpl index d821ebdb2..f1513a5d5 100644 --- a/view/tpl/oembed_video.tpl +++ b/view/tpl/oembed_video.tpl @@ -1,4 +1 @@ -<a href="{{$embedurl}}" onclick="this.innerHTML=Base64.decode('{{$escapedhtml}}'); return false;" style="float:left; margin: 1em; position: relative;"> - <img width="{{$tw}}" height="{{$th}}" src="{{$turl}}" /> - <div style="position: absolute; top: 0px; left: 0px; width: {{$twpx}}; height: {{$thpx}}; background: url('{{$baseurl}}/images/icons/48/play.png') no-repeat center center;"></div> -</a> +<a href="{{$embedurl}}" onclick="this.innerHTML=Base64.decode('{{$escapedhtml}}'); return false;" style="float:left; margin-right: 1em; position: relative;"><img width="{{$tw}}" height="{{$th}}" src="{{$turl}}" /></a> diff --git a/view/tpl/profile_vcard.tpl b/view/tpl/profile_vcard.tpl index dd372beac..de08cfc19 100644 --- a/view/tpl/profile_vcard.tpl +++ b/view/tpl/profile_vcard.tpl @@ -99,8 +99,11 @@ </dl> {{/if}} </div> + {{/if}} + {{if $details}} <div class="hcard-addon"></div> {{/if}} + </div> {{if $details}} {{$chanmenu}} diff --git a/view/tpl/register.tpl b/view/tpl/register.tpl index 8e1530eb4..cc2b8e47b 100644 --- a/view/tpl/register.tpl +++ b/view/tpl/register.tpl @@ -47,7 +47,7 @@ {{include file="field_input.tpl" field=$email}} {{include file="field_password.tpl" field=$pass1}} {{include file="field_password.tpl" field=$pass2}} - {{if $reg_is}} + {{if $register_msg}} {{include file="field_textarea.tpl" field=$register_msg}} {{/if}} {{if $enable_tos}} diff --git a/view/tpl/siteinfo.tpl b/view/tpl/siteinfo.tpl index 6cf7da756..08e4790f2 100644 --- a/view/tpl/siteinfo.tpl +++ b/view/tpl/siteinfo.tpl @@ -55,7 +55,7 @@ <div>{{$prj_src}}</div> <br><br> -<div>{{$prj_transport}} ({{$transport_link}})</div> +<div>{{$prj_transport}} {{$transport_link}}</div> {{if $additional_fed}} <div>{{$additional_text}} {{$additional_fed}}</div> diff --git a/view/tpl/totp_setup.tpl b/view/tpl/totp_setup.tpl index 6f995edf1..1f028f6f9 100644 --- a/view/tpl/totp_setup.tpl +++ b/view/tpl/totp_setup.tpl @@ -50,12 +50,12 @@ {totp_code: document.getElementById('totp_test').value}, function(data) { if (data['status']) { - $.jGrowl('{{$test_pass}}', { sticky: false, theme: 'info', life: 10000 }); + toast('{{$test_pass}}', 'info'); let e = document.getElementById('mfa-submit-wrapper'); e.classList.remove('d-none'); return; } - $.jGrowl('{{$test_fail}}', { sticky: false, theme: 'notice', life: 10000 }); + toast('{{$test_fail}}', 'danger'); } ); } diff --git a/view/tpl/widget.tpl b/view/tpl/widget.tpl new file mode 100644 index 000000000..4bbbb2df9 --- /dev/null +++ b/view/tpl/widget.tpl @@ -0,0 +1,12 @@ +{{* Generic template for widgets. + * + * To use this template, pass the `$this` object reference of the widget, + * and implement the `title()` and `contents()` functions as public methods + * on the widget class. + *}} +<div class="widget"> + {{if $widget->title()}} + <h3>{{$widget->title()}}</h3> + {{/if}} + {{$widget->contents()}} +</div> |