diff options
Diffstat (limited to 'view')
-rw-r--r-- | view/css/bootstrap-red.css | 2 | ||||
-rw-r--r-- | view/pdl/mod_cdav.pdl | 3 | ||||
-rw-r--r-- | view/theme/redbasic/php/theme.php | 2 | ||||
-rw-r--r-- | view/tpl/app.tpl | 10 | ||||
-rw-r--r-- | view/tpl/apporder.tpl | 7 | ||||
-rw-r--r-- | view/tpl/cdav_addressbook.tpl | 462 | ||||
-rw-r--r-- | view/tpl/cdav_calendar.tpl | 349 | ||||
-rw-r--r-- | view/tpl/cdav_widget_addressbook.tpl | 66 | ||||
-rw-r--r-- | view/tpl/cdav_widget_calendar.tpl | 121 | ||||
-rw-r--r-- | view/tpl/diaspora_vcard.tpl | 69 | ||||
-rwxr-xr-x | view/tpl/install_settings.tpl | 1 | ||||
-rw-r--r-- | view/tpl/item_binary.tpl | 3 | ||||
-rwxr-xr-x | view/tpl/profile_vcard.tpl | 3 | ||||
-rwxr-xr-x | view/tpl/profile_vcard_short.tpl | 4 |
14 files changed, 1021 insertions, 81 deletions
diff --git a/view/css/bootstrap-red.css b/view/css/bootstrap-red.css index 1bb82f11c..321778d39 100644 --- a/view/css/bootstrap-red.css +++ b/view/css/bootstrap-red.css @@ -38,7 +38,7 @@ nav .badge { } #navbar-collapse-1 i { - font-size: 1rem; + font-size: 1.0rem; } nav .dropdown-menu { diff --git a/view/pdl/mod_cdav.pdl b/view/pdl/mod_cdav.pdl new file mode 100644 index 000000000..ae26810c4 --- /dev/null +++ b/view/pdl/mod_cdav.pdl @@ -0,0 +1,3 @@ +[region=aside] +[widget=cdav][/widget] +[/region] diff --git a/view/theme/redbasic/php/theme.php b/view/theme/redbasic/php/theme.php index a1147a5b4..2b90ae85f 100644 --- a/view/theme/redbasic/php/theme.php +++ b/view/theme/redbasic/php/theme.php @@ -5,7 +5,7 @@ * * Description: Hubzilla standard theme * * Version: 2.1 * * MinVersion: 2.3.1 - * * MaxVersion: 3.0 + * * MaxVersion: 6.0 * * Author: Fabrixxm * * Maintainer: Mike Macgirvin * * Maintainer: Mario Vavti diff --git a/view/tpl/app.tpl b/view/tpl/app.tpl index 28f28611e..0c8ba7459 100644 --- a/view/tpl/app.tpl +++ b/view/tpl/app.tpl @@ -1,4 +1,4 @@ -{{if !$navapps}} +{{if ! ($navapps || $order)}} <div class="app-container"> <div class="app-detail{{if $deleted}} app-deleted{{/if}}"> <a href="{{$app.url}}"{{if $app.target}} target="{{$app.target}}"{{/if}}{{if $app.desc}} title="{{$app.desc}}{{if $app.price}} ({{$app.price}}){{/if}}"{{else}}title="{{$app.name}}"{{/if}}>{{if $icon}}<i class="app-icon fa fa-fw fa-{{$icon}}"></i>{{else}}<img src="{{$app.photo}}" width="80" height="80" />{{/if}} @@ -24,7 +24,13 @@ {{/if}} {{/if}} </div> -{{else}} +{{/if}} +{{if $navapps}} <a class="dropdown-item" href="{{$app.url}}">{{if $icon}}<i class="generic-icons-nav fa fa-fw fa-{{$icon}}"></i>{{else}}<img src="{{$app.photo}}" width="16" height="16" style="margin-right:9px;"/>{{/if}}{{$app.name}}</a> {{/if}} +{{if $order}} +<a href="{{$hosturl}}appman/{{$app.guid}}/moveup"><i class="generic-icons-nav fa fa-fw fa-arrow-up"></i></a> +<a href="{{$hosturl}}appman/{{$app.guid}}/movedown"><i class="generic-icons-nav fa fa-fw fa-arrow-down"></i></a> +{{if $icon}}<i class="generic-icons-nav fa fa-fw fa-{{$icon}}"></i>{{else}}<img src="{{$app.photo}}" width="16" height="16" style="margin-right:9px;"/>{{/if}}{{$app.name}}<br> +{{/if}} diff --git a/view/tpl/apporder.tpl b/view/tpl/apporder.tpl new file mode 100644 index 000000000..fdb726131 --- /dev/null +++ b/view/tpl/apporder.tpl @@ -0,0 +1,7 @@ +<h2>{{$header}}</h2> + +<div class="descriptive-text">{{$desc}}</div> +<br><br><br> +{{foreach $nav_apps as $nav_app}} +{{$nav_app}} +{{/foreach}} diff --git a/view/tpl/cdav_addressbook.tpl b/view/tpl/cdav_addressbook.tpl new file mode 100644 index 000000000..587a95caa --- /dev/null +++ b/view/tpl/cdav_addressbook.tpl @@ -0,0 +1,462 @@ +<script> +$(document).ready(function() { + + $(document).on('click', '.vcard-header, .vcard-cancel-btn', updateView); + $(document).on('click', '.add-field', doAdd); + $(document).on('click', '.remove-field', doRemove); + + function updateView() { + var id = $(this).data('id'); + var action = $(this).data('action'); + var header = $('#vcard-header-' + id); + var cancel = $('#vcard-cancel-' + id); + var addField = $('#vcard-add-field-' + id); + var info = $('#vcard-info-' + id); + var vcardPreview = $('#vcard-preview-' + id); + var fn = $('#vcard-fn-' + id); + + if(action === 'open') { + $(header).addClass('active'); + $(cancel).show(); + $(addField).show(); + $(info).show(); + $(fn).show(); + $(vcardPreview).hide(); + } + else { + $(header).removeClass('active'); + $(cancel).hide(); + $(addField).hide(); + $(info).hide(); + $(fn).hide(); + $(vcardPreview).show(); + } + } + + function doAdd(e) { + e.preventDefault(); + var what = $(this).data('add'); + var id = $(this).data('id'); + var element = '#template-form-' + what; + var where = '#card_form_' + id; + + $(element + ' .remove-field').attr('data-id', id) + + if(what === 'vcard-adr') { + var adrCount = $(where + ' .form-' + what).length; + var attrName = 'adr[' + adrCount + '][]'; + $(element + ' input').attr('name', attrName); + } + + if(what === 'vcard-org' || what === 'vcard-title' || what === 'vcard-note') { + $(where + ' .add-' + what).hide() + } + + $(element).clone().removeAttr('id').appendTo(where + ' .form-' + what + '-wrapper'); + } + + function doRemove() { + var what = $(this).data('remove'); + var element = $(this).parents('div.form-' + what); + var where = '#card_form_' + $(this).data('id'); + + if(what === 'vcard-org' || what === 'vcard-title' || what === 'vcard-note') { + $(where + ' .add-' + what).show() + } + + $(element).remove(); + } + +}); +</script> +<div id="template-form-vcard-org" class="form-group form-vcard-org"> + <div class="form-group form-vcard-org"> + <input type="text" name="org" value="" placeholder="{{$org_label}}"> + <i data-remove="vcard-org" data-id="" class="fa fa-trash-o remove-field drop-icons fakelink"></i> + </div> +</div> + +<div id="template-form-vcard-title" class="form-group form-vcard-title"> + <div class="form-group form-vcard-title"> + <input type="text" name="title" value="" placeholder="{{$title_label}}"> + <i data-remove="vcard-title" data-id="" class="fa fa-trash-o remove-field drop-icons fakelink"></i> + </div> +</div> + +<div id="template-form-vcard-tel" class="form-group form-vcard-tel"> + <select name="tel_type[]"> + <option value="CELL">{{$mobile}}</option> + <option value="HOME">{{$home}}</option> + <option value="WORK">{{$work}}</option> + <option value="OTHER">{{$other}}</option> + </select> + <input type="text" name="tel[]" value="" placeholder="{{$tel_label}}"> + <i data-remove="vcard-tel" data-id="" class="fa fa-trash-o remove-field drop-icons fakelink"></i> +</div> + +<div id="template-form-vcard-email" class="form-group form-vcard-email"> + <select name="email_type[]"> + <option value="HOME">{{$home}}</option> + <option value="WORK">{{$work}}</option> + <option value="OTHER">{{$other}}</option> + </select> + <input type="text" name="email[]" value="" placeholder="{{$email_label}}"> + <i data-remove="vcard-email" data-id="" class="fa fa-trash-o remove-field drop-icons fakelink"></i> +</div> + +<div id="template-form-vcard-impp" class="form-group form-vcard-impp"> + <select name="impp_type[]"> + <option value="HOME">{{$home}}</option> + <option value="WORK">{{$work}}</option> + <option value="OTHER">{{$other}}</option> + </select> + <input type="text" name="impp[]" value="" placeholder="{{$impp_label}}"> + <i data-remove="vcard-impp" data-id="" class="fa fa-trash-o remove-field drop-icons fakelink"></i> +</div> + +<div id="template-form-vcard-url" class="form-group form-vcard-url"> + <select name="url_type[]"> + <option value="HOME">{{$home}}</option> + <option value="WORK">{{$work}}</option> + <option value="OTHER">{{$other}}</option> + </select> + <input type="text" name="url[]" value="" placeholder="{{$url_label}}"> + <i data-remove="vcard-url" data-id="" class="fa fa-trash-o remove-field drop-icons fakelink"></i> +</div> + +<div id="template-form-vcard-adr" class="form-group form-vcard-adr"> + <div class="form-group"> + <select name="adr_type[]"> + <option value="HOME">{{$home}}</option> + <option value="WORK">{{$work}}</option> + <option value="OTHER">{{$other}}</option> + </select> + <label>{{$adr_label}}</label> + <i data-remove="vcard-adr" data-id="" class="fa fa-trash-o remove-field drop-icons fakelink"></i> + </div> + <div class="form-group"> + <input type="text" name="" value="" placeholder="{{$po_box}}"> + </div> + <div class="form-group"> + <input type="text" name="" value="" placeholder="{{$extra}}"> + </div> + <div class="form-group"> + <input type="text" name="" value="" placeholder="{{$street}}"> + </div> + <div class="form-group"> + <input type="text" name="" value="" placeholder="{{$locality}}"> + </div> + <div class="form-group"> + <input type="text" name="" value="" placeholder="{{$region}}"> + </div> + <div class="form-group"> + <input type="text" name="" value="" placeholder="{{$zip_code}}"> + </div> + <div class="form-group"> + <input type="text" name="" value="" placeholder="{{$country}}"> + </div> +</div> + +<div id="template-form-vcard-note" class="form-group form-vcard-note"> + <label>{{$note_label}}</label> + <i data-remove="vcard-note" data-id="" class="fa fa-trash-o remove-field drop-icons fakelink"></i> + <textarea name="note" class="form-control"></textarea> +</div> + +<div class="generic-content-wrapper"> + <div class="section-title-wrapper"> + <button type="button" class="btn btn-success btn-sm float-right" onclick="openClose('create_form')"><i class="fa fa-plus-circle"></i> {{$add_card}}</button> + <h2>{{$displayname}}</h2> + </div> + <div id="create_form" class="section-content-tools-wrapper"> + <form id="card_form_new" method="post" action=""> + <input type="hidden" name="target" value="{{$id}}"> + <div class="dropdown pull-right"> + <button data-toggle="dropdown" type="button" class="btn btn-outline-secondary btn-sm dropdown-toggle"><i class="fa fa-plus"></i> {{$add_field}}</button> + <div class="dropdown-menu dropdown-menu-right"> + <a class="dropdown-item add-vcard-org add-field" style="display: none" href="#" data-add="vcard-org" data-id="new">{{$org_label}}</a> + <a class="dropdown-item add-vcard-title add-field" style="display: none" href="#" data-add="vcard-title" data-id="new">{{$title_label}}</a> + <a class="dropdown-item add-vcard-tel add-field" href="#" data-add="vcard-tel" data-id="new">{{$tel_label}}</a> + <a class="dropdown-item add-vcard-email add-field" href="#" data-add="vcard-email" data-id="new">{{$email_label}}</a> + <a class="dropdown-item add-vcard-impp add-field" href="#" data-add="vcard-impp" data-id="new">{{$impp_label}}</a> + <a class="dropdown-item add-vcard-url add-field" href="#" data-add="vcard-url" data-id="new">{{$url_label}}</a> + <a class="dropdown-item add-vcard-adr add-field" href="#" data-add="vcard-adr" data-id="new">{{$adr_label}}</a> + <a class="dropdown-item add-vcard-note add-field" href="#" data-add="vcard-note" data-id="new">{{$note_label}}</a> + </div> + </div> + + <div class="vcard-fn-create form-group"> + <div class="form-vcard-fn-wrapper"> + <div class="form-group form-vcard-fn"> + <div class="vcard-nophoto"><i class="fa fa-user"></i></div><input type="text" name="fn" value="" placeholder="{{$name_label}}"> + </div> + </div> + </div> + + <div class="vcard-org form-group"> + <div class="form-vcard-org-wrapper"> + <div class="form-group form-vcard-org"> + <input type="text" name="org" value="" placeholder="{{$org_label}}"> + <i data-remove="vcard-org" data-id="new" class="fa fa-trash-o remove-field drop-icons fakelink"></i> + </div> + </div> + </div> + + <div class="vcard-title form-group"> + <div class="form-vcard-title-wrapper"> + <div class="form-group form-vcard-title"> + <input type="text" name="title" value="" placeholder="{{$title_label}}"> + <i data-remove="vcard-title" data-id="new" class="fa fa-trash-o remove-field drop-icons fakelink"></i> + </div> + </div> + </div> + + <div class="vcard-tel form-group"> + <div class="form-vcard-tel-wrapper"> + <div class="form-group form-vcard-tel"> + <select name="tel_type[]"> + <option value="CELL">{{$mobile}}</option> + <option value="HOME">{{$home}}</option> + <option value="WORK">{{$work}}</option> + <option value="OTHER">{{$other}}</option> + </select> + <input type="text" name="tel[]" value="" placeholder="{{$tel_label}}"> + <i data-remove="vcard-tel" data-id="new" class="fa fa-trash-o remove-field drop-icons fakelink"></i> + </div> + </div> + </div> + + + <div class="vcard-email form-group"> + <div class="form-vcard-email-wrapper"> + <div class="form-group form-vcard-email"> + <select name="email_type[]"> + <option value="HOME">{{$home}}</option> + <option value="WORK">{{$work}}</option> + <option value="OTHER">{{$other}}</option> + </select> + <input type="text" name="email[]" value="" placeholder="{{$email_label}}"> + <i data-remove="vcard-email" data-id="new" class="fa fa-trash-o remove-field drop-icons fakelink"></i> + </div> + </div> + </div> + + <div class="vcard-impp form-group"> + <div class="form-vcard-impp-wrapper"> + </div> + </div> + + <div class="vcard-url form-group"> + <div class="form-vcard-url-wrapper"> + </div> + </div> + + <div class="vcard-adr form-group"> + <div class="form-vcard-adr-wrapper"> + </div> + </div> + + <div class="vcard-note form-group"> + <div class="form-vcard-note-wrapper"> + </div> + </div> + + <button type="submit" name="create" value="create_card" class="btn btn-primary btn-sm pull-right">{{$create}}</button> + <button type="button" class="btn btn-outline-secondary btn-sm" onclick="openClose('create_form')">{{$cancel}}</button> + <div class="clear"></div> + </form> + </div> + + {{foreach $cards as $card}} + <form id="card_form_{{$card.id}}" method="post" action=""> + <input type="hidden" name="target" value="{{$id}}"> + <input type="hidden" name="uri" value="{{$card.uri}}"> + <div class="section-content-wrapper-np"> + <div id="vcard-cancel-{{$card.id}}" class="vcard-cancel vcard-cancel-btn" data-id="{{$card.id}}" data-action="cancel"><i class="fa fa-close"></i></div> + <div id="vcard-add-field-{{$card.id}}" class="dropdown pull-right vcard-add-field"> + <button data-toggle="dropdown" type="button" class="btn btn-outline-secondary btn-sm dropdown-toggle"><i class="fa fa-plus"></i> {{$add_field}}</button> + <div class="dropdown-menu dropdown-menu-right"> + <a class="dropdown-item add-vcard-org add-field"{{if $card.org}} style="display: none"{{/if}} href="#" data-add="vcard-org" data-id="{{$card.id}}">{{$org_label}}</a> + <a class="dropdown-item add-vcard-title add-field"{{if $card.title}} style="display: none"{{/if}} href="#" data-add="vcard-title" data-id="{{$card.id}}">{{$title_label}}</a> + <a class="dropdown-item add-vcard-tel add-field" href="#" data-add="vcard-tel" data-id="{{$card.id}}">{{$tel_label}}</a> + <a class="dropdown-item add-vcard-email add-field" href="#" data-add="vcard-email" data-id="{{$card.id}}">{{$email_label}}</a> + <a class="dropdown-item add-vcard-impp add-field" href="#" data-add="vcard-impp" data-id="{{$card.id}}">{{$impp_label}}</a> + <a class="dropdown-item add-vcard-url add-field" href="#" data-add="vcard-url" data-id="{{$card.id}}">{{$url_label}}</a> + <a class="dropdown-item add-vcard-adr add-field" href="#" data-add="vcard-adr" data-id="{{$card.id}}">{{$adr_label}}</a> + <a class="dropdown-item add-vcard-note add-field"{{if $card.note}} style="display: none"{{/if}} href="#" data-add="vcard-note" data-id="{{$card.id}}">{{$note_label}}</a> + </div> + </div> + <div id="vcard-header-{{$card.id}}" class="vcard-header" data-id="{{$card.id}}" data-action="open"> + {{if $card.photo}}<img class="vcard-photo" src="{{$card.photo}}" width="32px" height="32px">{{else}}<div class="vcard-nophoto"><i class="fa fa-user"></i></div>{{/if}} + <span id="vcard-preview-{{$card.id}}" class="vcard-preview"> + {{if $card.fn}}<span class="vcard-fn-preview">{{$card.fn}}</span>{{/if}} + {{if $card.emails.0.address}}<span class="vcard-email-preview hidden-xs">{{$card.emails.0.address}}</span>{{/if}} + {{if $card.tels.0}}<span class="vcard-tel-preview hidden-xs">{{$card.tels.0.nr}}</span>{{/if}} + </span> + <input id="vcard-fn-{{$card.id}}" class="vcard-fn" type="text" name="fn" value="{{$card.fn}}" size="{{$card.fn|count_characters:true}}" placeholder="{{$name_label}}"> + </div> + </div> + <div id="vcard-info-{{$card.id}}" class="vcard-info section-content-wrapper"> + + <div class="vcard-org form-group"> + <div class="form-vcard-org-wrapper"> + {{if $card.org}} + <div class="form-group form-vcard-org"> + <input type="text" name="org" value="{{$card.org}}" size="{{$card.org|count_characters:true}}" placeholder="{{$org_label}}"> + <i data-remove="vcard-org" data-id="{{$card.id}}" class="fa fa-trash-o remove-field drop-icons fakelink"></i> + </div> + {{/if}} + </div> + </div> + + <div class="vcard-title form-group"> + <div class="form-vcard-title-wrapper"> + {{if $card.title}} + <div class="form-group form-vcard-title"> + <input type="text" name="title" value="{{$card.title}}" size="{{$card.title|count_characters:true}}" placeholder="{{$title_label}}"> + <i data-remove="vcard-title" data-id="{{$card.id}}" class="fa fa-trash-o remove-field drop-icons fakelink"></i> + </div> + {{/if}} + </div> + </div> + + + <div class="vcard-tel form-group"> + <div class="form-vcard-tel-wrapper"> + {{if $card.tels}} + {{foreach $card.tels as $tel}} + <div class="form-group form-vcard-tel"> + <select name="tel_type[]"> + <option value=""{{if $tel.type.0 != 'CELL' && $tel.type.0 != 'HOME' && $tel.type.0 != 'WORK' && $tel.type.0 != 'OTHER'}} selected="selected"{{/if}}>{{$tel.type.1}}</option> + <option value="CELL"{{if $tel.type.0 == 'CELL'}} selected="selected"{{/if}}>{{$mobile}}</option> + <option value="HOME"{{if $tel.type.0 == 'HOME'}} selected="selected"{{/if}}>{{$home}}</option> + <option value="WORK"{{if $tel.type.0 == 'WORK'}} selected="selected"{{/if}}>{{$work}}</option> + <option value="OTHER"{{if $tel.type.0 == 'OTHER'}} selected="selected"{{/if}}>{{$other}}</option> + </select> + <input type="text" name="tel[]" value="{{$tel.nr}}" size="{{$tel.nr|count_characters:true}}" placeholder="{{$tel_label}}"> + <i data-remove="vcard-tel" data-id="{{$card.id}}" class="fa fa-trash-o remove-field drop-icons fakelink"></i> + </div> + {{/foreach}} + {{/if}} + </div> + </div> + + + <div class="vcard-email form-group"> + <div class="form-vcard-email-wrapper"> + {{if $card.emails}} + {{foreach $card.emails as $email}} + <div class="form-group form-vcard-email"> + <select name="email_type[]"> + <option value=""{{if $email.type.0 != 'HOME' && $email.type.0 != 'WORK' && $email.type.0 != 'OTHER'}} selected="selected"{{/if}}>{{$email.type.1}}</option> + <option value="HOME"{{if $email.type.0 == 'HOME'}} selected="selected"{{/if}}>{{$home}}</option> + <option value="WORK"{{if $email.type.0 == 'WORK'}} selected="selected"{{/if}}>{{$work}}</option> + <option value="OTHER"{{if $email.type.0 == 'OTHER'}} selected="selected"{{/if}}>{{$other}}</option> + </select> + <input type="text" name="email[]" value="{{$email.address}}" size="{{$email.address|count_characters:true}}" placeholder="{{$email_label}}"> + <i data-remove="vcard-email" data-id="{{$card.id}}" class="fa fa-trash-o remove-field drop-icons fakelink"></i> + </div> + {{/foreach}} + {{/if}} + </div> + </div> + + <div class="vcard-impp form-group"> + <div class="form-vcard-impp-wrapper"> + {{if $card.impps}} + {{foreach $card.impps as $impp}} + <div class="form-group form-vcard-impp"> + <select name="impp_type[]"> + <option value=""{{if $impp.type.0 != 'HOME' && $impp.type.0 != 'WORK' && $impp.type.0 != 'OTHER'}} selected="selected"{{/if}}>{{$impp.type.1}}</option> + <option value="HOME"{{if $impp.type.0 == 'HOME'}} selected="selected"{{/if}}>{{$home}}</option> + <option value="WORK"{{if $impp.type.0 == 'WORK'}} selected="selected"{{/if}}>{{$work}}</option> + <option value="OTHER"{{if $impp.type.0 == 'OTHER'}} selected="selected"{{/if}}>{{$other}}</option> + </select> + <input type="text" name="impp[]" value="{{$impp.address}}" size="{{$impp.address|count_characters:true}}" placeholder="{{$impp_label}}"> + <i data-remove="vcard-impp" data-id="{{$card.id}}" class="fa fa-trash-o remove-field drop-icons fakelink"></i> + </div> + {{/foreach}} + {{/if}} + </div> + </div> + + <div class="vcard-url form-group"> + <div class="form-vcard-url-wrapper"> + {{if $card.urls}} + {{foreach $card.urls as $url}} + <div class="form-group form-vcard-url"> + <select name="url_type[]"> + <option value=""{{if $url.type.0 != 'HOME' && $url.type.0 != 'WORK' && $url.type.0 != 'OTHER'}} selected="selected"{{/if}}>{{$url.type.1}}</option> + <option value="HOME"{{if $url.type.0 == 'HOME'}} selected="selected"{{/if}}>{{$home}}</option> + <option value="WORK"{{if $url.type.0 == 'WORK'}} selected="selected"{{/if}}>{{$work}}</option> + <option value="OTHER"{{if $url.type.0 == 'OTHER'}} selected="selected"{{/if}}>{{$other}}</option> + </select> + <input type="text" name="url[]" value="{{$url.address}}" size="{{$url.address|count_characters:true}}" placeholder="{{$url_label}}"> + <i data-remove="vcard-url" data-id="{{$card.id}}" class="fa fa-trash-o remove-field drop-icons fakelink"></i> + </div> + {{/foreach}} + {{/if}} + </div> + </div> + + <div class="vcard-adr form-group"> + <div class="form-vcard-adr-wrapper"> + {{if $card.adrs}} + {{foreach $card.adrs as $adr}} + <div class="form-group form-vcard-adr"> + <div class="form-group"> + <label>{{$adr_label}}</label> + <select name="adr_type[]"> + <option value=""{{if $adr.type.0 != 'HOME' && $adr.type.0 != 'WORK' && $adr.type.0 != 'OTHER'}} selected="selected"{{/if}}>{{$adr.type.1}}</option> + <option value="HOME"{{if $adr.type.0 == 'HOME'}} selected="selected"{{/if}}>{{$home}}</option> + <option value="WORK"{{if $adr.type.0 == 'WORK'}} selected="selected"{{/if}}>{{$work}}</option> + <option value="OTHER"{{if $adr.type.0 == 'OTHER'}} selected="selected"{{/if}}>{{$other}}</option> + </select> + <i data-remove="vcard-adr" data-id="{{$card.id}}" class="fa fa-trash-o remove-field drop-icons fakelink"></i> + </div> + <div class="form-group"> + <input type="text" name="adr[{{$adr@index}}][]" value="{{$adr.address.0}}" size="{{$adr.address.0|count_characters:true}}" placeholder="{{$po_box}}"> + </div> + <div class="form-group"> + <input type="text" name="adr[{{$adr@index}}][]" value="{{$adr.address.1}}" size="{{$adr.address.1|count_characters:true}}" placeholder="{{$extra}}"> + </div> + <div class="form-group"> + <input type="text" name="adr[{{$adr@index}}][]" value="{{$adr.address.2}}" size="{{$adr.address.2|count_characters:true}}" placeholder="{{$street}}"> + </div> + <div class="form-group"> + <input type="text" name="adr[{{$adr@index}}][]" value="{{$adr.address.3}}" size="{{$adr.address.3|count_characters:true}}" placeholder="{{$locality}}"> + </div> + <div class="form-group"> + <input type="text" name="adr[{{$adr@index}}][]" value="{{$adr.address.4}}" size="{{$adr.address.4|count_characters:true}}" placeholder="{{$region}}"> + </div> + <div class="form-group"> + <input type="text" name="adr[{{$adr@index}}][]" value="{{$adr.address.5}}" size="{{$adr.address.5|count_characters:true}}" placeholder="{{$zip_code}}"> + </div> + <div class="form-group"> + <input type="text" name="adr[{{$adr@index}}][]" value="{{$adr.address.6}}" size="{{$adr.address.6|count_characters:true}}" placeholder="{{$country}}"> + </div> + </div> + {{/foreach}} + {{/if}} + </div> + </div> + + <div class="vcard-note form-group form-vcard-note"> + <div class="form-vcard-note-wrapper"> + {{if $card.note}} + <label>{{$note_label}}</label> + <i data-remove="vcard-note" data-id="{{$card.id}}" class="fa fa-trash-o remove-field drop-icons fakelink"></i> + <textarea name="note" class="form-control">{{$card.note}}</textarea> + {{/if}} + </div> + </div> + + + <button type="submit" name="update" value="update_card" class="btn btn-primary btn-sm pull-right">{{$update}}</button> + <button type="submit" name="delete" value="delete_card" class="btn btn-danger btn-sm">{{$delete}}</button> + <button type="button" class="btn btn-outline-secondary btn-sm vcard-cancel-btn" data-id="{{$card.id}}" data-action="cancel">{{$cancel}}</button> + <div class="clear"></div> + </div> + </form> + {{/foreach}} +</div> diff --git a/view/tpl/cdav_calendar.tpl b/view/tpl/cdav_calendar.tpl new file mode 100644 index 000000000..5d683d751 --- /dev/null +++ b/view/tpl/cdav_calendar.tpl @@ -0,0 +1,349 @@ +<script> + +var new_event = []; +var new_event_id = Math.random().toString(36).substring(7); +var views = {'month' : '{{$month}}', 'agendaWeek' : '{{$week}}', 'agendaDay' : '{{$day}}', 'listMonth' : '{{$list_month}}', 'listWeek' : '{{$list_week}}', 'listDay' : '{{$list_day}}'}; + +$(document).ready(function() { + $('#calendar').fullCalendar({ + eventSources: [ {{$sources}} ], + + header: false, + eventTextColor: 'white', + + lang: '{{$lang}}', + firstDay: {{$first_day}}, + + monthNames: aStr['monthNames'], + monthNamesShort: aStr['monthNamesShort'], + dayNames: aStr['dayNames'], + dayNamesShort: aStr['dayNamesShort'], + allDayText: aStr['allday'], + + timeFormat: 'HH:mm', + timezone: 'local', + + defaultTimedEventDuration: '01:00:00', + snapDuration: '00:15:00', + + dayClick: function(date, jsEvent, view) { + + if(new_event.length) + $('#calendar').fullCalendar( 'removeEventSource', new_event); + + $('#event_uri').val(''); + $('#id_title').val('New event'); + $('#calendar_select').val($("#calendar_select option:first").val()).attr('disabled', false); + $('#id_dtstart').val(date.format()); + $('#id_dtend').val(date.hasTime() ? date.add(1, 'hours').format() : date.add(1, 'days').format()); + $('#id_description').val(''); + $('#id_location').val(''); + $('#event_submit').val('create_event').html('Create'); + $('#event_delete').hide(); + + new_event = [{ id: new_event_id, title : 'New event', start: $('#id_dtstart').val(), end: $('#id_dtend').val(), editable: true, color: '#bbb' }] + $('#calendar').fullCalendar( 'addEventSource', new_event); + }, + + eventClick: function(event, jsEvent, view) { + + if(event.id == new_event_id) { + $(window).scrollTop(0); + $('.section-content-tools-wrapper, #event_form_wrapper').show(); + $('#recurrence_warning').hide(); + $('#id_title').focus().val(''); + return false; + } + + if($('main').hasClass('fullscreen') && view.type !== 'month' && event.rw) + $('#calendar').fullCalendar('option', 'height', 'auto'); + + if(new_event.length && event.rw) { + $('#calendar').fullCalendar( 'removeEventSource', new_event); + } + + if(!event.recurrent && event.rw) { + var start_clone = moment(event.start); + var noend_allday = start_clone.add(1, 'day').format('YYYY-MM-DD'); + + $(window).scrollTop(0); + $('.section-content-tools-wrapper, #event_form_wrapper').show(); + $('#recurrence_warning').hide(); + $('#id_title').focus(); + + $('#event_uri').val(event.uri); + $('#id_title').val(event.title); + $('#calendar_select').val(event.calendar_id[0] + ':' + event.calendar_id[1]).attr('disabled', true); + $('#id_dtstart').val(event.start.format()); + $('#id_dtend').val(event.end ? event.end.format() : event.start.hasTime() ? '' : noend_allday); + $('#id_description').val(event.description); + $('#id_location').val(event.location); + $('#event_submit').val('update_event').html('Update'); + $('#event_delete').show(); + } + else if(event.recurrent && event.rw) { + $('.section-content-tools-wrapper, #recurrence_warning').show(); + $('#event_form_wrapper').hide(); + $('#event_uri').val(event.uri); + $('#calendar_select').val(event.calendar_id[0] + ':' + event.calendar_id[1]).attr('disabled', true); + } + }, + + eventResize: function(event, delta, revertFunc) { + + $('#id_title').val(event.title); + $('#id_dtstart').val(event.start.format()); + $('#id_dtend').val(event.end.format()); + + $.post( 'cdav/calendar', { + 'update': 'resize', + 'id[]': event.calendar_id, + 'uri': event.uri, + 'dtstart': event.start ? event.start.format() : '', + 'dtend': event.end ? event.end.format() : '' + }) + .fail(function() { + revertFunc(); + }); + }, + + eventDrop: function(event, delta, revertFunc) { + + var start_clone = moment(event.start); + var noend_allday = start_clone.add(1, 'day').format('YYYY-MM-DD'); + + $('#id_title').val(event.title); + $('#id_dtstart').val(event.start.format()); + $('#id_dtend').val(event.end ? event.end.format() : event.start.hasTime() ? '' : noend_allday); + + $.post( 'cdav/calendar', { + 'update': 'drop', + 'id[]': event.calendar_id, + 'uri': event.uri, + 'dtstart': event.start ? event.start.format() : '', + 'dtend': event.end ? event.end.format() : event.start.hasTime() ? '' : noend_allday + }) + .fail(function() { + revertFunc(); + }); + }, + + loading: function(isLoading, view) { + $('#events-spinner').spin('tiny'); + $('#events-spinner > i').css('color', 'transparent'); + if(!isLoading) { + $('#events-spinner').spin(false); + $('#events-spinner > i').css('color', ''); + } + } + }); + + // echo the title + var view = $('#calendar').fullCalendar('getView'); + + $('#title').text(view.title); + + $('#view_selector').html(views[view.name]); + + $('.color-edit').colorpicker({ input: '.color-edit-input' }); + + $(document).on('click','#fullscreen-btn', on_fullscreen); + $(document).on('click','#inline-btn', on_inline); + + $(document).on('click','#event_submit', on_submit); + $(document).on('click','#event_more', on_more); + $(document).on('click','#event_cancel, #event_cancel_recurrent', reset_form); + $(document).on('click','#event_delete, #event_delete_recurrent', on_delete); + +}); + +function changeView(action, viewName) { + $('#calendar').fullCalendar(action, viewName); + var view = $('#calendar').fullCalendar('getView'); + + if($('main').hasClass('fullscreen')) + if(view.name !== 'month') + $('.section-content-tools-wrapper').css('display') === 'none' ? on_fullscreen() : on_inline() ; + else + on_fullscreen(); + else + on_inline(); + + $('#title').text(view.title); + $('#view_selector').html(views[view.name]); +} + +function add_remove_json_source(source, color, editable, status) { + + if(status === undefined) + status = 'fa-calendar-check-o'; + + if(status === 'drop') { + reset_form(); + $('#calendar').fullCalendar( 'removeEventSource', source ); + return; + } + + var parts = source.split('/'); + var id = parts[4]; + + var selector = '#calendar-btn-' + id; + + if($(selector).hasClass('fa-calendar-o')) { + $('#calendar').fullCalendar( 'addEventSource', { url: source, color: color, editable: editable }); + $(selector).removeClass('fa-calendar-o'); + $(selector).addClass(status); + $.get('/cdav/calendar/switch/' + id + '/1'); + } + else { + $('#calendar').fullCalendar( 'removeEventSource', source ); + $(selector).removeClass(status); + $(selector).addClass('fa-calendar-o'); + $.get('/cdav/calendar/switch/' + id + '/0'); + } +} + +function on_fullscreen() { + var view = $('#calendar').fullCalendar('getView'); + if(($('.section-content-tools-wrapper').css('display') === 'none') || ($('.section-content-tools-wrapper').css('display') !== 'none' && view.type === 'month')) + $('#calendar').fullCalendar('option', 'height', $(window).height() - $('.section-title-wrapper').outerHeight(true) - 2); // -2 is for border width (.generic-content-wrapper top and bottom) of .generic-content-wrapper +} + +function on_inline() { + var view = $('#calendar').fullCalendar('getView'); + ((view.type === 'month') ? $('#calendar').fullCalendar('option', 'height', '') : $('#calendar').fullCalendar('option', 'height', 'auto')); +} + +function on_submit() { + $.post( 'cdav/calendar', { + 'submit': $('#event_submit').val(), + 'target': $('#calendar_select').val(), + 'uri': $('#event_uri').val(), + 'title': $('#id_title').val(), + 'dtstart': $('#id_dtstart').val(), + 'dtend': $('#id_dtend').val(), + 'description': $('#id_description').val(), + 'location': $('#id_location').val() + }) + .done(function() { + $('#calendar').fullCalendar( 'refetchEventSources', [ {{$sources}} ] ); + reset_form(); + }); +} + +function on_delete() { + $.post( 'cdav/calendar', { + 'delete': 'delete', + 'target': $('#calendar_select').val(), + 'uri': $('#event_uri').val(), + }) + .done(function() { + $('#calendar').fullCalendar( 'refetchEventSources', [ {{$sources}} ] ); + reset_form(); + }); +} + +function reset_form() { + $('.section-content-tools-wrapper, #event_form_wrapper, #recurrence_warning').hide(); + + $('#event_submit').val(''); + $('#calendar_select').val(''); + $('#event_uri').val(''); + $('#id_title').val(''); + $('#id_dtstart').val(''); + $('#id_dtend').val(''); + + if(new_event.length) + $('#calendar').fullCalendar( 'removeEventSource', new_event); + + if($('#more_block').hasClass('open')) + on_more(); + + if($('main').hasClass('fullscreen')) + on_fullscreen(); +} + +function on_more() { + if($('#more_block').hasClass('open')) { + $('#event_more').html('<i class="fa fa-caret-down"></i> {{$more}}'); + $('#more_block').removeClass('open').hide(); + } + else { + $('#event_more').html('<i class="fa fa-caret-up"></i> {{$less}}'); + $('#more_block').addClass('open').show(); + } +} + +</script> + +<div class="generic-content-wrapper"> + <div class="section-title-wrapper"> + <div class="float-right"> + <div class="dropdown"> + <button id="view_selector" type="button" class="btn btn-outline-secondary btn-sm dropdown-toggle" data-toggle="dropdown"></button> + <div class="dropdown-menu"> + <a class="dropdown-item" href="#" onclick="changeView('changeView', 'month'); return false;">{{$month}}</a></li> + <a class="dropdown-item" href="#" onclick="changeView('changeView', 'agendaWeek'); return false;">{{$week}}</a></li> + <a class="dropdown-item" href="#" onclick="changeView('changeView', 'agendaDay'); return false;">{{$day}}</a></li> + <div class="dropdown-divider"></div> + <a class="dropdown-item" href="#" onclick="changeView('changeView', 'listMonth'); return false;">{{$list_month}}</a></li> + <a class="dropdown-item" href="#" onclick="changeView('changeView', 'listWeek'); return false;">{{$list_week}}</a></li> + <a class="dropdown-item" href="#" onclick="changeView('changeView', 'listDay'); return false;">{{$list_day}}</a></li> + </div> + <div class="btn-group"> + <button class="btn btn-outline-secondary btn-sm" onclick="changeView('prev', false);" title="{{$prev}}"><i class="fa fa-backward"></i></button> + <button id="events-spinner" class="btn btn-outline-secondary btn-sm" onclick="changeView('today', false);" title="{{$today}}"><i class="fa fa-bullseye"></i></button> + <button class="btn btn-outline-secondary btn-sm" onclick="changeView('next', false);" title="{{$next}}"><i class="fa fa-forward"></i></button> + </div> + <button id="fullscreen-btn" type="button" class="btn btn-outline-secondary btn-sm" onclick="makeFullScreen();"><i class="fa fa-expand"></i></button> + <button id="inline-btn" type="button" class="btn btn-outline-secondary btn-sm" onclick="makeFullScreen(false);"><i class="fa fa-compress"></i></button> + </div> + </div> + <h2 id="title"></h2> + <div class="clear"></div> + </div> + <div class="section-content-tools-wrapper" style="display: none"> + <div id="recurrence_warning" style="display: none"> + <div class="section-content-warning-wrapper"> + {{$recurrence_warning}} + </div> + <div> + <button id="event_delete_recurrent" type="button" class="btn btn-danger btn-sm">{{$delete_all}}</button> + <button id="event_cancel_recurrent" type="button" class="btn btn-outline-secondary btn-sm">{{$cancel}}</button> + </div> + </div> + <div id="event_form_wrapper" style="display: none"> + <form id="event_form" method="post" action=""> + <input id="event_uri" type="hidden" name="uri" value=""> + {{include file="field_input.tpl" field=$title}} + <label for="calendar_select">{{$calendar_select_label}}</label> + <select id="calendar_select" name="target" class="form-control form-group"> + {{foreach $writable_calendars as $writable_calendar}} + <option value="{{$writable_calendar.id.0}}:{{$writable_calendar.id.1}}">{{$writable_calendar.displayname}}{{if $writable_calendar.sharer}} ({{$writable_calendar.sharer}}){{/if}}</option> + {{/foreach}} + </select> + <div id="more_block" style="display: none;"> + {{include file="field_input.tpl" field=$dtstart}} + {{include file="field_input.tpl" field=$dtend}} + {{include file="field_textarea.tpl" field=$description}} + {{include file="field_textarea.tpl" field=$location}} + </div> + <div class="form-group"> + <div class="pull-right"> + <button id="event_more" type="button" class="btn btn-outline-secondary btn-sm"><i class="fa fa-caret-down"></i> {{$more}}</button> + <button id="event_submit" type="button" value="" class="btn btn-primary btn-sm"></button> + + </div> + <div> + <button id="event_delete" type="button" class="btn btn-danger btn-sm">{{$delete}}</button> + <button id="event_cancel" type="button" class="btn btn-outline-secondary btn-sm">{{$cancel}}</button> + </div> + <div class="clear"></div> + </div> + </form> + </div> + </div> + <div class="section-content-wrapper-np"> + <div id="calendar"></div> + </div> +</div> diff --git a/view/tpl/cdav_widget_addressbook.tpl b/view/tpl/cdav_widget_addressbook.tpl new file mode 100644 index 000000000..c875dc977 --- /dev/null +++ b/view/tpl/cdav_widget_addressbook.tpl @@ -0,0 +1,66 @@ +<div class="widget"> + <h3>{{$addressbooks_label}}</h3> + {{foreach $addressbooks as $addressbook}} + <div id="addressbook-{{$addressbook.id}}" class="ml-3"> + <div class="form-group"> + <i class="fa fa-user generic-icons"></i><a href="/cdav/addressbook/{{$addressbook.id}}">{{$addressbook.displayname}}</a> + <div class="float-right"> + <i id="edit-icon" class="fa fa-pencil fakelink generic-icons" onclick="openClose('edit-addressbook-{{$addressbook.id}}')"></i> + <a href="/cdav/addressbooks/{{$addressbook.ownernick}}/{{$addressbook.uri}}/?export"><i id="download-icon" class="fa fa-cloud-download fakelink generic-icons"></i></a> + <a href="#" onclick="dropItem('/cdav/addressbook/drop/{{$addressbook.id}}', '#addressbook-{{$addressbook.id}}'); return false;"><i class="fa fa-trash-o drop-icons"></i></a> + </div> + </div> + <div id="edit-addressbook-{{$addressbook.id}}" class="sub-menu" style="display: none;"> + <form id="edit-addressbook-{{$addressbook.id}}" method="post" action=""> + <label for="edit-{{$addressbook.id}}">{{$edit_label}}</label> + <div id="edit-form-{{$addressbook.id}}" class="form-group"> + <input id="id-{{$addressbook.id}}" name="id" type="hidden" value="{{$addressbook.id}}"> + <input id="edit-{{$addressbook.id}}" name="{DAV:}displayname" type="text" value="{{$addressbook.displayname}}" class="form-control"> + </div> + <div class="form-group"> + <button type="submit" name="edit" value="edit" class="btn btn-primary btn-sm">{{$edit}}</button> + </div> + </form> + </div> + </div> + {{/foreach}} +</div> + +<div class="widget"> + <h3>{{$tools_label}}</h3> + <ul class="nav nav-pills flex-column"> + <li class="nav-item"> + <a class="nav-link" href="#" onclick="openClose('create-addressbook'); return false;"><i class="fa fa-user-plus generic-icons"></i> {{$create_label}}</a> + </li> + <div id="create-addressbook" class="sub-menu-wrapper"> + <div class="sub-menu"> + <form method="post" action=""> + <div class="form-group"> + <input id="create" name="{DAV:}displayname" type="text" placeholder="{{$create_placeholder}}" class="form-control form-group"> + <button type="submit" name="create" value="create" class="btn btn-primary btn-sm">{{$create}}</button> + </div> + </form> + </div> + </div> + <li class="nav-item"> + <a class="nav-link" href="#" onclick="openClose('upload-form'); return false;"><i class="fa fa-cloud-upload generic-icons"></i> {{$import_label}}</a> + </li> + <div id="upload-form" class="sub-menu-wrapper"> + <div class="sub-menu"> + <div class="form-group"> + <select id="import" name="target" class="form-control"> + <option value="">{{$import_placeholder}}</option> + {{foreach $addressbooks as $addressbook}} + <option value="{{$addressbook.id}}">{{$addressbook.displayname}}</option> + {{/foreach}} + </select> + </div> + <div class="form-group"> + <input class="form-control-file w-100" id="addressbook-upload-choose" type="file" name="userfile" /> + </div> + <button class="btn btn-primary btn-sm" type="submit" name="a_upload" value="a_upload">{{$upload}}</button> + </form> + </div> + </div> + </ul> +</div> diff --git a/view/tpl/cdav_widget_calendar.tpl b/view/tpl/cdav_widget_calendar.tpl new file mode 100644 index 000000000..ec2257a19 --- /dev/null +++ b/view/tpl/cdav_widget_calendar.tpl @@ -0,0 +1,121 @@ +{{if $my_calendars}} +<div class="widget"> + <h3>{{$my_calendars_label}}</h3> + {{foreach $my_calendars as $calendar}} + <div id="calendar-{{$calendar.calendarid}}"> + <div class="ml-3{{if !$calendar@last}} form-group{{/if}}"> + <i id="calendar-btn-{{$calendar.calendarid}}" class="fa {{if $calendar.switch}}fa-calendar-check-o{{else}}fa-calendar-o{{/if}} generic-icons fakelink" onclick="add_remove_json_source('{{$calendar.json_source}}', '{{$calendar.color}}', {{$calendar.editable}})" style="color: {{$calendar.color}};"></i>{{$calendar.displayname}} + <div class="float-right"> + <i id="edit-icon" class="fa fa-pencil fakelink generic-icons" onclick="openClose('edit-calendar-{{$calendar.calendarid}}')"></i> + <a href="/cdav/calendars/{{$calendar.ownernick}}/{{$calendar.uri}}/?export"><i id="download-icon" class="fa fa-cloud-download fakelink generic-icons"></i></a> + <i id="share-icon" class="fa fa-share-alt fakelink generic-icons" onclick="openClose('share-calendar-{{$calendar.calendarid}}')"></i> + <a href="#" onclick="var drop = dropItem('/cdav/calendar/drop/{{$calendar.calendarid}}/{{$calendar.instanceid}}', '#calendar-{{$calendar.calendarid}}'); if(drop) { add_remove_json_source('{{$calendar.json_source}}', '{{$calendar.color}}', {{$calendar.editable}}, 'drop'); } return false;"><i class="fa fa-trash-o drop-icons"></i></a> + </div> + <div id="share-calendar-{{$calendar.calendarid}}" class="sub-menu" style="display: none; border-color: {{$calendar.color}};"> + {{if $calendar.sharees}} + {{foreach $calendar.sharees as $sharee}} + <div id="sharee-{{$calendar.calendarid}}" class="form-group"> + <i class="fa fa-share generic-icons"></i>{{$sharee.name}} {{$sharee.access}} + <div class="pull-right"> + <a href="#" onclick="dropItem('/cdav/calendar/dropsharee/{{$calendar.calendarid}}/{{$calendar.instanceid}}/{{$sharee.hash}}', '#sharee-{{$calendar.calendarid}}'); return false;"><i class="fa fa-trash-o drop-icons"></i></a> + </div> + </div> + {{/foreach}} + {{/if}} + <form method="post" action=""> + <label for="share-{{$calendar.calendarid}}">{{$share_label}}</label> + <input name="calendarid" type="hidden" value="{{$calendar.calendarid}}"> + <input name="instanceid" type="hidden" value="{{$calendar.instanceid}}"> + <div class="form-group"> + <select id="share-{{$calendar.calendarid}}" name="sharee" class="form-control"> + {{$sharee_options}} + </select> + </div> + <div class="form-group"> + <select name="access" class="form-control"> + {{$access_options}} + </select> + </div> + <div class="form-group"> + <button type="submit" name="share" value="share" class="btn btn-primary btn-sm">{{$share}}</button> + </div> + </form> + </div> + <div id="edit-calendar-{{$calendar.calendarid}}" class="sub-menu" style="display: none; border-color: {{$calendar.color}};"> + <form id="edit-calendar-{{$calendar.calendarid}}" method="post" action="" class="colorpicker-component color-edit"> + <input id="id-{{$calendar.calendarid}}" name="id" type="hidden" value="{{$calendar.calendarid}}:{{$calendar.instanceid}}"> + <input id="color-{{$calendar.calendarid}}" name="color" type="hidden" value="{{$calendar.color}}" class="color-edit-input"> + <label for="edit-form-{{$calendar.calendarid}}">{{$edit_label}}</label> + <div id="edit-form-{{$calendar.calendarid}}" class="input-group form-group"> + <input id="create-{{$calendar.calendarid}}" name="{DAV:}displayname" type="text" value="{{$calendar.displayname}}" class="form-control"> + <span class="input-group-addon"><i></i></span> + </div> + <div class="form-group"> + <button type="submit" name="edit" value="edit" class="btn btn-primary btn-sm">{{$edit}}</button> + </div> + </form> + </div> + </div> + </div> + {{/foreach}} +</div> +{{/if}} + +{{if $shared_calendars}} +<div class="widget"> + <h3>{{$shared_calendars_label}}</h3> + {{foreach $shared_calendars as $calendar}} + <div id="shared-calendar-{{$calendar.calendarid}}" class="ml-3{{if !$calendar@last}} form-group{{/if}}"> + <i id="calendar-btn-{{$calendar.calendarid}}" class="fa {{if $calendar.switch}}{{if $calendar.access == 'read-write'}}fa-calendar-check-o{{else}}fa-calendar-times-o{{/if}}{{else}}fa-calendar-o{{/if}} generic-icons fakelink" onclick="add_remove_json_source('{{$calendar.json_source}}', '{{$calendar.color}}', {{$calendar.editable}}, {{if $calendar.access == 'read-write'}}'fa-calendar-check-o'{{else}}'fa-calendar-times-o'{{/if}})" style="color: {{$calendar.color}};"></i>{{$calendar.displayname}} ({{$calendar.sharer}}) + <div class="pull-right"> + <a href="/cdav/calendars/{{$calendar.ownernick}}/{{$calendar.uri}}/?export"><i id="download-icon" class="fa fa-cloud-download fakelink generic-icons"></i></a> + <a href="#" onclick="var drop = dropItem('/cdav/calendar/drop/{{$calendar.calendarid}}/{{$calendar.instanceid}}', '#shared-calendar-{{$calendar.calendarid}}'); if(drop) { add_remove_json_source('{{$calendar.json_source}}', '{{$calendar.color}}', {{$calendar.editable}}, 'drop'); } return false;"><i class="fa fa-trash-o drop-icons"></i></a> + </div> + </div> + {{/foreach}} +</div> +{{/if}} + +<div class="widget"> + <h3>{{$tools_label}}</h3> + <div class="nav nav-pills flex-column"> + <li class="nav-item"> + <a class="nav-link" href="#" onclick="openClose('create-calendar'); return false;"><i class="fa fa-calendar-plus-o generic-icons"></i> {{$create_label}}</a> + </li> + <div id="create-calendar" class="sub-menu-wrapper"> + <div class="sub-menu"> + <form method="post" action="" class="colorpicker-component color-edit"> + <input id="color" name="color" type="hidden" value="#3a87ad" class="color-edit-input"> + <div id="create-form" class="input-group form-group"> + <input id="create" name="{DAV:}displayname" type="text" placeholder="{{$create_placeholder}}" class="form-control"> + <span class="input-group-addon"><i></i></span> + </div> + <div class="form-group"> + <button type="submit" name="create" value="create" class="btn btn-primary btn-sm">{{$create}}</button> + </div> + </form> + </div> + </div> + <li class="nav-item"> + <a class="nav-link" href="#" onclick="openClose('upload-form'); return false;"><i class="fa fa-cloud-upload generic-icons"></i> {{$import_label}}</a> + </li> + <div id="upload-form" class="sub-menu-wrapper"> + <div class="sub-menu"> + <form enctype="multipart/form-data" method="post" action=""> + <div class="form-group"> + <select id="import" name="target" class="form-control"> + <option value="">{{$import_placeholder}}</option> + {{foreach $writable_calendars as $writable_calendar}} + <option value="{{$writable_calendar.id.0}}:{{$writable_calendar.id.1}}">{{$writable_calendar.displayname}}</option> + {{/foreach}} + </select> + </div> + <div class="form-group"> + <input class="form-control-file w-100" id="event-upload-choose" type="file" name="userfile" /> + </div> + <button class="btn btn-primary btn-sm" type="submit" name="c_upload" value="c_upload">{{$upload}}</button> + </form> + </div> + </div> + </div> +</div> diff --git a/view/tpl/diaspora_vcard.tpl b/view/tpl/diaspora_vcard.tpl deleted file mode 100644 index 017eb555c..000000000 --- a/view/tpl/diaspora_vcard.tpl +++ /dev/null @@ -1,69 +0,0 @@ -<div style="display:none;"> - <dl class="entity_uid"> - <dt>Uid</dt> - <dd> - <span class="uid p-uid">{{$diaspora.guid}}</span> - </dd> - </dl> - <dl class='entity_nickname'> - <dt>Nickname</dt> - <dd> - <span class="nickname p-nickname">{{$diaspora.nickname}}</span> - </dd> - </dl> - <dl class='entity_full_name'> - <dt>Full name</dt> - <dd> - <span class='fn p-name'>{{$diaspora.fullname}}</span> - </dd> - </dl> - - <dl class='entity_first_name'> - <dt>First name</dt> - <dd> - <span class='given_name p-given-name'>{{$diaspora.firstname}}</span> - </dd> - </dl> - <dl class='entity_family_name'> - <dt>Family name</dt> - <dd> - <span class='family_name p-family-name'>{{$diaspora.lastname}}</span> - </dd> - </dl> - <dl class="entity_url"> - <dt>URL</dt> - <dd> - <a href="{{$diaspora.podloc}}/" id="pod_location" class="url" rel="me" >{{$diaspora.podloc}}/</a> - </dd> - </dl> - <dl class="entity_photo"> - <dt>Photo</dt> - <dd> - <img class="photo u-photo avatar" height="300" width="300" src="{{$diaspora.photo300}}" /> - </dd> - </dl> - <dl class="entity_photo_medium"> - <dt>Photo</dt> - <dd> - <img class="photo u-photo avatar" height="100" width="100" src="{{$diaspora.photo100}}" /> - </dd> - </dl> - <dl class="entity_photo_small"> - <dt>Photo</dt> - <dd> - <img class="photo u-photo avatar" height="50" width="50" src="{{$diaspora.photo50}}" /> - </dd> - </dl> - <dl class="entity_searchable"> - <dt>Searchable</dt> - <dd> - <span class="searchable">{{$diaspora.searchable}}</span> - </dd> - </dl> - <dl class="entity_key"> - <dt>Key</dt> - <dd> - <pre class="key">{{$diaspora.pubkey}}</pre> - </dd> - </dl> -</div> diff --git a/view/tpl/install_settings.tpl b/view/tpl/install_settings.tpl index f7a0108a8..62dcbb8b3 100755 --- a/view/tpl/install_settings.tpl +++ b/view/tpl/install_settings.tpl @@ -19,7 +19,6 @@ {{include file="field_input.tpl" field=$adminmail}} {{include file="field_input.tpl" field=$siteurl}} -{{include file="field_select.tpl" field=$server_role}} {{include file="field_select_grouped.tpl" field=$timezone}} diff --git a/view/tpl/item_binary.tpl b/view/tpl/item_binary.tpl new file mode 100644 index 000000000..b19f7e7dd --- /dev/null +++ b/view/tpl/item_binary.tpl @@ -0,0 +1,3 @@ +<p> +<center><a class="zrl" href="{{$url}}"><button class="btn btn-warning fakelink">{{$download}}</button></a></center> +</p> diff --git a/view/tpl/profile_vcard.tpl b/view/tpl/profile_vcard.tpl index 9bd534fd8..c17a7878c 100755 --- a/view/tpl/profile_vcard.tpl +++ b/view/tpl/profile_vcard.tpl @@ -49,9 +49,6 @@ {{if $homepage}}<dl class="homepage"><dt class="homepage-label">{{$homepage}}</dt><dd class="homepage-url u-url">{{$profile.homepage}}</dd></dl>{{/if}} - {{if $diaspora}} - {{include file="diaspora_vcard.tpl"}} - {{/if}} </div> <div id="clear"></div> diff --git a/view/tpl/profile_vcard_short.tpl b/view/tpl/profile_vcard_short.tpl index 0984a4e5f..5d87d52c6 100755 --- a/view/tpl/profile_vcard_short.tpl +++ b/view/tpl/profile_vcard_short.tpl @@ -30,10 +30,6 @@ {{if $homepage}}<dl class="homepage"><dt class="homepage-label">{{$homepage}}</dt><dd class="homepage-url">{{$profile.homepage}}</dd></dl>{{/if}} - {{if $diaspora}} - {{include file="diaspora_vcard.tpl"}} - {{/if}} - <div id="clear"></div> {{$chanmenu}} |