diff options
Diffstat (limited to 'view')
71 files changed, 1134 insertions, 740 deletions
diff --git a/view/css/conversation.css b/view/css/conversation.css index 88081c2c6..f299ad719 100644 --- a/view/css/conversation.css +++ b/view/css/conversation.css @@ -115,6 +115,14 @@ position: relative; } +.wall-item-photo-group-actor { + position: absolute; + right: 3px; + top: 0px; + color: #fff; + text-shadow: 1px 1px 3px rgba(0, 0, 0, .5); +} + .wall-item-photo-caret { position: absolute; left: 3px; @@ -228,12 +236,14 @@ a.wall-item-name-link { line-height: 1; height: 2rem; resize: none; + overflow: hidden; } .comment-edit-text.expanded { line-height: 1.25; height: 7rem; resize: vertical; + overflow: auto; } .comment-tools, diff --git a/view/css/mod_connections.css b/view/css/mod_connections.css index 4c26193b4..6a83367b8 100644 --- a/view/css/mod_connections.css +++ b/view/css/mod_connections.css @@ -1,17 +1,8 @@ +#contacts-follow-form, #contacts-search-form { display: none; } -.section-subtitle-wrapper .btn-xs { - margin-top: -2px; -} - -.contact-search { - height: 22px; - border-top-right-radius: 0px; - border-bottom-right-radius: 0px; -} - .directory-photo-img.archived { opacity: 0.3; filter:alpha(opacity=30); @@ -39,7 +30,8 @@ } .contact-photo-wrapper .oneway-overlay { - margin-top: -25px; - margin-left: 53px; - font-size: 20px; + margin-top: -18px; + margin-left: 62px; + font-size: 1.2rem; + display: inherit; /* this is required for chromium */ } diff --git a/view/css/mod_profile_photo.css b/view/css/mod_profile_photo.css index 1b7e15194..3b5f7f321 100644 --- a/view/css/mod_profile_photo.css +++ b/view/css/mod_profile_photo.css @@ -12,9 +12,5 @@ } #profile-photo-wrapper { - height: 300px; - width: 300px; - max-width: 300px; - max-height: 300px; overflow: hidden; } diff --git a/view/css/widgets.css b/view/css/widgets.css index b78725919..0a091272c 100644 --- a/view/css/widgets.css +++ b/view/css/widgets.css @@ -243,10 +243,9 @@ a.wikilist { /* contact block */ .contact-block-div .oneway-overlay { - font-size: 20px; - margin-left: -25px; - margin-top: 25px; - opacity: 0.8; + font-size: .9rem; + margin-left: -1rem; + margin-top: 1.9rem; } #cid-filter-wrapper { diff --git a/view/en/invite.casual.tpl b/view/en/invite.casual.tpl index 4fd031c63..f2a3b2330 100644 --- a/view/en/invite.casual.tpl +++ b/view/en/invite.casual.tpl @@ -2,14 +2,14 @@ Please join my community on {{$projectname}}. {{$linktxt}} {{$invite_where}} -You will need to supply this invitation code: +You will need to supply this invitation code: {{$invite_code}} Or: -1. Register at any {{$projectname}} location +1. Register at any {{$projectname}} location (they are all inter-connected). -2. Enter my {{$Projectname}} network address into the site searchbar. +2. Enter my {{$projectname}} network address into the site searchbar. {{$invite_whereami}} or visit {{$invite_whoami}} 3. Click [Connect] diff --git a/view/js/main.js b/view/js/main.js index d3f4eff9a..f7709f9d1 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -178,7 +178,7 @@ $(document).ready(function() { path = 'hq'; } - if(notify_id != null) { + if(notify_id) { $.ajax({ type: 'post', url: 'notify', @@ -525,11 +525,14 @@ function showHideComments(id) { } } -function openClose(theID) { - if(document.getElementById(theID).style.display == "block") { +function openClose(theID, display) { + if (typeof display == typeof undefined) + display = 'block'; + + if(document.getElementById(theID).style.display == display) { document.getElementById(theID).style.display = "none"; } else { - document.getElementById(theID).style.display = "block"; + document.getElementById(theID).style.display = display; } } @@ -541,9 +544,11 @@ function openCloseTR(theID) { } } -function closeOpen(theID) { +function closeOpen(theID, display) { + if (typeof display == typeof undefined) + display = 'block'; if(document.getElementById(theID).style.display == "none") { - document.getElementById(theID).style.display = "block"; + document.getElementById(theID).style.display = display; } else { document.getElementById(theID).style.display = "none"; } @@ -994,7 +999,7 @@ function liveUpdate(notify_id) { // else data was valid - reset the recursion counter liveRecurse = 0; - if(typeof notify_id !== 'undefined' && notify_id !== 'undefined') { + if(notify_id) { $.post( "notify", { @@ -1158,8 +1163,18 @@ function dolike(ident, verb) { if(typeof page_mode == typeof undefined) page_mode = ''; - $.get('like/' + ident.toString() + '?verb=' + verb + '&conv_mode=' + conv_mode + '&page_mode=' + page_mode, function (data) { + var reload = ''; + if(module == 'photos') + reload = 1; + + $.get('like/' + ident.toString() + '?verb=' + verb + '&conv_mode=' + conv_mode + '&page_mode=' + page_mode + '&reload=' + reload, function (data) { if(data.success) { + + // mod photos + if (data.reload) { + window.location.href = window.location.href; + } + // this is a bit tricky since the top level thread wrapper wraps the whole thread if($('#thread-wrapper-' + data.orig_id).hasClass('toplevel_item')) { var wrapper = $('<div></div>').html( data.html ).find('#wall-item-outside-wrapper-' + data.id); @@ -1381,7 +1396,14 @@ function post_comment(id) { "item", form_data + '&conv_mode=' + conv_mode, function(data) { - if(data.success) { + if (data.success) { + + //mod photos + if (data.reload) { + window.location.href = data.reload; + } + + localStorage.removeItem("comment_body-" + id); $("#comment-edit-preview-" + id).hide(); $("#comment-edit-text-" + id).val('').blur().attr('placeholder', aStr.comment); @@ -1392,7 +1414,7 @@ function post_comment(id) { commentBusy = false; var tarea = document.getElementById("comment-edit-text-" + id); - if(tarea) { + if (tarea) { commentClose(tarea, id); $(document).off( "click.commentOpen"); } diff --git a/view/js/mod_connections.js b/view/js/mod_connections.js index db18e078d..848e9ed9f 100644 --- a/view/js/mod_connections.js +++ b/view/js/mod_connections.js @@ -1,5 +1,5 @@ $(document).ready(function() { $("#contacts-search").contact_autocomplete(baseurl + '/acl', 'a', true); $(".autotime").timeago(); -}); +}); diff --git a/view/nl/register_verify_eml.tpl b/view/nl/register_verify_eml.tpl index e4be9551a..6cf222794 100644 --- a/view/nl/register_verify_eml.tpl +++ b/view/nl/register_verify_eml.tpl @@ -1,18 +1,18 @@ -{{$sitename}} heeft een nieuwe accountregistratie ontvangen die jouw goedkeuring -nodig heeft. +{{$sitename}} heeft een nieuwe accountregistratie ontvangen die jouw goedkeuring +nodig heeft. De inloggegevens zijn als volgt: Hub: {{$siteurl}} Inlognaam: {{$email}} -IP-adres: +IP-adres: {{$details}} Om dit verzoek goed te keuren bezoek je de volgende link: -{{$siteurl}}/regmod/allow/{{$hash}} +{{$siteurl}}/regmod/allow/{{$hash}} Om dit verzoek af te keuren en het account te verwijderen bezoek je: diff --git a/view/nl/register_verify_member.tpl b/view/nl/register_verify_member.tpl index 12afdd32d..97869909a 100644 --- a/view/nl/register_verify_member.tpl +++ b/view/nl/register_verify_member.tpl @@ -10,15 +10,23 @@ Log in met het wachtwoord die je tijdens het registreren hebt gekozen. Wij dienen jouw e-mailadres te verifiëren om je volledig toegang te kunnen geven. -Wanneer jij dit account hebt aangemaakt, bezoek dan de volgende link: +Jouw verificatie token is -{{$siteurl}}/regver/allow/{{$hash}} +{{$hash}} +{{if $timeframe}} +Dit token is geldig van {{$timeframe.0}} UTC tot {{$timeframe.1}} UTC -Om de registratie van dit account te annuleren en deze te verwijderen bezoek je: +{{/if}} + +Wanneer jij dit account hebt aangemaakt, vul dan de verificatie token in wanneer daarom wordt gevraagd of ga naar de volgende link: + +{{$siteurl}}/regate/{{$mail}} -{{$siteurl}}/regver/deny/{{$hash}} +Om de registratie van dit account te annuleren en deze te verwijderen bezoek je: + +{{$siteurl}}/regate/{{$mail}}{{if $ko}}/{{$ko}}{{/if}} Bedankt diff --git a/view/pdl/mod_articles.pdl b/view/pdl/mod_articles.pdl index 3e77ced4c..490917358 100644 --- a/view/pdl/mod_articles.pdl +++ b/view/pdl/mod_articles.pdl @@ -1,4 +1,5 @@ [region=aside] +[widget=profile][/widget] [widget=archive][var=articles]1[/var][/widget] [widget=categories][var=articles]1[/var][/widget] [widget=tasklist][/widget] diff --git a/view/pdl/mod_cal.pdl b/view/pdl/mod_cal.pdl index 7e15fc869..d7e5d29f3 100644 --- a/view/pdl/mod_cal.pdl +++ b/view/pdl/mod_cal.pdl @@ -1,5 +1,5 @@ [region=aside] -[widget=fullprofile][/widget] +[widget=profile][/widget] [/region] [region=right_aside] [widget=notifications][/widget] diff --git a/view/pdl/mod_cards.pdl b/view/pdl/mod_cards.pdl index f0403e380..fd08121fc 100644 --- a/view/pdl/mod_cards.pdl +++ b/view/pdl/mod_cards.pdl @@ -1,4 +1,5 @@ [region=aside] +[widget=profile][/widget] [widget=categories][var=cards]1[/var][/widget] [widget=tasklist][/widget] [widget=notes][/widget] diff --git a/view/pdl/mod_chat.pdl b/view/pdl/mod_chat.pdl index 808ba3d5a..8a79b4b12 100644 --- a/view/pdl/mod_chat.pdl +++ b/view/pdl/mod_chat.pdl @@ -1,5 +1,5 @@ [region=aside] -[widget=vcard][/widget] +[widget=profile][/widget] [widget=chatroom_list][/widget] [widget=bookmarkedchats][/widget] [widget=suggestedchats][/widget] diff --git a/view/pdl/mod_cloud.pdl b/view/pdl/mod_cloud.pdl index 44ef1e4fc..7f40e7ea0 100644 --- a/view/pdl/mod_cloud.pdl +++ b/view/pdl/mod_cloud.pdl @@ -1,5 +1,5 @@ [region=aside] -[widget=vcard][/widget] +[widget=profile][/widget] [widget=categories][var=files]1[/var][/widget] [/region] [region=right_aside] diff --git a/view/pdl/mod_connections.pdl b/view/pdl/mod_connections.pdl index b777cada5..3c3dfd313 100644 --- a/view/pdl/mod_connections.pdl +++ b/view/pdl/mod_connections.pdl @@ -1,7 +1,4 @@ [region=aside] -[widget=follow][/widget] -[widget=collections][var=mode][connections[/arg][/widget] -[widget=suggestions][/widget] [widget=findpeople][/widget] [/region] [region=right_aside] diff --git a/view/pdl/mod_connedit.pdl b/view/pdl/mod_connedit.pdl index 4bdadb5e8..a5461df50 100644 --- a/view/pdl/mod_connedit.pdl +++ b/view/pdl/mod_connedit.pdl @@ -1,8 +1,5 @@ [region=aside] [widget=vcard][/widget] -[widget=collections][var=mode]abook[/var][/widget] -[widget=suggestions][/widget] -[widget=findpeople][/widget] [/region] [region=right_aside] [widget=notifications][/widget] diff --git a/view/pdl/mod_directory.pdl b/view/pdl/mod_directory.pdl index 2e408c29f..3840691b4 100644 --- a/view/pdl/mod_directory.pdl +++ b/view/pdl/mod_directory.pdl @@ -2,7 +2,6 @@ [widget=findpeople][/widget] [widget=dirsort][/widget] [widget=dirtags][/widget] -[widget=suggestions][/widget] [/region] [region=right_aside] [widget=notifications][/widget] diff --git a/view/pdl/mod_group.pdl b/view/pdl/mod_group.pdl index 34eb7ddd1..749ede18c 100644 --- a/view/pdl/mod_group.pdl +++ b/view/pdl/mod_group.pdl @@ -1,5 +1,5 @@ [region=aside] -[widget=collections][var=mode]groups[/var][/widget] +[widget=privacygroups][/widget] [/region] [region=right_aside] [widget=notifications][/widget] diff --git a/view/pdl/mod_import_items.pdl b/view/pdl/mod_import_items.pdl new file mode 100644 index 000000000..e657fa88b --- /dev/null +++ b/view/pdl/mod_import_items.pdl @@ -0,0 +1,3 @@ +[region=right_aside] +[widget=notifications][/widget] +[/region] diff --git a/view/pdl/mod_network.pdl b/view/pdl/mod_network.pdl index cac3fc27e..231f08e74 100644 --- a/view/pdl/mod_network.pdl +++ b/view/pdl/mod_network.pdl @@ -2,7 +2,6 @@ [widget=activity_order][/widget] [widget=activity_filter][/widget] [widget=savedsearch][/widget] -[widget=suggestions][/widget] [/region] [region=content] diff --git a/view/pdl/mod_message.pdl b/view/pdl/mod_permcats.pdl index 3f1dd594f..bc6c89920 100644 --- a/view/pdl/mod_message.pdl +++ b/view/pdl/mod_permcats.pdl @@ -1,5 +1,5 @@ [region=aside] -[widget=mailmenu][/widget] +[widget=permcats][/widget] [/region] [region=right_aside] [widget=notifications][/widget] diff --git a/view/pdl/mod_photos.pdl b/view/pdl/mod_photos.pdl index 6a3d30b1c..bdcc087f3 100644 --- a/view/pdl/mod_photos.pdl +++ b/view/pdl/mod_photos.pdl @@ -1,5 +1,5 @@ [region=aside] -[widget=vcard][/widget] +[widget=profile][/widget] [widget=photo_albums][/widget] [/region] [region=right_aside] diff --git a/view/pdl/mod_profperm.pdl b/view/pdl/mod_profperm.pdl index 7e15fc869..d7e5d29f3 100644 --- a/view/pdl/mod_profperm.pdl +++ b/view/pdl/mod_profperm.pdl @@ -1,5 +1,5 @@ [region=aside] -[widget=fullprofile][/widget] +[widget=profile][/widget] [/region] [region=right_aside] [widget=notifications][/widget] diff --git a/view/pdl/mod_mail.pdl b/view/pdl/mod_tokens.pdl index d572b7244..97bdc3ab4 100644 --- a/view/pdl/mod_mail.pdl +++ b/view/pdl/mod_tokens.pdl @@ -1,6 +1,5 @@ [region=aside] -[widget=mailmenu][/widget] -[widget=conversations][/widget] +[widget=tokens][/widget] [/region] [region=right_aside] [widget=notifications][/widget] diff --git a/view/pdl/mod_viewconnections.pdl b/view/pdl/mod_viewconnections.pdl index 7e15fc869..d7e5d29f3 100644 --- a/view/pdl/mod_viewconnections.pdl +++ b/view/pdl/mod_viewconnections.pdl @@ -1,5 +1,5 @@ [region=aside] -[widget=fullprofile][/widget] +[widget=profile][/widget] [/region] [region=right_aside] [widget=notifications][/widget] diff --git a/view/pdl/mod_wiki.pdl b/view/pdl/mod_wiki.pdl index be86be7e3..db8faa0d9 100644 --- a/view/pdl/mod_wiki.pdl +++ b/view/pdl/mod_wiki.pdl @@ -1,5 +1,5 @@ [region=aside] -[widget=vcard][/widget] +[widget=profile][/widget] [widget=wiki_pages][/widget] [/region] [region=right_aside] diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 346e46c6b..cea9b8ae5 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -24,15 +24,15 @@ body { aside#region_1 { border-right: 1px solid transparent; - width: $left_aside_widthpx; - min-width: $left_aside_widthpx; - max-width: $left_aside_widthpx; + width: $left_aside_widthrem; + min-width: $left_aside_widthrem; + max-width: $left_aside_widthrem; } aside#region_3 { - width: $right_aside_widthpx; - min-width: $left_aside_widthpx; - max-width: $right_aside_widthpx; + width: $right_aside_widthrem; + min-width: $left_aside_widthrem; + max-width: $right_aside_widthrem; } aside#left_aside_wrapper, @@ -43,13 +43,13 @@ aside#right_aside_wrapper { main { margin-left: auto; margin-right: auto; - max-width: $main_widthpx; + max-width: $main_widthrem; } #overlay { position: fixed; top: 0; - left: $left_aside_widthpx; + left: $left_aside_widthrem; width: 100vw; height: 100vh; background: rgba(0, 0, 0, .3); @@ -397,55 +397,26 @@ footer { .fn { font-weight: bold; font-size: 1rem; - color: #444444; } -.vcard { - margin-bottom: 10px; - padding: 0px 10px 10px 10px; +.vcard-card { background-color: rgba(254,254,254,0.5); - border: 1px solid rgba(254,254,254,0.5); - border-radius: $radius; - word-wrap: break-word; } -.vcard dl, -.vcard .title { - margin-top: 10px; - margin-bottom: 0px; -} - -.connect-btn-wrapper { - margin-bottom: 10px; - +.vcard { + word-wrap: break-word; } .profile-edit-side-link { - padding: 3px 0px; opacity: 0; - filter:alpha(opacity=30); - float: right; + filter:alpha(opacity=0); } -.vcard:hover .profile-edit-side-link { +.card:hover .profile-edit-side-link { opacity: 1; filter:alpha(opacity=100); } -#profile-photo-wrapper img { - width: 100%; - height: 100%; - max-width: 300px; - max-height: 300px; -} - -#profile-photo-wrapper { - width: 251px; - height: 251px; - margin-bottom: 10px; - border-radius: $radius; -} - #hide-friends-yes-label, #hide-friends-no-label { margin-left: 125px; @@ -571,8 +542,8 @@ footer { } .contact-block-img { - width:47px; - height:47px; + width: 2.95rem; + height: 2.95rem; margin-bottom: 3px; } @@ -1191,7 +1162,6 @@ img.mail-conv-sender-photo { .widget { background-color: rgba(254,254,254,.5); - border: 1px solid rgba(254,254,254,.5); border-radius: $radius; } @@ -1247,24 +1217,24 @@ img.mail-conv-sender-photo { } .menu-img-3 { - width: 3.3em; - height: 3.3em; + width: 2.7rem; + height: 2.7rem; margin-right: 5px; border-radius: $radius; float: left; } .menu-img-2 { - height: 2.2em; - width: 2.2em; + height: 1.8rem; + width: 1.8rem; margin-right: 5px; border-radius: $radius; float: left; } .menu-img-1 { - height: 1.28571429em; - width: 1.28571429em; + height: 1.1rem; + width: 1.1rem; border-radius: $radius; } @@ -1530,8 +1500,8 @@ blockquote { } main { - left: -$left_aside_widthpx; - width: calc( 100% + $left_aside_widthpx ); + left: -$left_aside_widthrem; + width: calc( 100% + $left_aside_widthrem ); } main.region_1-on { @@ -1700,7 +1670,7 @@ dl.bb-dl > dd > li { .onoffswitch.checkbox > div > input:checked + label .onoffswitch-switch { right: 0px; - background-color: #0275d8; + background-color: $link_colour; } @@ -1808,7 +1778,7 @@ dl.bb-dl > dd > li { .oneway-overlay { position: absolute; - text-shadow: -2px 0 1px #fff, 0 2px 1px#fff, 2px 0 1px #fff, 0 -2px 1px #fff; + text-shadow: -1px 0 1px #fff, 0 1px 1px#fff, 1px 0 1px #fff, 0 -1px 1px #fff; } .cover-photo-review { diff --git a/view/theme/redbasic/php/config.php b/view/theme/redbasic/php/config.php index 0a779529d..0de475fe5 100644 --- a/view/theme/redbasic/php/config.php +++ b/view/theme/redbasic/php/config.php @@ -32,7 +32,7 @@ class RedbasicConfig { } function get() { - if(! local_channel()) { + if(! local_channel()) { return; } @@ -59,7 +59,7 @@ class RedbasicConfig { } function post() { - if(!local_channel()) { + if(!local_channel()) { return; } @@ -89,7 +89,7 @@ class RedbasicConfig { if(get_pconfig(local_channel(), 'redbasic', 'advanced_theming')) $expert = 1; - + $o .= replace_macros(get_markup_template('theme_settings.tpl'), array( '$submit' => t('Submit'), '$baseurl' => z_root(), @@ -98,19 +98,19 @@ class RedbasicConfig { '$title' => t("Theme settings"), '$narrow_navbar' => array('redbasic_narrow_navbar',t('Narrow navbar'),$arr['narrow_navbar'], '', array(t('No'),t('Yes'))), '$nav_bg' => array('redbasic_nav_bg', t('Navigation bar background color'), $arr['nav_bg']), - '$nav_icon_colour' => array('redbasic_nav_icon_colour', t('Navigation bar icon color '), $arr['nav_icon_colour']), + '$nav_icon_colour' => array('redbasic_nav_icon_colour', t('Navigation bar icon color '), $arr['nav_icon_colour']), '$nav_active_icon_colour' => array('redbasic_nav_active_icon_colour', t('Navigation bar active icon color '), $arr['nav_active_icon_colour']), '$link_colour' => array('redbasic_link_colour', t('Link color'), $arr['link_colour'], '', $link_colours), '$banner_colour' => array('redbasic_banner_colour', t('Set font-color for banner'), $arr['banner_colour']), '$bgcolour' => array('redbasic_background_colour', t('Set the background color'), $arr['bgcolour']), - '$background_image' => array('redbasic_background_image', t('Set the background image'), $arr['background_image']), + '$background_image' => array('redbasic_background_image', t('Set the background image'), $arr['background_image']), '$item_colour' => array('redbasic_item_colour', t('Set the background color of items'), $arr['item_colour']), '$comment_item_colour' => array('redbasic_comment_item_colour', t('Set the background color of comments'), $arr['comment_item_colour']), '$font_size' => array('redbasic_font_size', t('Set font-size for the entire application'), $arr['font_size'], t('Examples: 1rem, 100%, 16px')), '$font_colour' => array('redbasic_font_colour', t('Set font-color for posts and comments'), $arr['font_colour']), '$radius' => array('redbasic_radius', t('Set radius of corners'), $arr['radius'], t('Example: 4px')), '$shadow' => array('redbasic_shadow', t('Set shadow depth of photos'), $arr['shadow']), - '$converse_width' => array('redbasic_converse_width',t('Set maximum width of content region in pixel'),$arr['converse_width'], t('Leave empty for default width')), + '$converse_width' => array('redbasic_converse_width',t('Set maximum width of content region in rem'),$arr['converse_width'], t('Leave empty for default width')), '$top_photo' => array('redbasic_top_photo', t('Set size of conversation author photo'), $arr['top_photo']), '$reply_photo' => array('redbasic_reply_photo', t('Set size of followup author photos'), $arr['reply_photo']), '$advanced_theming' => ['redbasic_advanced_theming', t('Show advanced settings'), $arr['advanced_theming'], '', [t('No'), t('Yes')]] diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php index 3ea94f9aa..9cb835ec6 100644 --- a/view/theme/redbasic/php/style.php +++ b/view/theme/redbasic/php/style.php @@ -75,7 +75,7 @@ if ((!$schema) || ($schema == '---')) { if (! $nav_bg) $nav_bg = '#343a40'; if (! $nav_icon_colour) - $nav_icon_colour = 'rgba(255, 255, 255, 0.5)'; + $nav_icon_colour = 'rgba(255, 255, 255, 0.55)'; if (! $nav_active_icon_colour) $nav_active_icon_colour = 'rgba(255, 255, 255, 0.75)'; if (! $link_colour) @@ -101,7 +101,7 @@ if (! $radius) if (! $shadow) $shadow = '0'; if (! $converse_width) - $converse_width = '790'; + $converse_width = '52'; //unit: rem if(! $top_photo) $top_photo = '2.3rem'; if(! $reply_photo) @@ -120,13 +120,13 @@ if(file_exists('view/theme/redbasic/css/style.css')) { $x .= $schemecss; } - $left_aside_width = 288; - $right_aside_width = 288; + $left_aside_width = 21; //unit: rem + $right_aside_width = 21; //unit: rem $main_width = $left_aside_width + $right_aside_width + intval($converse_width); // prevent main_width smaller than 768px - $main_width = (($main_width < 768) ? 768 : $main_width); + $main_width = (($main_width < 30) ? 30 : $main_width); $options = array ( '$nav_bg' => $nav_bg, diff --git a/view/theme/redbasic/php/theme.php b/view/theme/redbasic/php/theme.php index 3c07e1582..783bd9d4e 100644 --- a/view/theme/redbasic/php/theme.php +++ b/view/theme/redbasic/php/theme.php @@ -3,12 +3,14 @@ /** * * Name: Redbasic * * Description: Hubzilla standard theme - * * Version: 2.1 - * * MinVersion: 5.9 - * * MaxVersion: 7.0 + * * Version: 2.2 + * * MinVersion: 6.5.13 + * * MaxVersion: 8.0 * * Author: Fabrixxm * * Maintainer: Mike Macgirvin * * Maintainer: Mario Vavti + * * Theme_Color: #343a40 + * * Background_Color: rgb(254,254,254) */ function redbasic_init(&$a) { diff --git a/view/theme/redbasic/schema/Focus-Boxy.css b/view/theme/redbasic/schema/Focus-Boxy.css index b9b259796..90fd51b02 100644 --- a/view/theme/redbasic/schema/Focus-Boxy.css +++ b/view/theme/redbasic/schema/Focus-Boxy.css @@ -3,13 +3,31 @@ } .wall-item-content-wrapper.comment { - border-bottom: 1px solid #dee2e6; + border-bottom: 1px solid rgba(0,0,0,.125); } .widget { - border: 1px solid #dee2e6; + border: 1px solid rgba(0,0,0,.125); } #note-text { border: 1px solid transparent; } + +.vcard-card { + border: 1px solid rgba(0,0,0,.125); + border-bottom: 0; +} + +.vcard-card .card { + border-top: 0; + border-right: 0; + border-left: 0; +} + +.vcard-card .vcard { + border: 1px solid rgba(0,0,0,.125); + border-top: 0; + border-right: 0; + border-left: 0; +} diff --git a/view/theme/redbasic/schema/dark.php b/view/theme/redbasic/schema/dark.php index af4b122f1..18e92ac93 100644 --- a/view/theme/redbasic/schema/dark.php +++ b/view/theme/redbasic/schema/dark.php @@ -1,5 +1,5 @@ <?php - + if (! $nav_bg) $nav_bg = "#000"; if (! $nav_gradient_top) @@ -35,7 +35,7 @@ if (! $font_colour) $font_colour = "#ccc"; if (! $converse_width) - $converse_width = "1024"; - + $converse_width = '52'; //unit: rem; + diff --git a/view/tpl/abook_edit.tpl b/view/tpl/abook_edit.tpl index 686b40a54..28631ed68 100644 --- a/view/tpl/abook_edit.tpl +++ b/view/tpl/abook_edit.tpl @@ -24,6 +24,7 @@ {{if $abook_prev || $abook_next}} <div class="btn-group"> <a href="connedit/{{$abook_prev}}{{if $section}}?f=§ion={{$section}}{{/if}}" class="btn btn-outline-secondary btn-sm{{if ! $abook_prev}} disabled{{/if}}" ><i class="fa fa-backward"></i></a> + {{if $sections}} <div class="btn-group" > <button class="btn btn-outline-secondary btn-sm{{if $is_pending}} disabled{{/if}}" type="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa fa-bars"></i></button> <div class="dropdown-menu dropdown-menu-end" aria-labelledby="dLabel"> @@ -32,6 +33,7 @@ {{/foreach}} </div> </div> + {{/if}} <a href="connedit/{{$abook_next}}{{if $section}}?f=§ion={{$section}}{{/if}}" class="btn btn-outline-secondary btn-sm{{if ! $abook_next}} disabled{{/if}}" ><i class="fa fa-forward"></i></a> </div> {{/if}} @@ -40,6 +42,65 @@ <h2>{{$header}}</h2> </div> <div class="section-content-wrapper-np"> + <form id="abook-edit-form" action="connedit/{{$contact_id}}" method="post" > + + <input type="hidden" name="contact_id" value="{{$contact_id}}"> + <input type="hidden" name="section" value="{{$section}}"> + + <div class="section-content-wrapper"> + <a href="permcats/{{$permcat_value}}" class="float-end"><i class="fa fa-external-link"></i> {{$permcat_new}}</a> + {{include file="field_select.tpl" field=$permcat}} + <button type="button" class="btn btn-outline-secondary float-end" data-bs-toggle="modal" data-bs-target="#perms_modal">Permissions</button> + <button type="submit" name="done" value="{{$submit}}" class="btn btn-primary">{{$submit}}</button> + <div class="modal" id="perms_modal" tabindex="-1" aria-labelledby="perms_modal_label" aria-hidden="true"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <div class="modal-title h3" id="perms_modal_label">Permissions Overview</div> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> + </div> + <div class="modal-body"> + + <table class="table table-hover table-sm"> + <thead> + <tr> + <th scope="col">Permission</th> + <th scope="col">{{$them}}</th> + <th scope="col">{{$me}}</th> + </tr> + </thead> + <tbody> + {{foreach $perms as $perm}} + <tr> + <td>{{$perm.1}}</td> + <td> + {{if $perm.2}} + <i class="fa fa-check text-success"></i> + {{else}} + <i class="fa fa-times text-danger"></i> + {{/if}} + </td> + <td> + {{if $perm.3}} + <i class="fa fa-check text-success"></i> + {{else}} + <i class="fa fa-times text-danger"></i> + {{/if}} + </td> + </tr> + {{/foreach}} + + </tbody> + </table> + </div> + <div class="modal-footer"> + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> + </div> + </div> + </div> + </div> + </div> + {{if $notself}} {{foreach $tools as $tool}} {{if $tool.info}} @@ -73,33 +134,9 @@ </div> {{/if}} - <form id="abook-edit-form" action="connedit/{{$contact_id}}" method="post" > - - <input type="hidden" name="contact_id" value="{{$contact_id}}"> - <input type="hidden" name="section" value="{{$section}}"> - <div class="panel-group" id="contact-edit-tools" role="tablist" aria-multiselectable="true"> {{if $notself}} - {{if $is_pending}} - <div class="panel"> - <div class="section-subtitle-wrapper" role="tab" id="pending-tool"> - <h3> - <a data-bs-toggle="collapse" data-bs-parent="#contact-edit-tools" href="#pending-tool-collapse" aria-expanded="true" aria-controls="pending-tool-collapse"> - {{$pending_label}} - </a> - </h3> - </div> - <div id="pending-tool-collapse" class="panel-collapse collapse show" role="tabpanel" aria-labelledby="pending-tool"> - <div class="section-content-tools-wrapper"> - {{include file="field_checkbox.tpl" field=$unapproved}} - <div class="settings-submit-wrapper" > - <button type="submit" name="done" value="{{$submit}}" class="btn btn-primary">{{$submit}}</button> - </div> - </div> - </div> - </div> - {{/if}} {{if ! $is_pending}} <div id="template-form-vcard-org" class="mb-3 form-vcard-org"> <div class="mb-3 form-vcard-org"> @@ -438,85 +475,6 @@ <input type="hidden" name="{{$excl.0}}" value="{{$excl.2}}" /> {{/if}} - {{if $rating}} - <div class="panel"> - <div class="section-subtitle-wrapper" role="tab" id="rating-tool"> - <h3> - <a data-bs-toggle="collapse" data-bs-parent="#contact-edit-tools" href="#rating-tool-collapse" aria-expanded="true" aria-controls="rating-tool-collapse"> - {{$lbl_rating}} - </a> - </h3> - </div> - <div id="rating-tool-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="rating-tool"> - <div class="section-content-tools-wrapper"> - <div class="section-content-warning-wrapper"> - {{$rating_info}} - </div> - <div class="mb-3"><strong>{{$lbl_rating_label}}</strong></div> - {{$rating}} - {{include file="field_textarea.tpl" field=$rating_text}} - <input id="contact-rating-mirror" type="hidden" name="rating" value="{{$rating_val}}" /> - <div class="settings-submit-wrapper" > - <button type="submit" name="done" value="{{$submit}}" class="btn btn-primary">{{$submit}}</button> - </div> - </div> - </div> - </div> - {{/if}} - - {{/if}} - - {{if ! $is_pending}} - <div class="panel"> - {{if $notself}} - <div class="section-subtitle-wrapper" role="tab" id="perms-tool"> - <h3> - <a data-bs-toggle="collapse" data-bs-parent="#contact-edit-tools" href="#perms-tool-collapse" aria-expanded="true" aria-controls="perms-tool-collapse"> - {{$permlbl}} - </a> - </h3> - </div> - {{/if}} - <div id="perms-tool-collapse" class="panel-collapse collapse{{if $self || $section === 'perms'}} show{{/if}}" role="tabpanel" aria-labelledby="perms-tool"> - <div class="section-content-tools-wrapper"> - <div class="section-content-warning-wrapper"> - {{if $notself}}{{$permnote}}{{/if}} - {{if $self}}{{$permnote_self}}{{/if}} - </div> - - {{if $permcat_enable}} - <a href="permcats" class="float-end"><i class="fa fa-plus"></i> {{$permcat_new}}</a> - {{include file="field_select.tpl" field=$permcat}} - {{/if}} - - <table id="perms-tool-table" class=mb-3> - <tr> - <td></td> - {{if $notself}} - <td class="abook-them">{{$them}}</td> - {{/if}} - <td colspan="2" class="abook-me">{{$me}}</td> - </tr> - {{foreach $perms as $prm}} - {{include file="field_acheckbox.tpl" field=$prm}} - {{/foreach}} - </table> - - {{if $self}} - <div> - <div class="section-content-info-wrapper"> - {{$autolbl}} - </div> - {{include file="field_checkbox.tpl" field=$autoperms}} - </div> - {{/if}} - - <div class="settings-submit-wrapper" > - <button type="submit" name="done" value="{{$submit}}" class="btn btn-primary">{{$submit}}</button> - </div> - </div> - </div> - </div> {{/if}} </div> </form> diff --git a/view/tpl/admin_site.tpl b/view/tpl/admin_site.tpl index 6882c3b8a..fa942baff 100644 --- a/view/tpl/admin_site.tpl +++ b/view/tpl/admin_site.tpl @@ -31,7 +31,7 @@ <h3>{{$registration}}</h3> {{include file="field_input.tpl" field=$register_text}} - {{include file="field_select_grouped.tpl" field=$role}} + {{include file="field_select.tpl" field=$role}} {{include file="field_select.tpl" field=$register_policy}} {{** include file="field_checkbox.tpl" field=$register_wo_email **}} {{include file="register_duty.tpl" field=$register_duty}} diff --git a/view/tpl/connection_template.tpl b/view/tpl/connection_template.tpl index e7ab559cb..a7f0f8759 100644 --- a/view/tpl/connection_template.tpl +++ b/view/tpl/connection_template.tpl @@ -1,23 +1,20 @@ <div id="contact-entry-wrapper-{{$contact.id}}"> <div class="section-subtitle-wrapper clearfix"> <div class="float-end"> - {{if $contact.approve && $contact.ignore}} - <form action="connedit/{{$contact.id}}" method="post" > - <button type="submit" class="btn btn-success btn-sm" name="pending" value="1" title="{{$contact.approve_hover}}"><i class="fa fa-check"></i> {{$contact.approve}}</button> - - <a href="connedit/{{$contact.id}}/ignore" class="btn btn-warning btn-sm" title="{{$contact.ignore_hover}}"><i class="fa fa-ban"></i> {{$contact.ignore}}</a> - - {{/if}} - {{if $contact.connect}} - <a href="{{$contact.follow}}" class="btn btn-success btn-sm" title="{{$contact.connect_hover}}"><i class="fa fa-plus"></i> {{$contact.connect}}</a> - {{/if}} - <a href="#" class="btn btn-danger btn-sm contact-delete-btn" title="{{$contact.delete_hover}}" onclick="dropItem('{{$contact.deletelink}}', '#contact-entry-wrapper-{{$contact.id}}'); return false;"><i class="fa fa-trash-o"></i> {{$contact.delete}}</a> - <a href="{{$contact.link}}" class="btn btn-outline-secondary btn-sm" title="{{$contact.edit_hover}}"><i class="fa fa-pencil"></i> {{$contact.edit}}</a> - {{if $contact.approve}} - </form> + {{if $contact.status}} + {{foreach $contact.states as $state}} + <span class="badge rounded-pill bg-danger text-white me-1" title="">{{$state}}</span> + {{/foreach}} {{/if}} + <span id="contact-role-{{$contact.id}}" class="badge rounded-pill bg-warning text-dark me-1" title="{{$role_label}}">{{$contact.role}}</span> + <button type="button" class="btn btn-outline-secondary btn-sm contact-edit" title="{{$contact.edit_hover}}" data-id="{{$contact.id}}"> + <i id="edit-icon-{{$contact.id}}" class="fa fa-fw fa-pencil"></i> + <div id="edit-rotator-{{$contact.id}}" class="spinner-wrapper" style="vertical-align: text-bottom; margin-right: 2px"><div class="spinner s"></div></div> + {{$contact.edit}} + </button> + </div> - <h3>{{if $contact.public_forum}}<i class="fa fa-comments-o"></i> {{/if}}<a href="{{$contact.url}}" title="{{$contact.img_hover}}" >{{$contact.name}}</a>{{if $contact.phone}} <a class="btn btn-outline-secondary btn-sm" href="tel:{{$contact.phone}}" title="{{$contact.call}}"><i class="fa fa-phone connphone"></i></a>{{/if}}</h3> + <h3>{{if $contact.public_forum}}<i class="fa fa-comments-o" title="{{$group_label}}"></i> {{/if}}<a href="{{$contact.url}}" title="{{$contact.img_hover}}" >{{$contact.name}}</a>{{if $contact.phone}} <a class="btn btn-outline-secondary btn-sm" href="tel:{{$contact.phone}}" title="{{$contact.call}}"><i class="fa fa-phone connphone"></i></a>{{/if}}</h3> </div> <div class="section-content-tools-wrapper"> <div class="contact-photo-wrapper" > @@ -27,11 +24,11 @@ {{include "connstatus.tpl" perminfo=$contact.perminfo}} </div> <div class="contact-info"> - {{if $contact.status}} + {{** if $contact.status}} <div class="contact-info-element"> <span class="contact-info-label">{{$contact.status_label}}:</span> {{$contact.status}} </div> - {{/if}} + {{/if **}} {{if $contact.connected}} <div class="contact-info-element"> <span class="contact-info-label">{{$contact.connected_label}}:</span> <span class="autotime" title="{{$contact.connected}}"></span> @@ -47,6 +44,9 @@ <span class="contact-info-label">{{$contact.network_label}}:</span> {{$contact.network}} - <a href="{{$contact.recentlink}}" rel="nofollow noopener">{{$contact.recent_label}}</a> </div> {{/if}} + {{if $contact.connect}} + <a href="{{$contact.follow}}" class="btn btn-success btn-sm" title="{{$contact.connect_hover}}"><i class="fa fa-plus"></i> {{$contact.connect}}</a> + {{/if}} </div> </div> diff --git a/view/tpl/connections.tpl b/view/tpl/connections.tpl index 1719a6522..5fec38a84 100644 --- a/view/tpl/connections.tpl +++ b/view/tpl/connections.tpl @@ -1,7 +1,10 @@ <div class="generic-content-wrapper"> <div class="section-title-wrapper clearfix"> <div class="dropdown float-end"> - <button type="button" class="btn btn-primary btn-sm" onclick="openClose('contacts-search-form'); $('#contacts-search').focus();"> + <button type="button" class="btn btn-success btn-sm" onclick="openClose('contacts-follow-form'); closeMenu('contacts-search-form'); $('#contacts-follow').focus();"> + <i class="fa fa-plus"></i> Add + </button> + <button type="button" class="btn btn-primary btn-sm" onclick="openClose('contacts-search-form'); closeMenu('contacts-follow-form'); $('#contacts-search').focus();"> <i class="fa fa-search"></i> {{$label}} </button> <button type="button" class="btn btn-outline-secondary btn-sm dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" title="{{$sort}}"> @@ -16,10 +19,23 @@ {{if $finding}}<h2>{{$finding}}</h2>{{else}}<h2>{{$header}}{{if $total}} ({{$total}}){{/if}}</h2>{{/if}} </div> <div id="contacts-search-form" class="section-content-tools-wrapper"> - <form action="{{$cmd}}" method="get" id="mimimi" name="contacts-search-form"> + <form action="{{$cmd}}" method="get" name="contacts-search-form"> <div class="input-group mb-3"> <input type="text" name="search" id="contacts-search" class="form-control" onfocus="this.select();" value="{{$search}}" placeholder="{{$desc}}" /> - <button id="contacts-search-submit" class="btn btn-outline-secondary" type="submit"><i class="fa fa-fw fa-search"></i></button> + <button id="contacts-search-submit" class="btn btn-primary" type="submit"><i class="fa fa-fw fa-search"></i></button> + </div> + </form> + </div> + <div id="contacts-follow-form" class="section-content-tools-wrapper"> + {{if $abook_usage_message}} + <div class="section-conten-info-wrapper"> + {{$abook_usage_message}} + </div> + {{/if}} + <form action="follow" method="post"> + <div class="input-group mb-3"> + <input class="form-control" id="contacts-follow" type="text" name="url" title="Examples: bob@example.com, https://example.com/barbara" placeholder="Enter channel address"> + <button class="btn btn-success" type="submit" name="submit" value="Connect" title="Connect"><i class="fa fa-fw fa-plus"></i></button> </div> </form> </div> @@ -34,3 +50,5 @@ <div id="page-spinner" class="spinner-wrapper"> <div class="spinner m"></div> </div> +{{include file="contact_edit_modal.tpl"}} + diff --git a/view/tpl/connstatus.tpl b/view/tpl/connstatus.tpl index 667775f3a..30f450820 100644 --- a/view/tpl/connstatus.tpl +++ b/view/tpl/connstatus.tpl @@ -1 +1 @@ -<i class="fa fa-fw fa-comments oneway-overlay text-{{if $perminfo.connpermcount == 3}}success{{elseif $perminfo.connpermcount > 0}}warning{{else}}danger{{/if}}" title="{{$perminfo.connperms}}"></i> +<i class="fa fa-circle oneway-overlay text-{{if $perminfo.connpermcount == 3}}success{{elseif $perminfo.connpermcount > 0}}warning{{else}}danger{{/if}}" title="{{$perminfo.connperms}}"></i> diff --git a/view/tpl/contact_edit.tpl b/view/tpl/contact_edit.tpl new file mode 100644 index 000000000..3c4ed2ffe --- /dev/null +++ b/view/tpl/contact_edit.tpl @@ -0,0 +1,133 @@ +<form id="contact-edit-form" action="contactedit/{{$contact_id}}" method="post" > + <div id="contact-edit-tools" class="panel-group" role="tablist" > + <div class="panel"> + <div class="section-subtitle-wrapper" role="tab" id="roles-tool"> + <h3> + <a class="section" data-bs-toggle="collapse" data-bs-target="#roles-tool-collapse" href="#" aria-expanded="true" aria-controls="roles-tool-collapse" data-section="roles"> + Roles + </a> + </h3> + </div> + <div id="roles-tool-collapse" class="panel-collapse collapse{{if $section == 'roles'}} show{{/if}}" role="tabpanel" aria-labelledby="roles-tool" data-bs-parent="#contact-edit-tools"> + <div class="section-content-tools-wrapper"> + {{include file="field_select.tpl" field=$permcat}} + <button class="btn btn-outline-secondary btn-sm float-end sub_section{{if $sub_section == 'perms'}} sub_section_active{{/if}}" type="button" onclick="openClose('perms-table', 'table')" data-section="perms"> + Compare permissions + </button> + <a href="permcats/{{$permcat_value}}" class="btn btn-sm btn-outline-primary"> + <i class="fa fa-external-link"></i> {{$permcat_new}} + </a> + <table id="perms-table" class="table table-hover table-sm mt-3" style="display: {{if $sub_section == 'perms'}}table{{else}}none{{/if}};"> + <thead> + <tr class="w-100"> + <th scope="col">Permission</th> + <th scope="col">{{$them}}</th> + <th scope="col">{{$me}}</th> + </tr> + </thead> + <tbody> + {{foreach $perms as $perm}} + <tr> + <td>{{$perm.1}}</td> + <td> + {{if $perm.2}} + <i class="fa fa-check text-success"></i> + {{else}} + <i class="fa fa-times text-danger"></i> + {{/if}} + </td> + <td> + {{if $perm.3}} + <i class="fa fa-check text-success"></i> + {{else}} + <i class="fa fa-times text-danger"></i> + {{/if}} + </td> + </tr> + {{/foreach}} + + </tbody> + </table> + </div> + </div> + </div> + {{if $groups}} + <div class="panel"> + <div class="section-subtitle-wrapper" role="tab" id="group-tool"> + <h3> + <a class="section" data-bs-toggle="collapse" data-bs-target="#group-tool-collapse" href="#" aria-expanded="true" aria-controls="group-tool-collapse" data-section="group"> + Privacy groups + </a> + </h3> + </div> + <div id="group-tool-collapse" class="panel-collapse collapse{{if $section == 'group'}} show{{/if}}" role="tabpanel" aria-labelledby="group-tool" data-bs-parent="#contact-edit-tools"> + <div class="section-content-tools-wrapper clearfix"> + {{foreach $groups as $group}} + {{include file="field_checkbox.tpl" field=$group}} + {{/foreach}} + <a href="group/new" class="btn btn-sm btn-outline-primary"> + <i class="fa fa-external-link"></i> Privacy groups + </a> + </div> + </div> + </div> + {{/if}} + {{if $multiprofs}} + <div class="panel"> + <div class="section-subtitle-wrapper" role="tab" id="profile-tool"> + <h3> + <a class="section" data-bs-toggle="collapse" data-bs-target="#profile-tool-collapse" href="#" aria-expanded="true" aria-controls="profile-tool-collapse" data-section="profile"> + Profiles + </a> + </h3> + </div> + <div id="profile-tool-collapse" class="panel-collapse collapse{{if $section == 'profile'}} show{{/if}}" role="tabpanel" aria-labelledby="profile-tool" data-bs-parent="#contact-edit-tools"> + <div class="section-content-tools-wrapper"> + {{$profile_select}} + <a href="profiles" class="btn btn-sm btn-outline-primary"> + <i class="fa fa-external-link"></i> Profiles + </a> + </div> + </div> + </div> + {{/if}} + {{if $slide}} + <div class="panel"> + <div class="section-subtitle-wrapper" role="tab" id="affinity-tool"> + <h3> + <a class="section" data-bs-toggle="collapse" data-bs-target="#affinity-tool-collapse" href="#" aria-expanded="true" aria-controls="affinity-tool-collapse" data-section="affinity"> + Affinity + </a> + </h3> + </div> + <div id="affinity-tool-collapse" class="panel-collapse collapse{{if $section == 'affinity'}} show{{/if}}" role="tabpanel" aria-labelledby="affinity-tool" data-bs-parent="#contact-edit-tools"> + <div class="section-content-tools-wrapper"> + <div class="mb-2"><label>{{$lbl_slider}}</label></div> + {{$slide}} + <input id="contact-closeness-mirror" type="hidden" name="closeness" value="{{$close}}" /> + </div> + </div> + </div> + {{/if}} + {{if $connfilter}} + <div class="panel"> + <div class="section-subtitle-wrapper" role="tab" id="filter-tool"> + <h3> + <a class="section" data-bs-toggle="collapse" data-bs-target="#filter-tool-collapse" href="#" aria-expanded="true" aria-controls="filter-tool-collapse" data-section="filter"> + Content filter + </a> + </h3> + </div> + <div id="filter-tool-collapse" class="panel-collapse collapse{{if $section == 'filter'}} show{{/if}}" role="tabpanel" aria-labelledby="filter-tool" data-bs-parent="#contact-edit-tools"> + <div class="section-content-tools-wrapper"> + {{include file="field_textarea.tpl" field=$incl}} + {{include file="field_textarea.tpl" field=$excl}} + </div> + </div> + </div> + {{else}} + <input type="hidden" name="{{$incl.0}}" value="{{$incl.2}}" /> + <input type="hidden" name="{{$excl.0}}" value="{{$excl.2}}" /> + {{/if}} + </div> +</form> diff --git a/view/tpl/contact_edit_header.tpl b/view/tpl/contact_edit_header.tpl new file mode 100644 index 000000000..997d294bd --- /dev/null +++ b/view/tpl/contact_edit_header.tpl @@ -0,0 +1,9 @@ +<div class="float-start me-2"> + <a href="{{$href}}" title="{{$link_label}}" target="_blank"> + <img src="{{$img_src}}" class="rounded" style="width: 3rem; height: 3rem;" /> + </a> +</div> +<div class="m-1"> + <div class="text-truncate h3 m-0"><strong>{{if $is_group}}<i class="fa fa-comments-o" title="{{$group_label}}"></i> {{/if}}{{$name}}</strong></div> + <div class="text-truncate text-muted">{{$addr}}</div> +</div> diff --git a/view/tpl/contact_edit_modal.tpl b/view/tpl/contact_edit_modal.tpl new file mode 100644 index 000000000..a046456d9 --- /dev/null +++ b/view/tpl/contact_edit_modal.tpl @@ -0,0 +1,154 @@ +<div id="edit-modal" class="modal" tabindex="-1"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <div id="edit-modal-title" class="modal-title w-75"> + <div class="placeholder-wave"> + <span class="placeholder placeholder-lg" style="width: 200px;"></span> + </div> + </div> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> + </div> + <div id="edit-modal-body" class="modal-body"> + <div class="placeholder-wave"> + <span class="placeholder placeholder-lg w-100 mb-4"></span> + <span class="placeholder placeholder-lg w-100 mb-4"></span> + <span class="placeholder placeholder-lg w-100 mb-4"></span> + </div> + </div> + <div class="modal-footer"> + <div id="edit-modal-tools" class="me-auto"></div> + <button id="contact-save" type="button" class="btn btn-primary"></button> + </div> + </div> + </div> +</div> +<script> + let poi; + let section = 'roles'; + let sub_section; + + + $('#edit-modal').on('hidden.bs.modal', function (e) { + if (window.location.hash) { + history.replaceState(null, '', 'connections'); + } + }) + + if (window.location.hash) { + poi = window.location.hash.substr(1); + init_contact_edit(poi); + } + + window.onhashchange = function() { + if (window.location.hash) { + poi = window.location.hash.substr(1); + init_contact_edit(poi); + } + }; + + + $(document).on('click', '.contact-edit', function (e) { + e.preventDefault(); + poi = this.dataset.id + init_contact_edit(poi); + }); + + $(document).on('click', '#contact-save', function () { + let form_data = $('#contact-edit-form').serialize() + '§ion=' + section + '&sub_section=' + sub_section; + + $.post('contactedit/' + poi, form_data, function(data) { + if (!data.success) { + $.jGrowl(data.message, {sticky: false, theme: 'notice', life: 10000}); + return; + } + activate(data); + $.jGrowl(data.message, {sticky: false, theme: ((data.success) ? 'info' : 'notice'), life: ((data.success) ? 3000 : 10000)}); + // $('#edit-modal').modal('hide'); + }); + + }); + + $(document).on('click', '.contact-tool', function (e) { + e.preventDefault(); + let cmd = this.dataset.cmd; + + $.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)}); + if (cmd === 'drop') { + if ($('#contact-entry-wrapper-' + poi).length) { + $('#contact-entry-wrapper-' + poi).fadeOut(); + } + $('#edit-modal').modal('hide'); + } + }); + }); + + $(document).on('click', '.section', function () { + section = this.dataset.section; + sub_section = ''; + }); + + $(document).on('click', '.sub_section', function () { + if ($(this).hasClass('sub_section_active')) { + $(this).removeClass('sub_section_active'); + sub_section = ''; + } + else { + $(this).addClass('sub_section_active'); + sub_section = this.dataset.section; + } + }); + + function init_contact_edit(poi) { + if (!poi) + return + $('#edit-rotator-' + poi).addClass('d-inline-block'); + $('#edit-icon-' + poi).hide(); + $.get('contactedit/' + poi, function(data) { + if (!data.success) { + $.jGrowl(data.message, {sticky: false, theme: 'notice', life: 10000}); + return; + } + $('#edit-modal').modal('show'); + activate(data); + }); + } + + function activate(data) { + $('#contact-save').removeClass('disabled'); + $('#contact-tools').removeClass('disabled'); + $('#edit-rotator-' + poi).removeClass('d-inline-block'); + $('#edit-icon-' + poi).show(); + + if (data.title) { + $('#edit-modal-title').html(data.title); + } + + if (data.body) { + $('#edit-modal-body').html(data.body); + } + + if (data.tools) { + $('#edit-modal-tools').html(data.tools); + } + + if (data.submit) { + $('#contact-save').html(data.submit); + } + + if (data.role && $('#contact-role-' + poi).length) { + $('#contact-role-' + poi).html(data.role); + } + + if (data.pending) { + $('#contact-save').removeClass('btn-primary'); + $('#contact-save').addClass('btn-success'); + } + else { + $('#contact-save').addClass('btn-primary'); + $('#contact-save').removeClass('btn-success'); + } + } +</script> diff --git a/view/tpl/contact_edit_tools.tpl b/view/tpl/contact_edit_tools.tpl new file mode 100644 index 000000000..565b9df86 --- /dev/null +++ b/view/tpl/contact_edit_tools.tpl @@ -0,0 +1,14 @@ +<button id="contact-tools" class="btn btn-outline-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> + <i class="fa fa-cog"></i> {{$tools_label}} +</button> +<div class="dropdown-menu"> + <a class="dropdown-item contact-tool" href="#" title="{{$tools.refresh.title}}" data-cmd="refresh">{{$tools.refresh.label}}</a> + <a class="dropdown-item contact-tool" href="#" title="{{$tools.rephoto.title}}" data-cmd="resetphoto">{{$tools.rephoto.label}}</a> + <div class="dropdown-divider"></div> + <a class="dropdown-item contact-tool" href="#" title="{{$tools.block.title}}" data-cmd="block">{{$tools.block.label}}</a> + <a class="dropdown-item contact-tool" href="#" title="{{$tools.ignore.title}}" data-cmd="ignore">{{$tools.ignore.label}}</a> + <a class="dropdown-item contact-tool" href="#" title="{{$tools.archive.title}}" data-cmd="archive">{{$tools.archive.label}}</a> + <a class="dropdown-item contact-tool" href="#" title="{{$tools.hide.title}}" data-cmd="hide">{{$tools.hide.label}}</a> + <div class="dropdown-divider"></div> + <a class="dropdown-item contact-tool" href="#" title="{{$tools.delete.title}}" data-cmd="drop">{{$tools.delete.label}}</a> +</div> diff --git a/view/tpl/conv_frame.tpl b/view/tpl/conv_frame.tpl index c28bb732a..4237c671b 100644 --- a/view/tpl/conv_frame.tpl +++ b/view/tpl/conv_frame.tpl @@ -18,3 +18,4 @@ </div><!-- /.modal-content --> </div><!-- /.modal-dialog --> </div><!-- /.modal --> +{{include file="contact_edit_modal.tpl"}} diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl index 7c3505410..e9d5e3c63 100644 --- a/view/tpl/conv_item.tpl +++ b/view/tpl/conv_item.tpl @@ -36,11 +36,14 @@ <div class="wall-item-info" id="wall-item-info-{{$item.id}}" > <div class="wall-item-photo-wrapper{{if $item.owner_url}} wwfrom{{/if}} h-card p-author" id="wall-item-photo-wrapper-{{$item.id}}"> <img src="{{$item.thumb}}" class="fakelink wall-item-photo{{$item.sparkle}} u-photo p-name" id="wall-item-photo-{{$item.id}}" alt="{{$item.name}}" loading="lazy" data-bs-toggle="dropdown" /> + {{if $item.author_is_group_actor}} + <i class="fa fa-comments-o wall-item-photo-group-actor" title="{{$item.author_is_group_actor}}"></i> + {{/if}} {{if $item.thread_author_menu}} <i class="fa fa-caret-down wall-item-photo-caret cursor-pointer" data-bs-toggle="dropdown"></i> <div class="dropdown-menu"> {{foreach $item.thread_author_menu as $mitem}} - <a class="dropdown-item" {{if $mitem.href}}href="{{$mitem.href}}"{{/if}} {{if $mitem.action}}onclick="{{$mitem.action}}"{{/if}} {{if $mitem.title}}title="{{$mitem.title}}"{{/if}} >{{$mitem.title}}</a> + <a class="dropdown-item{{if $mitem.class}} {{$mitem.class}}{{/if}}" {{if $mitem.href}}href="{{$mitem.href}}"{{/if}} {{if $mitem.action}}onclick="{{$mitem.action}}"{{/if}} {{if $mitem.title}}title="{{$mitem.title}}"{{/if}}{{if $mitem.data}} {{$mitem.data}}{{/if}}>{{$mitem.title}}</a> {{/foreach}} </div> {{/if}} @@ -48,7 +51,7 @@ </div> {{if $item.lock}} <div class="wall-item-lock dropdown"> - <i class="fa {{if $item.locktype == 2}}fa-envelope-o{{else}}fa-lock{{/if}} lockview{{if $item.privacy_warning}} text-danger{{/if}}" data-bs-toggle="dropdown" title="{{$item.lock}}" onclick="lockview('item',{{$item.id}});" ></i> + <i class="fa {{if $item.locktype == 2}}fa-envelope-o{{else if $item.locktype == 1}}fa-lock{{else}}fa-unlock{{/if}} lockview{{if $item.privacy_warning}} text-danger{{/if}}" data-bs-toggle="dropdown" title="{{$item.lock}}" onclick="lockview('item',{{$item.id}});" ></i> <div id="panel-{{$item.id}}" class="dropdown-menu"></div> </div> {{/if}} diff --git a/view/tpl/conv_list.tpl b/view/tpl/conv_list.tpl index a20a6de8d..0463afdcb 100644 --- a/view/tpl/conv_list.tpl +++ b/view/tpl/conv_list.tpl @@ -30,6 +30,9 @@ <div class="wall-item-info" id="wall-item-info-{{$item.id}}" > <div class="wall-item-photo-wrapper{{if $item.owner_url}} wwfrom{{/if}} h-card p-author" id="wall-item-photo-wrapper-{{$item.id}}"> <img src="{{$item.thumb}}" class="fakelink wall-item-photo{{$item.sparkle}} u-photo p-name" id="wall-item-photo-{{$item.id}}" alt="{{$item.name}}" data-bs-toggle="dropdown" loading="lazy" /></a> + {{if $item.author_is_group_actor}} + <i class="fa fa-comments-o wall-item-photo-group-actor" title="{{$item.author_is_group_actor}}"></i> + {{/if}} {{if $item.thread_author_menu}} <i class="fa fa-caret-down wall-item-photo-caret cursor-pointer" data-bs-toggle="dropdown"></i> <div class="dropdown-menu"> @@ -43,7 +46,7 @@ </div> {{if $item.lock}} <div class="wall-item-lock dropdown"> - <i class="fa {{if $item.locktype == 2}}fa-envelope-o{{else}}fa-lock{{/if}} lockview" data-bs-toggle="dropdown" title="{{$item.lock}}" onclick="lockview('item',{{$item.id}});" ></i> + <i class="fa {{if $item.locktype == 2}}fa-envelope-o{{else if $item.locktype == 1}}fa-lock{{else}}fa-unlock{{/if}} lockview{{if $item.privacy_warning}} text-danger{{/if}}" data-bs-toggle="dropdown" title="{{$item.lock}}" onclick="lockview('item',{{$item.id}});" ></i> <div id="panel-{{$item.id}}" class="dropdown-menu"></div> </div> {{/if}} diff --git a/view/tpl/conversation.tpl b/view/tpl/conversation.tpl index 82c7be922..6729cf55c 100644 --- a/view/tpl/conversation.tpl +++ b/view/tpl/conversation.tpl @@ -9,10 +9,10 @@ <div id="collapsed-comments-{{$thread.id}}" class="collapsed-comments" style="display: none;"> {{/if}} {{if $item.comment_lastcollapsed}}</div>{{/if}} - + {{include file="{{$item.template}}"}} - - + + {{/foreach}} </div> {{/foreach}} diff --git a/view/tpl/field_acheckbox.tpl b/view/tpl/field_acheckbox.tpl index 4c8b62f36..44f65fefd 100644 --- a/view/tpl/field_acheckbox.tpl +++ b/view/tpl/field_acheckbox.tpl @@ -1,24 +1,31 @@ -<tr class="highlight"> +<tr> <td> - <label class="mainlabel" for='me_id_{{$field.0}}'>{{$field.1}}</label><br> - <span class='field_abook_help'>{{$field.6}}</span> + <label class="mainlabel" for="me_id_{{$field.0}}">{{$field.1}}</label> + <span class="field_abook_help">{{$field.6}}</span> </td> - {{if $notself}} - <td class="abook-them"> - {{if $field.2 == 1}}<i class="fa fa-check-square-o"></i>{{/if}} - {{if $field.2 == 0}}<i class="fa fa-square-o"></i>{{/if}} - </td> - {{/if}} - <td class="abook-me"> - {{if $self || !$field.5 }} - <input type="checkbox" name='{{$field.0}}' class='abook-edit-me' id='me_id_{{$field.0}}' value="{{$field.4}}" {{if $field.3}}checked="checked"{{/if}} /> - {{/if}} - {{if $notself && $field.5}} - <input type="hidden" name='{{$field.0}}' value="{{if $field.7}}1{{else}}0{{/if}}" /> - {{if $field.3}}<i class="fa fa-check-square-o"></i>{{else}}<i class="fa fa-square-o"></i>{{/if}} + <td> + {{if $field.5}} + <span class="text-nowrap text-danger"> + {{$inherited}} + {{if $field.7}} + <i class="fa fa-check-square-o"></i> + {{else}} + <i class="fa fa-square-o"></i> + {{/if}} + </span> {{/if}} </td> <td> - {{if $field.5}}<span class="permission-inherited">{{$inherited}}{{if $self}}{{if $field.7}} <i class="fa fa-check-square-o"></i>{{else}} <i class="fa fa-square-o"></i>{{/if}}{{/if}}</span>{{/if}} + {{if $is_system_role}} + {{if $field.3}} + <i class="fa fa-check-square-o"></i> + {{else}} + <i class="fa fa-square-o"></i> + {{/if}} + {{else}} + <input type="checkbox" name="{{$field.0}}" value="{{$field.4}}" {{if $field.3}}checked="checked"{{/if}} /> + {{/if}} + </td> + </tr> diff --git a/view/tpl/field_checkbox.tpl b/view/tpl/field_checkbox.tpl index a1ab42d5e..670bb7e29 100644 --- a/view/tpl/field_checkbox.tpl +++ b/view/tpl/field_checkbox.tpl @@ -1,6 +1,6 @@ <div id="{{$field.0}}_container" class="clearfix onoffswitch checkbox mb-3"> <label for="id_{{$field.0}}">{{$field.1}}{{if $field.6}}<sup class="required zuiqmid"> {{$field.6}}</sup>{{/if}}</label> - <div class="float-end"><input type="checkbox" name='{{$field.0}}' id='id_{{$field.0}}' value="1" {{if $field.2}}checked="checked"{{/if}} {{if $field.5}}{{$field.5}}{{/if}} /><label class="switchlabel" for='id_{{$field.0}}'> <span class="onoffswitch-inner" data-on='{{if $field.4}}{{$field.4.1}}{{/if}}' data-off='{{if $field.4}}{{$field.4.0}}{{/if}}'></span><span class="onoffswitch-switch"></span></label></div> + <div class="float-end"><input type="checkbox" name="{{$field.0}}" id="id_{{$field.0}}" value="1" {{if $field.2}}checked="checked"{{/if}} {{if $field.5}}{{$field.5}}{{/if}} /><label class="switchlabel" for='id_{{$field.0}}'> <span class="onoffswitch-inner" data-on='{{if $field.4}}{{$field.4.1}}{{/if}}' data-off='{{if $field.4}}{{$field.4.0}}{{/if}}'></span><span class="onoffswitch-switch"></span></label></div> <small class="form-text text-muted">{{$field.3}}</small> </div> {{* diff --git a/view/tpl/group_edit.tpl b/view/tpl/group_edit.tpl index 5568179af..f6ab1e594 100644 --- a/view/tpl/group_edit.tpl +++ b/view/tpl/group_edit.tpl @@ -1,23 +1,24 @@ <div class="generic-content-wrapper"> <div class="section-title-wrapper"> <div class="float-end"> - <button type="button" class="btn btn-sm btn-outline-secondary" onclick="openClose('group_tools')"><i class="fa fa-pencil"></i> {{$details_label}}</button> <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> <h2>{{$title}}</h2> </div> - <div id="group_tools" class="clearfix section-content-tools-wrapper" style="display: none"> + <div id="group_tools" class="clearfix section-content-tools-wrapper"> <form action="group/{{$gid}}" id="group-edit-form" method="post" > <input type='hidden' name='form_security_token' value='{{$form_security_token_edit}}'> {{include file="field_input.tpl" field=$gname}} {{include file="field_checkbox.tpl" field=$public}} + {{include file="field_checkbox.tpl" field=$is_default_acl}} + {{include file="field_checkbox.tpl" field=$is_default_group}} {{$pgrp_extras}} - <a href="group/drop/{{$gid}}?t={{$form_security_token_drop}}" onclick="return confirmDelete();" class="btn btn-sm btn-danger"> + <a href="group/drop/{{$gid}}?t={{$form_security_token_drop}}" onclick="return confirmDelete();" class="btn btn-outline-danger"> {{$delete}} </a> - <button type="submit" name="submit" class="btn btn-sm btn-primary float-end">{{$submit}}</button> + <button type="submit" name="submit" class="btn btn-primary float-end">{{$submit}}</button> </form> </div> <div class="section-content-info-wrapper"> diff --git a/view/tpl/group_selection.tpl b/view/tpl/group_selection.tpl index a91658464..7db80e06f 100644 --- a/view/tpl/group_selection.tpl +++ b/view/tpl/group_selection.tpl @@ -1,8 +1,8 @@ <div class="mb-3 field custom"> -<label for="group-selection" id="group-selection-lbl">{{$label}}</label> -<select class="form-control" name="group-selection" id="group-selection" > -{{foreach $groups as $group}} -<option value="{{$group.id}}" {{if $group.selected}}selected="selected"{{/if}} >{{$group.name}}</option> -{{/foreach}} -</select> + <label for="id_{{$form_id}}">{{$label}}</label> + <select class="form-control" name="{{$form_id}}" id="{{$form_id}}" > + {{foreach $groups as $group}} + <option value="{{$group.id}}" {{if $group.selected}}selected="selected"{{/if}} >{{$group.name}}</option> + {{/foreach}} + </select> </div> diff --git a/view/tpl/group_side.tpl b/view/tpl/group_side.tpl index 14f714ae9..979d20aa5 100644 --- a/view/tpl/group_side.tpl +++ b/view/tpl/group_side.tpl @@ -13,9 +13,11 @@ <a class="nav-link{{if $group.selected}} active{{/if}}" href="{{$group.href}}">{{$group.text}}</a> </li> {{/foreach}} + {{if $createtext}} <li class="nav-item"> - <a class="nav-link" href="group/new" title="{{$createtext}}" ><i class="fa fa-plus-circle"></i> {{$createtext}}</a> + <a class="nav-link" href="group/new" title="{{$createtext}}" ><i class="fa fa-external-link"></i> {{$createtext}}</a> </li> + {{/if}} </ul> </div> diff --git a/view/tpl/micropro_card.tpl b/view/tpl/micropro_card.tpl index 058bfc14c..40a7967c5 100644 --- a/view/tpl/micropro_card.tpl +++ b/view/tpl/micropro_card.tpl @@ -1,5 +1,5 @@ <a class="list-group-item{{if $class}} {{$class}}{{/if}} fakelink" href="{{if $click}}#{{else}}{{$url}}{{/if}}" {{if $click}}onclick="{{$click}}"{{/if}}> - <img class="menu-img-3" src="{{$photo}}" title="{{$title}}" alt="" />{{if $perminfo}}{{include "connstatus.tpl"}}{{/if}} + <img class="menu-img-3" src="{{$photo}}" title="{{$title}}" alt="" loading="lazy" />{{if $perminfo}}{{include "connstatus.tpl"}}{{/if}} <span class="contactname">{{$name}}</span> <span class="dropdown-sub-text">{{$addr}}<br>{{$network}}</span> </a> diff --git a/view/tpl/navbar_default.tpl b/view/tpl/navbar_default.tpl index c8b5ce26c..8d6d5dfd7 100644 --- a/view/tpl/navbar_default.tpl +++ b/view/tpl/navbar_default.tpl @@ -193,7 +193,7 @@ </div> <div class="offcanvas-body pt-0"> {{if $channel_apps.0}} - <div class="dropdown-header text-uppercase"> + <div class="dropdown-header text-uppercase text-muted"> {{$channelapps}} </div> {{foreach $channel_apps as $channel_app}} @@ -201,7 +201,7 @@ {{/foreach}} {{/if}} {{if $navbar_apps.0}} - <div class="d-lg-none dropdown-header text-uppercase"> + <div class="d-lg-none dropdown-header text-uppercase text-muted"> {{$pinned_apps}} </div> <div id="nav-app-bin-container" class="d-lg-none"> @@ -211,7 +211,7 @@ </div> {{/if}} {{if $is_owner}} - <div class="dropdown-header text-uppercase"> + <div class="dropdown-header text-uppercase text-muted"> {{$featured_apps}} </div> <div id="app-bin-container" data-token="{{$form_security_token}}"> @@ -222,7 +222,7 @@ <div class="dropdown-divider"></div> <a class="dropdown-item" href="/apps"><i class="generic-icons-nav fa fa-fw fa-plus"></i>{{$addapps}}</a> {{else}} - <div class="dropdown-header text-uppercase"> + <div class="dropdown-header text-uppercase text-muted"> {{$sysapps}} </div> {{foreach $nav_apps as $nav_app}} diff --git a/view/tpl/new_channel.tpl b/view/tpl/new_channel.tpl index 8d72df55b..f11a4291f 100644 --- a/view/tpl/new_channel.tpl +++ b/view/tpl/new_channel.tpl @@ -18,17 +18,17 @@ {{if $default_role}} <input type="hidden" name="permissions_role" value="{{$default_role}}" /> {{else}} - {{include file="field_select_grouped.tpl" field=$role}} + {{include file="field_select.tpl" field=$role}} {{/if}} - + {{include file="field_input.tpl" field=$name}} - + {{include file="field_input.tpl" field=$nickname}} <button class="btn btn-primary" type="submit" id="newchannel-submit-button">{{$submit}}</button> - - + + <div id="newchannel-submit-end" class="clear"></div> - + <div id="newchannel-import-link" class="descriptive-paragraph" >{{$label_import}}</div> <div id="newchannel-import-end" class="clear"></div> </form> diff --git a/view/tpl/notes.tpl b/view/tpl/notes.tpl index 3273b4145..24c3ec53c 100644 --- a/view/tpl/notes.tpl +++ b/view/tpl/notes.tpl @@ -1,14 +1,14 @@ {{if $app}} <div id="personal-notes" class="generic-content-wrapper{{if $hidden}} d-none{{/if}}"> <div class="section-title-wrapper clearfix"> - <div class="float-end rounded border border-secondary m-1 ps-1 pe-1 text-muted small note-mode" title="Double click into note for edit mode">Read mode</div> - <h2>{{$banner}}</h2> + <div class="float-end rounded border border-secondary m-1 ps-1 pe-1 text-muted small note-mode" title="Double click into note for edit mode">{{$strings.read}}</div> + <h2>{{$strings.title}}</h2> </div> <div class="section-content-wrapper-np"> {{else}} <div id="personal-notes" class="widget{{if $hidden}} d-none{{/if}}"> - <div class="float-end rounded border border-secondary mb-1 ps-1 pe-1 text-muted small note-mode" title="Double click note for edit mode">Read mode</div> - <h3 class="float-start">{{$banner}}</h3> + <div class="float-end rounded border border-secondary mb-1 ps-1 pe-1 text-muted small note-mode" title="Double click note for edit mode">{{$strings.read}}</div> + <h3 class="float-start">{{$strings.title}}</h3> {{/if}} <textarea name="note_text" id="note-text" class="form-control{{if $app}} border-0{{else}} p-1{{/if}}" style="display: none;">{{$text}}</textarea> <div id="note-text-html" class="{{if !$app}}border rounded p-1{{/if}}">{{$html}}</div> @@ -86,22 +86,22 @@ case 'edit': obj.removeClass('border-secondary border-success text-muted text-success') obj.addClass('border-danger text-danger') - obj.html('Edit mode'); + obj.html('{{$strings.edit}}'); break; case 'editing': obj.removeClass('border-secondary border-success text-muted text-success') obj.addClass('border-danger text-danger') - obj.html('Editing...'); + obj.html('{{$strings.editing}}{{$strings.dots}}'); break; case 'saving': obj.removeClass('border-secondary border-danger text-muted text-danger') obj.addClass('border-success text-success') - obj.html('Saving...'); + obj.html('{{$strings.saving}}{{$strings.dots}}'); break; case 'saved': obj.removeClass('border-secondary border-danger text-muted text-danger') obj.addClass('border-success text-success') - obj.html('Saved'); + obj.html('{{$strings.saved}}'); setTimeout(function () { if(noteEditing) { setNoteMode(noteMode, noteEditing === 1 ? 'edit' : 'editing'); @@ -113,7 +113,7 @@ break; case 'read': default: - obj.removeClass('border-success border-danger text-success text-danger').addClass('border-secondary text-muted').html('Read mode'); + obj.removeClass('border-success border-danger text-success text-danger').addClass('border-secondary text-muted').html('{{$strings.read}}'); } } diff --git a/view/tpl/permcats.tpl b/view/tpl/permcats.tpl index 5b2d811d7..d0f175cfb 100644 --- a/view/tpl/permcats.tpl +++ b/view/tpl/permcats.tpl @@ -4,61 +4,63 @@ <div class="clear"></div> </div> <div class="section-content-tools-wrapper"> - <div class="section-content-info-wrapper"> - {{$desc}} - </div> + <form action="permcats/{{$return_path}}" id="settings-permcats-form" method="post" autocomplete="off" > + <input type="hidden" name="form_security_token" value="{{$form_security_token}}"> + <input type="hidden" name="return_path" value="{{$return_path}}"> + + {{if $is_system_role}} + <input type="hidden" name="is_system_role" value="1"> + <input type="hidden" name="name" value="{{$is_system_role}}"> + {{/if}} - <form action="permcats" id="settings-permcats-form" method="post" autocomplete="off" > - <input type='hidden' name='form_security_token' value='{{$form_security_token}}'> {{include file="field_input.tpl" field=$name}} + {{include file="field_checkbox.tpl" field=$default_role}} + + {{$group_select}} - <div class="settings-submit-wrapper mb-3"> - <button type="submit" name="submit" class="btn btn-primary">{{$submit}}</button> + <div class="section-subtitle-wrapper" id="perms-tool"> + <h3> + {{$permlbl}} + </h3> </div> + <div class="section-content-warning-wrapper"> + {{$permnote}} + </div> + <table id="" class="table table-hover"> + {{foreach $perms as $prm}} + {{include file="field_acheckbox.tpl" field=$prm}} + {{/foreach}} + </table> + <div class="clearfix"> + {{if !$is_system_role && $return_path}} + <button type="button" class="btn btn-outline-danger" data-bs-toggle="modal" data-bs-target="#delete-modal">{{$delet_role_button}}</button> + {{/if}} + <button type="submit" name="submit" class="btn btn-primary float-end">{{$submit}}</button> + </div> + </form> </div> - - <div class="panel" id="permission-settings"> - <div class="section-subtitle-wrapper" role="tab" id="perms-tool"> - <h3> - <a data-bs-toggle="collapse" data-bs-parent="#permission-settings" href="#perms-tool-collapse" aria-expanded="true" aria-controls="perms-tool-collapse"> - {{$permlbl}} - </a> - </h3> - </div> - <div id="perms-tool-collapse" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="perms-tool"> - <div class="section-content-tools-wrapper"> - <div class="section-content-warning-wrapper"> - {{$permnote}} - </div> - - <table id="perms-tool-table" class=mb-3> - <tr> - <td></td><td colspan="2" class="abook-me">{{$me}}</td> - </tr> - {{foreach $perms as $prm}} - {{include file="field_acheckbox.tpl" field=$prm}} - {{/foreach}} - </table> - - <div class="settings-submit-wrapper" > - <button type="submit" name="submit" class="btn btn-primary">{{$submit}}</button> +</div> +{{if !$is_system_role && $return_path}} +<div id="delete-modal" class="modal" tabindex="-1"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <div class="h3"> + {{$delete_label}} </div> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> + <form action="permcats" id="delete-permcat-form" method="post"> + <input type="hidden" name="form_security_token" value="{{$form_security_token}}"> + <input type="hidden" name="deleted_role" value="{{$current_role}}"> + <div id="edit-modal-body" class="modal-body"> + {{include file="field_select.tpl" field=$delete_role_select}} + </div> + <div class="modal-footer"> + <button id="" type="submit" class="btn btn-danger">{{$delet_role_button}}</button> + </div> + </form> </div> - {{if $permcats}} - <div class="section-content-wrapper-np"> - <table id="permcat-index"> - {{foreach $permcats as $k => $v}} - <tr class="permcat-row-{{$k}}"> - <td width="99%"><a href="permcats/{{$k}}">{{$v}}</a></td> - <td width="1%"><i class="fa fa-trash-o drop-icons" onClick="dropItem('permcats/{{$k}}/drop', '.permcat-row-{{$k}}')"></i></td> - </tr> - {{/foreach}} - </table> - </div> - {{/if}} - </div> - </form> - </div> +{{/if}} diff --git a/view/tpl/permcats_widget.tpl b/view/tpl/permcats_widget.tpl new file mode 100644 index 000000000..a7ebd91ba --- /dev/null +++ b/view/tpl/permcats_widget.tpl @@ -0,0 +1,27 @@ +<div class="widget"> + <h3>{{$roles_label}}</h3> + <ul class="nav nav-pills flex-column"> + {{foreach $roles as $role}} + <li class="nav-item"> + <a class="nav-link{{if $role.active}} active{{/if}}" href="{{$role.url}}"> + {{$role.name}} + </a> + </li> + {{/foreach}} + </ul> +</div> + +{{if $members}} +<div class="widget"> + <h3>{{$members_label}}</h3> + <div class="border rounded overflow-auto" style="height: 19rem;"> + {{foreach $members as $member}} + <a href="{{$member.url}}" class="lh-sm border-bottom p-2 d-block text-truncate"> + <img src="{{$member.photo}}" class="float-start rounded me-2" style="height: 2.2rem; width: 2.2rem;" loading="lazy"> + {{$member.name}}<br> + <span class="text-muted small">{{$member.addr}}</span> + </a> + {{/foreach}} + </div> +</div> +{{/if}} diff --git a/view/tpl/privacy_groups.tpl b/view/tpl/privacy_groups.tpl index c06f5b0ca..b52cec4c8 100644 --- a/view/tpl/privacy_groups.tpl +++ b/view/tpl/privacy_groups.tpl @@ -1,29 +1,16 @@ <div class="generic-content-wrapper"> <div class="clearfix section-title-wrapper"> - <button type="button" class="btn btn-sm btn-success float-end" onclick="openClose('group_tools')"><i class="fa fa-plus-circle"></i> {{$add_new_label}}</button> <h2>{{$title}}</h2> </div> - <div id="group_tools" class="clearfix section-content-tools-wrapper"{{if ! $new}} style="display: none"{{/if}}> + <div id="group_tools" class="clearfix section-content-tools-wrapper"> <form action="group/new" id="group-edit-form" method="post" > <input type='hidden' name='form_security_token' value='{{$form_security_token}}'> {{include file="field_input.tpl" field=$gname}} {{include file="field_checkbox.tpl" field=$public}} + {{include file="field_checkbox.tpl" field=$is_default_acl}} + {{include file="field_checkbox.tpl" field=$is_default_group}} {{$pgrp_extras}} - <button type="submit" name="submit" class="btn btn-sm btn-primary float-end">{{$submit}}</button> + <button type="submit" name="submit" class="btn btn-primary float-end">{{$submit}}</button> </form> </div> - - <table id="groups-index"> - <tr> - <th width="99%">{{$name_label}}</th> - <th width="1%">{{$count_label}}</th> - </tr> - - {{foreach $entries as $group}} - <tr id="groups-index-{{$group.id}}" class="group-index-row"> - <td><a href="group/{{$group.id}}">{{$group.name}}</a></td> - <td>{{$group.count}}</td> - </tr> - {{/foreach}} - </table> </div> diff --git a/view/tpl/profile_advanced.tpl b/view/tpl/profile_advanced.tpl index a4f6c9525..dab2db4ac 100644 --- a/view/tpl/profile_advanced.tpl +++ b/view/tpl/profile_advanced.tpl @@ -21,9 +21,8 @@ <a class="btn btn-primary btn-sm dropdown-toggle" data-bs-toggle="dropdown" href="#" ><i class="fa fa-pencil"></i> {{$editmenu.edit.3}}</a> <div class="dropdown-menu dropdown-menu-end"> {{foreach $editmenu.menu.entries as $e}} - <a class="dropdown-item" href="profiles/{{$e.id}}"><img class="dropdown-menu-img-xs" src='{{$e.photo}}'> {{$e.profile_name}}</a> + <a class="dropdown-item" href="profiles/{{$e.id}}"><img class="menu-img-1" src='{{$e.photo}}'> {{$e.profile_name}}</a> {{/foreach}} - <a class="dropdown-item" href="profile_photo" >{{$editmenu.menu.chg_photo}}</a> {{if $editmenu.menu.cr_new}} <a class="dropdown-item" href="profiles/new" id="profile-listing-new-link">{{$editmenu.menu.cr_new}}</a> {{/if}} diff --git a/view/tpl/profile_edit.tpl b/view/tpl/profile_edit.tpl index 95346b3a8..c55ce0183 100644 --- a/view/tpl/profile_edit.tpl +++ b/view/tpl/profile_edit.tpl @@ -5,7 +5,7 @@ <i class="fa fa-cog"></i> {{$tools_label}} </button> <div class="dropdown-menu dropdown-menu-end"> - <a class="dropdown-item" href="profile_photo" id="profile-photo_upload-link" title="{{$profpic}}"><i class="fa fa-fw fa-user"></i> {{$profpic}}</a> + <a class="dropdown-item" href="profile_photo/{{$profile_id}}" id="profile-photo_upload-link" title="{{$profpic}}"><i class="fa fa-fw fa-user"></i> {{$profpic}}</a> {{if $is_default}} <a class="dropdown-item" href="cover_photo" id="cover-photo_upload-link" title="{{$coverpic}}"><i class="fa fa-fw fa-picture-o"></i> {{$coverpic}}</a> {{/if}} @@ -30,7 +30,7 @@ {{/if}} </div> </div> - <h2>{{$banner}}</h2> + <h2>{{$banner}}{{if $multi_profiles}}: {{$profile_name.2}}{{/if}}</h2> <div class="clear"></div> </div> <div class="section-content-tools-wrapper" id="profile-upload-form"> @@ -50,7 +50,7 @@ <div class="section-subtitle-wrapper" role="tab" id="personal"> <h3> <a data-bs-toggle="collapse" data-bs-target="#personal-collapse" href="#" aria-expanded="true" aria-controls="personal-collapse"> - {{$personal}} + {{$basic}} </a> </h3> </div> @@ -84,7 +84,17 @@ {{$dob}} {{/if}} + {{$profile_in_dir}} + + {{$suggestme}} + + {{if $show_presence}} + {{include file="field_checkbox.tpl" field=$show_presence}} + {{/if}} + + {{if $hide_friends}} {{include file="field_checkbox.tpl" field=$hide_friends}} + {{/if}} <div class="mb-3" > <button type="submit" name="submit" class="btn btn-primary" value="{{$submit}}">{{$submit}}</button> diff --git a/view/tpl/profile_photo.tpl b/view/tpl/profile_photo.tpl index c608806ca..c8f5b939a 100644 --- a/view/tpl/profile_photo.tpl +++ b/view/tpl/profile_photo.tpl @@ -1,152 +1,56 @@ -<script> - var initializeEmbedPhotoDialog = function () { - $('.embed-photo-selected-photo').each(function (index) { - $(this).removeClass('embed-photo-selected-photo'); - }); - getPhotoAlbumList(); - $('#embedPhotoModalBodyAlbumDialog').off('click'); - $('#embedPhotoModal').modal('show'); - }; - - var choosePhotoFromAlbum = function (album) { - $.post("embedphotos/album", {name: album}, - function(data) { - if (data['status']) { - $('#embedPhotoModalLabel').html("{{$modalchooseimages}}"); - $('#embedPhotoModalBodyAlbumDialog').html('\ - <div><div class="nav nav-pills flex-column">\n\ - <li class="nav-item"><a class="nav-link" href="#" onclick="initializeEmbedPhotoDialog();return false;">\n\ - <i class="fa fa-chevron-left"></i> \n\ - {{$modaldiffalbum}}\n\ - </a>\n\ - </li>\n\ - </div><br></div>') - $('#embedPhotoModalBodyAlbumDialog').append(data['content']); - $('#embedPhotoModalBodyAlbumDialog').click(function (evt) { - evt.preventDefault(); - var image = document.getElementById(evt.target.id); - if (typeof($(image).parent()[0]) !== 'undefined') { - var imageparent = document.getElementById($(image).parent()[0].id); - $(imageparent).toggleClass('embed-photo-selected-photo'); - var href = $(imageparent).attr('href'); - $.post("embedphotos/photolink", {href: href}, - function(ddata) { - if (ddata['status']) { - var pf = $('#profile-photo-profiles').val(); - var prof = ((typeof pf !== 'undefined') ? '?f=&pf=' + pf : ''); - window.location.href = 'profile_photo/use/' + ddata['resource_id'] + prof; - } else { - window.console.log("{{$modalerrorlink}}" + ':' + ddata['errormsg']); - } - return false; - }, - 'json'); - $('#embedPhotoModalBodyAlbumDialog').html(''); - $('#embedPhotoModalBodyAlbumDialog').off('click'); - $('#embedPhotoModal').modal('hide'); - } - }); - - $('#embedPhotoModalBodyAlbumListDialog').addClass('d-none'); - $('#embedPhotoModalBodyAlbumDialog').removeClass('d-none'); - } else { - window.console.log("{{$modalerroralbum}} " + JSON.stringify(album) + ':' + data['errormsg']); - } - return false; - }, - 'json'); - }; - - var getPhotoAlbumList = function () { - $.post("embedphotos/albumlist", {}, - function(data) { - if (data['status']) { - var albums = data['albumlist']; //JSON.parse(data['albumlist']); - $('#embedPhotoModalLabel').html("{{$modalchoosealbum}}"); - $('#embedPhotoModalBodyAlbumList').html('<ul class="nav nav-pills flex-column"></ul>'); - for(var i=0; i<albums.length; i++) { - var albumName = albums[i].text; - var jsAlbumName = albums[i].jstext; - var albumLink = '<li class="nav-item">'; - albumLink += '<a class="nav-link" href="#" onclick="choosePhotoFromAlbum(\'' + jsAlbumName + '\'); return false;">' + albumName + '</a>'; - albumLink += '</li>'; - $('#embedPhotoModalBodyAlbumList').find('ul').append(albumLink); - } - $('#embedPhotoModalBodyAlbumDialog').addClass('d-none'); - $('#embedPhotoModalBodyAlbumListDialog').removeClass('d-none'); - } else { - window.console.log("{{$modalerrorlist}}" + ':' + data['errormsg']); - } - return false; - }, - 'json'); - }; -</script> - +<input id="invisible-photos-file-upload" type="file" name="files" style="visibility:hidden;position:absolute;top:-50px;left:-50px;width:0;height:0;"> <div id="profile-photo-content" class="generic-content-wrapper"> - <div class="section-title-wrapper"> - <h2>{{$title}}</h2> - </div> - <div class="section-content-wrapper"> - - <form enctype="multipart/form-data" action="profile_photo" method="post"> - <input type='hidden' name='form_security_token' value='{{$form_security_token}}'> - - <div id="profile-photo-upload-wrapper"> - {{if $info}} - <div class="section-content-warning-wrapper">{{$info}}</div> - {{/if}} - {{if $importfile}} - <input type="hidden" name="importfile" value="{{$importfile}}"> - {{else}} - <label id="profile-photo-upload-label" class="form-label" for="profile-photo-upload">{{$lbl_upfile}}</label> - <input name="userfile" class="form-input" type="file" id="profile-photo-upload" size="48" /> - {{/if}} - <div class="clear"></div> - - - {{if $single}} - <input type="hidden" name="profile" value="{{$profile0.id}}" /> - {{else}} - - - - <label id="profile-photo-profiles-label" class="form-label" for="profile-photo-profiles">{{$lbl_profiles}}</label> - <select name="profile" id="profile-photo-profiles" class="form-control" > - {{foreach $profiles as $p}} - <option value="{{$p.id}}" {{if $p.selected}}selected="selected"{{/if}}>{{$p.name}}</option> - {{/foreach}} - </select> - <div class="clear"></div> - <br /> - <br /> - {{/if}} - - <div id="profile-photo-submit-wrapper"> - <button type="submit" class="btn btn-outline-primary" name="submit" id="profile-photo-submit">{{$submit}}</button> - <button type="submit" class="btn btn-outline-danger" name="remove" id="profile-photo-remove">{{$remove}}</button> + <div class="section-title-wrapper"> + <h2>{{$title}}: {{$profile.name}}</h2> + </div> + <div class="section-content-wrapper"> + + <form enctype="multipart/form-data" id="profile-photo-form" action="profile_photo" method="post"> + <input type='hidden' name='form_security_token' value='{{$form_security_token}}'> + + <div id="profile-photo-upload-wrapper"> + {{if $info}} + <div class="section-content-warning-wrapper">{{$info}}</div> + {{/if}} + {{if $importfile}} + <input type="hidden" name="importfile" value="{{$importfile}}"> + {{/if}} + <div class="clear mb-3"></div> + + <input type="hidden" name="profile" value="{{$profile_id}}"/> + + <div id="profile-photo-upload-spinner" class="spinner-wrapper"> + <div class="spinner m"></div> + </div> + <div id="profile-photo-submit-wrapper"> + <button type="submit" class="btn btn-primary float-end" name="submit" id="profile-photo-submit"> + {{$submit}} + </button> + <button id="embed-photo-wrapper" type="button" + class="btn btn-default btn-outline-success float-end me-1" title="{{$embedPhotos}}" + onclick="initializeEmbedPhotoDialog();"> + <i id="embed-photo" class="fa fa-file-image-o"></i> {{$select}} + </button> + <button type="submit" class="btn btn-outline-danger" name="remove" id="profile-photo-remove"> + {{$remove}} + </button> + </div> </div> - </div> </form> - <br /> - <div id="profile-photo-link-select-wrapper"> - <button id="embed-photo-wrapper" class="btn btn-default btn-primary" title="{{$embedPhotos}}" onclick="initializeEmbedPhotoDialog();return false;"> - <i id="embed-photo" class="fa fa-file-image-o"></i> {{$select}} - </button> - </div> </div> </div> -<div class="modal" id="embedPhotoModal" tabindex="-1" role="dialog" aria-labelledby="embedPhotoLabel" aria-hidden="true"> +<div class="modal" id="embedPhotoModal" tabindex="-1" role="dialog" aria-labelledby="embedPhotoLabel" + aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title" id="embedPhotoModalLabel">{{$embedPhotosModalTitle}}</h4> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-hidden="true"></button> </div> - <div class="modal-body" id="embedPhotoModalBody" > + <div class="modal-body" id="embedPhotoModalBody"> <div id="embedPhotoModalBodyAlbumListDialog" class="d-none"> <div id="embedPhotoModalBodyAlbumList"></div> </div> @@ -155,3 +59,115 @@ </div><!-- /.modal-content --> </div><!-- /.modal-dialog --> </div><!-- /.modal --> + +<script src="vendor/blueimp/jquery-file-upload/js/vendor/jquery.ui.widget.js"></script> +<script src="vendor/blueimp/jquery-file-upload/js/jquery.iframe-transport.js"></script> +<script src="vendor/blueimp/jquery-file-upload/js/jquery.fileupload.js"></script> +<script> + var initializeEmbedPhotoDialog = function () { + $('.embed-photo-selected-photo').each(function (index) { + $(this).removeClass('embed-photo-selected-photo'); + }); + getPhotoAlbumList(); + $('#embedPhotoModalBodyAlbumDialog').off('click'); + $('#embedPhotoModal').modal('show'); + }; + + var choosePhotoFromAlbum = function (album) { + $.post("embedphotos/album", {name: album}, + function (data) { + if (data['status']) { + $('#embedPhotoModalLabel').html("{{$modalchooseimages}}"); + $('#embedPhotoModalBodyAlbumDialog').html('\ + <div><div class="nav nav-pills flex-column">\n\ + <li class="nav-item"><a class="nav-link" href="#" onclick="initializeEmbedPhotoDialog();return false;">\n\ + <i class="fa fa-chevron-left"></i> \n\ + {{$modaldiffalbum}}\n\ + </a>\n\ + </li>\n\ + </div><br></div>') + $('#embedPhotoModalBodyAlbumDialog').append(data['content']); + $('#embedPhotoModalBodyAlbumDialog').click(function (evt) { + evt.preventDefault(); + var image = document.getElementById(evt.target.id); + if (typeof ($(image).parent()[0]) !== 'undefined') { + var imageparent = document.getElementById($(image).parent()[0].id); + $(imageparent).toggleClass('embed-photo-selected-photo'); + var href = $(imageparent).attr('href'); + $.post("embedphotos/photolink", {href: href}, + function (ddata) { + if (ddata['status']) { + window.location.href = 'profile_photo/use/' + ddata['resource_id'] + '?f=&profile={{$profile_id}}'; + } else { + window.console.log("{{$modalerrorlink}}" + ':' + ddata['errormsg']); + } + return false; + }, + 'json'); + $('#embedPhotoModalBodyAlbumDialog').html(''); + $('#embedPhotoModalBodyAlbumDialog').off('click'); + $('#embedPhotoModal').modal('hide'); + } + }); + + $('#embedPhotoModalBodyAlbumListDialog').addClass('d-none'); + $('#embedPhotoModalBodyAlbumDialog').removeClass('d-none'); + } else { + window.console.log("{{$modalerroralbum}} " + JSON.stringify(album) + ':' + data['errormsg']); + } + return false; + }, + 'json'); + }; + + var getPhotoAlbumList = function () { + $.post("embedphotos/albumlist", {}, + function (data) { + if (data['status']) { + var albums = data['albumlist']; //JSON.parse(data['albumlist']); + $('#embedPhotoModalLabel').html("{{$modalchoosealbum}}"); + $('#embedPhotoModalBodyAlbumList').html('<ul class="nav nav-pills flex-column"></ul>'); + for (var i = 0; i < albums.length; i++) { + var albumName = albums[i].text; + var jsAlbumName = albums[i].jstext; + var albumLink = '<li class="nav-item">'; + albumLink += '<a class="nav-link" href="#" onclick="choosePhotoFromAlbum(\'' + jsAlbumName + '\'); return false;">' + albumName + '</a>'; + albumLink += '</li>'; + $('#embedPhotoModalBodyAlbumList').find('ul').append(albumLink); + } + $('#embedPhotoModalBodyAlbumDialog').addClass('d-none'); + $('#embedPhotoModalBodyAlbumListDialog').removeClass('d-none'); + } else { + window.console.log("{{$modalerrorlist}}" + ':' + data['errormsg']); + } + return false; + }, + 'json'); + }; + + + $('#invisible-photos-file-upload').fileupload({ + url: 'profile_photo', + dataType: 'json', + // dropZone: filedrag, + maxChunkSize: 2 * 1024 * 1024, + + add: function (e, data) { + data.formData = $('#profile-photo-form').serializeArray(); + data.submit(); + $('#profile-photo-upload-spinner').show(); + }, + + done: function (e, data) { + $('#profile-photo-upload-spinner').hide(); + window.location.href = 'profile_photo/use/' + data.result.message + '?profile={{$profile_id}}'; + } + + }); + + $('#profile-photo-submit').click(function (event) { + event.preventDefault(); + $('#invisible-photos-file-upload').trigger('click'); + return false; + }); +</script> diff --git a/view/tpl/profile_vcard.tpl b/view/tpl/profile_vcard.tpl index 13caf5603..3da580f60 100644 --- a/view/tpl/profile_vcard.tpl +++ b/view/tpl/profile_vcard.tpl @@ -1,60 +1,100 @@ -<div class="vcard h-card"> - {{if ! $zcard}} - <div id="profile-photo-wrapper">{{if $editmenu}}<a href="profile_photo" title="{{$change_photo}}">{{/if}}<img class="photo u-photo" src="{{$profile.photo}}?rev={{$profile.picdate}}" alt="{{$profile.fullname}}">{{if $editmenu}}</a>{{/if}}</div> - {{/if}} - {{if $connect}} - <div class="connect-btn-wrapper"><a href="{{$connect_url}}" class="btn btn-block btn-success btn-sm"><i class="fa fa-plus"></i> {{$connect}}</a></div> - {{/if}} - {{if ! $zcard}} - {{if $editmenu.multi}} - <div class="dropdown float-end"> - <a class="dropdown-toggle" data-bs-toggle="dropdown" href="#" ><i class="fa fa-pencil" title="{{$editmenu.edit.1}}"></i></a> - <div class="dropdown-menu dropdown-menu-end" role="menu"> - {{foreach $editmenu.menu.entries as $e}} - <a href="profiles/{{$e.id}}" class="dropdown-item"><img class="menu-img-1" src='{{$e.photo}}'> {{$e.profile_name}}</a> - {{/foreach}} - <a href="profile_photo" class="dropdown-item">{{$editmenu.menu.chg_photo}}</a> - {{if $editmenu.menu.cr_new}}<a href="profiles/new" id="profile-listing-new-link" class="dropdown-item">{{$editmenu.menu.cr_new}}</a>{{/if}} +<div class="rounded mb-3 vcard-card h-card"> + <div class="card mb-2"> + <div class="row"> + <div class="col-4" style="width: fit-content;"> + <div id="profile-photo-wrapper"> + <img class="rounded-start u-photo" src="{{$profile.photo}}?rev={{$profile.picdate}}" alt="{{$profile.fullname}}" style="width: 6rem; height:6rem;"> + </div> + </div> + <div class="col-7 m-1 p-0"> + {{if $editmenu.multi}} + <div class="dropdown float-end"> + <a class="profile-edit-side-link float-end" data-bs-toggle="dropdown" href="#" ><i class="fa fa-pencil" title="{{$editmenu.edit.1}}"></i></a> + <div class="dropdown-menu dropdown-menu-end" role="menu"> + {{foreach $editmenu.menu.entries as $e}} + <a href="profiles/{{$e.id}}" class="dropdown-item"><img class="menu-img-1" src='{{$e.photo}}'> {{$e.profile_name}}</a> + {{/foreach}} + {{if $editmenu.menu.cr_new}} + <a href="profiles/new" id="profile-listing-new-link" class="dropdown-item">{{$editmenu.menu.cr_new}}</a> + {{/if}} + </div> + </div> + {{elseif $editmenu}} + <a class="profile-edit-side-link float-end" href="{{$editmenu.edit.0}}" ><i class="fa fa-pencil" title="{{$editmenu.edit.1}}"></i></a> + {{/if}} + + <div class="text-truncate"> + <strong class="fn p-name">{{$profile.fullname}}{{if $profile.online}}<i class="fa fa-fw fa-asterisk text-danger ps-2" title="{{$profile.online}}"></i>{{/if}}</strong> + </div> + <div class="text-truncate"> + <small class="text-muted p-adr">{{$profile.reddress}}</small> + </div> + {{if $connect}} + <div class="mt-1"> + <a href="{{$connect_url}}" class="btn btn-success btn-sm" rel="nofollow"> + <i class="fa fa-plus"></i> {{$connect}} + </a> + </div> + {{/if}} + </div> </div> </div> - {{elseif $editmenu}} - <a class="profile-edit-side-link" href="{{$editmenu.edit.0}}" ><i class="fa fa-pencil" title="{{$editmenu.edit.1}}"></i></a> - {{/if}} - {{/if}} - - {{if ! $zcard}} - <div class="fn p-name">{{$profile.fullname}}{{if $profile.online}} <i class="fa fa-asterisk online-now" title="{{$profile.online}}"></i>{{/if}}</div> - {{if $reddress}}<div class="reddress">{{$profile.reddress}}</div>{{/if}} - {{/if}} - {{if $pdesc}}<div class="title">{{$profile.pdesc}}</div>{{/if}} - {{if $location}} - <dl class="location"><dt class="location-label">{{$location}}</dt> - <dd class="adr h-adr"> - {{if $profile.address}}<div class="street-address p-street-address">{{$profile.address}}</div>{{/if}} - <span class="city-state-zip"> - <span class="locality p-locality">{{$profile.locality}}</span>{{if $profile.locality}}, {{/if}} - <span class="region p-region">{{$profile.region}}</span> - <span class="postal-code p-postal-code">{{$profile.postal_code}}</span> - </span> - {{if $profile.country_name}}<span class="country-name p-country-name">{{$profile.country_name}}</span>{{/if}} - </dd> + {{if $details}} + <div class="vcard ps-2 pe-2"> + {{if $profile.pdesc}} + <div class="mb-2">{{$profile.pdesc}}</div> + {{/if}} + {{if $location}} + <dl class="mb-0 pb-1"> + <dt class="location-label">{{$location}}</dt> + <dd class="adr h-adr"> + {{if $profile.address}} + <div class="street-address p-street-address">{{$profile.address}}</div> + {{/if}} + <div class="city-state-zip"> + <span class="postal-code p-postal-code">{{$profile.postal_code}}</span> + <span class="locality p-locality">{{$profile.locality}}</span> + </div> + {{if $profile.region}} + <div class="region p-region">{{$profile.region}}</div> + {{/if}} + {{if $profile.country_name}} + <div class="country-name p-country-name">{{$profile.country_name}}</div> + {{/if}} + </dd> + </dl> + {{/if}} + {{if $hometown}} + <dl class="mb-0 pb-1"> + <dt class="hometown-label">{{$hometown}}</dt> + <dd class="p-hometown">{{$profile.hometown}}</dd> + </dl> + {{/if}} + {{if $gender}} + <dl class="mb-0 pb-1"> + <dt class="gender-label">{{$gender}}</dt> + <dd class="p-gender">{{if $profile.gender_icon}}<i class="fa fa-{{$profile.gender_icon}}"></i> {{/if}}{{$profile.gender}}</dd> + </dl> + {{/if}} + {{if $marital}} + <dl class="mb-0 pb-1"> + <dt class="marital-label"><span class="heart"><i class="fa fa-heart"></i> </span>{{$marital}}</dt> + <dd class="marital-text">{{$profile.marital}}</dd> </dl> + {{/if}} + {{if $homepage}} + <dl class="mb-0 pb-1"> + <dt class="homepage-label">{{$homepage}}</dt> + <dd class="homepage-url u-url">{{$profile.homepage}}</dd> + </dl> + {{/if}} + <div class="hcard-addon"></div> + </div> {{/if}} - - {{if $gender}}<dl class="mf"><dt class="gender-label">{{$gender}}</dt> <dd class="p-gender">{{if $profile.gender_icon}}<i class="fa fa-{{$profile.gender_icon}}"></i> {{/if}}{{$profile.gender}}</dd></dl>{{/if}} - - {{if $marital}}<dl class="marital"><dt class="marital-label"><span class="heart"><i class="fa fa-heart"></i> </span>{{$marital}}</dt><dd class="marital-text">{{$profile.marital}}</dd></dl>{{/if}} - - {{if $homepage}}<dl class="homepage"><dt class="homepage-label">{{$homepage}}</dt><dd class="homepage-url u-url">{{$profile.homepage}}</dd></dl>{{/if}} - -<div class="hcard-addon"></div> </div> -<div class="clear"></div> - -{{$rating}} - +{{if $details}} {{$chanmenu}} - {{$contact_block}} +{{/if}} diff --git a/view/tpl/search_item.tpl b/view/tpl/search_item.tpl index ee89973a8..cb9ad57cc 100644 --- a/view/tpl/search_item.tpl +++ b/view/tpl/search_item.tpl @@ -24,6 +24,9 @@ <div class="wall-item-info" id="wall-item-info-{{$item.id}}" > <div class="wall-item-photo-wrapper{{if $item.owner_url}} wwfrom{{/if}}" id="wall-item-photo-wrapper-{{$item.id}}"> <img src="{{$item.thumb}}" class="fakelink wall-item-photo{{$item.sparkle}} u-photo p-name" id="wall-item-photo-{{$item.id}}" alt="{{$item.name}}" data-bs-toggle="dropdown" loading="lazy" /> + {{if $item.author_is_group_actor}} + <i class="fa fa-comments-o wall-item-photo-group-actor" title="{{$item.author_is_group_actor}}"></i> + {{/if}} {{if $item.thread_author_menu}} <i class="fa fa-caret-down wall-item-photo-caret cursor-pointer" data-bs-toggle="dropdown"></i> <div class="dropdown-menu"> @@ -36,7 +39,7 @@ </div> {{if $item.lock}} <div class="wall-item-lock dropdown"> - <i class="fa {{if $item.locktype == 2}}fa-envelope-o{{else}}fa-lock{{/if}} lockview" data-bs-toggle="dropdown" title="{{$item.lock}}" onclick="lockview('item',{{$item.id}});" ></i><ul id="panel-{{$item.id}}" class="lockview-panel dropdown-menu"></ul> + <i class="fa {{if $item.locktype == 2}}fa-envelope-o{{else if $item.locktype == 1}}fa-lock{{else}}fa-unlock{{/if}} lockview{{if $item.privacy_warning}} text-danger{{/if}}" data-bs-toggle="dropdown" title="{{$item.lock}}" onclick="lockview('item',{{$item.id}});" ></i> </div> {{/if}} <div class="wall-item-author"> diff --git a/view/tpl/settings.tpl b/view/tpl/settings.tpl index 353da9c2b..9b23d7d82 100644 --- a/view/tpl/settings.tpl +++ b/view/tpl/settings.tpl @@ -18,13 +18,14 @@ </div> <div id="basic-settings-collapse" class="collapse show" role="tabpanel" aria-labelledby="basic-settings" data-bs-parent="#settings"> <div class="section-content-tools-wrapper"> - {{include file="field_input.tpl" field=$username}} + {{include file="field_select.tpl" field=$role}} {{include file="field_select_grouped.tpl" field=$timezone}} {{include file="field_input.tpl" field=$defloc}} {{include file="field_checkbox.tpl" field=$allowloc}} {{include file="field_checkbox.tpl" field=$adult}} {{include file="field_input.tpl" field=$photo_path}} {{include file="field_input.tpl" field=$attach_path}} + {{include file="field_input.tpl" field=$expire}} {{if $basic_addon}} {{$basic_addon}} {{/if}} @@ -35,66 +36,6 @@ </div> </div> <div class="panel"> - <div class="section-subtitle-wrapper" role="tab" id="privacy-settings"> - <h3> - <a data-bs-toggle="collapse" data-bs-target="#privacy-settings-collapse" href="#"> - {{$h_prv}} - </a> - </h3> - </div> - <div id="privacy-settings-collapse" class="collapse" role="tabpanel" aria-labelledby="privacy-settings" data-bs-parent="#settings"> - <div class="section-content-tools-wrapper"> - {{include file="field_select_grouped.tpl" field=$role}} - {{$autoperms}} - <div id="advanced-perm" style="display:{{if $permissions_set}}none{{else}}block{{/if}};"> - <div class="mb-3"> - <button type="button" class="btn btn-outline-secondary" data-bs-toggle="modal" data-bs-target="#apsModal">{{$lbl_p2macro}}</button> - </div> - <div class="modal" id="apsModal"> - <div class="modal-dialog"> - <div class="modal-content"> - <div class="modal-header"> - <h4 class="modal-title">{{$lbl_p2macro}}</h4> - <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> - </div> - <div class="modal-body"> - {{foreach $permiss_arr as $permit}} - {{include file="field_select.tpl" field=$permit}} - {{/foreach}} - </div> - <div class="modal-footer"> - <button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Close</button> - </div> - </div><!-- /.modal-content --> - </div><!-- /.modal-dialog --> - </div><!-- /.modal --> - - <div id="settings-default-perms" class="mb-3" > - <button type="button" class="btn btn-outline-secondary" data-bs-toggle="modal" data-bs-target="#aclModal"><i id="jot-perms-icon" class="fa"></i> {{$permissions}}</button> - </div> - {{$group_select}} - {{include file="field_checkbox.tpl" field=$hide_presence}} - {{$profile_in_dir}} - </div> - <div class="settings-common-perms"> - {{$suggestme}} - {{include file="field_checkbox.tpl" field=$blocktags}} - {{include file="field_input.tpl" field=$expire}} - </div> - {{if $permcat_enable}} - {{include file="field_select.tpl" field=$defpermcat}} - {{/if}} - - {{if $sec_addon}} - {{$sec_addon}} - {{/if}} - <div class="settings-submit-wrapper" > - <button type="submit" name="submit" class="btn btn-primary">{{$submit}}</button> - </div> - </div> - </div> - </div> - <div class="panel"> <div class="section-subtitle-wrapper" role="tab" id="notification-settings"> <h3> <a data-bs-toggle="collapse" data-bs-target="#notification-settings-collapse" href="#"> diff --git a/view/tpl/settings_privacy.tpl b/view/tpl/settings_privacy.tpl new file mode 100644 index 000000000..aff9619c3 --- /dev/null +++ b/view/tpl/settings_privacy.tpl @@ -0,0 +1,56 @@ +<div class="generic-content-wrapper"> + <div class="section-title-wrapper"> + <h2>{{$ptitle}}</h2> + </div> + {{$nickname_block}} + <form action="settings/privacy" id="settings-form" method="post" autocomplete="off"> + <input type='hidden' name='form_security_token' value='{{$form_security_token}}' /> + + <div class="section-content-tools-wrapper"> + + {{include file="field_checkbox.tpl" field=$autoperms}} + {{include file="field_checkbox.tpl" field=$index_opt_out}} + + {{if $sec_addon}} + {{$sec_addon}} + {{/if}} + {{if $permission_limits}} + <div id="permission-limits"> + <div class="modal" id="apsModal"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <div class="modal-title h3">{{$permission_limits_label}}</div> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> + </div> + <div class="modal-body"> + <div class="multi-collapse collapse show"> + <h2 class="text-danger mb-3"><i class="fa fa-warning"></i> {{$permission_limits_warning.0}}</h2> + <h3 class="mb-3">{{$permission_limits_warning.1}}</h3> + <button type="button" class="btn btn-primary" data-bs-toggle="collapse" data-bs-target=".multi-collapse" aria-expanded="false" aria-controls="collapseExample">{{$permission_limits_warning.2}}</button> + </div> + <div class="multi-collapse collapse"> + {{foreach $permiss_arr as $permit}} + {{include file="field_select.tpl" field=$permit}} + {{/foreach}} + {{include file="field_checkbox.tpl" field=$group_actor}} + </div> + + </div> + <div class="modal-footer"> + <button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Close</button> + </div> + </div><!-- /.modal-content --> + </div><!-- /.modal-dialog --> + </div><!-- /.modal --> + </div> + <div class="float-end"> + <button type="button" class="btn btn-outline-secondary" data-bs-toggle="modal" data-bs-target="#apsModal">{{$permission_limits_label}}</button> + </div> + {{/if}} + <div class="settings-submit-wrapper" > + <button type="submit" name="submit" class="btn btn-primary">{{$submit}}</button> + </div> + </div> + </form> +</div> diff --git a/view/tpl/tokens.tpl b/view/tpl/tokens.tpl index 6bf8dc202..3b267ddcc 100644 --- a/view/tpl/tokens.tpl +++ b/view/tpl/tokens.tpl @@ -14,59 +14,13 @@ {{include file="field_input.tpl" field=$name}} {{include file="field_input.tpl" field=$token}} {{include file="field_input.tpl" field=$expires}} - <div class="settings-submit-wrapper mb-3"> - <button type="submit" name="submit" class="btn btn-primary">{{$submit}}</button> - </div> - </div> - - <div class="panel" id="permission-settings"> - <div class="section-subtitle-wrapper" role="tab" id="perms-tool"> - <h3> - <a data-bs-toggle="collapse" data-bs-parent="#permission-settings" href="#perms-tool-collapse" aria-expanded="true" aria-controls="perms-tool-collapse"> - {{$permlbl}} - </a> - </h3> - </div> - <div id="perms-tool-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="perms-tool"> - <div class="section-content-tools-wrapper"> - <div class="section-content-warning-wrapper"> - {{$permnote}} - </div> - - <table id="perms-tool-table" class=mb-3> - <tr> - <td></td><td colspan="2" class="abook-me">{{$me}}</td> - </tr> - {{foreach $perms as $prm}} - {{include file="field_acheckbox.tpl" field=$prm}} - {{/foreach}} - </table> + {{include file="field_select.tpl" field=$permcat}} - <div class="settings-submit-wrapper" > - <button type="submit" name="submit" class="btn btn-primary">{{$submit}}</button> - </div> + <div class="clearfix"> + {{if $atoken}} + <button type="submit" name="delete" class="btn btn-outline-danger">{{$delete}}</button> + {{/if}} + <button type="submit" name="submit" class="btn btn-primary float-end">{{$submit}}</button> </div> - </div> - </div> - </form> - - <div class="descriptive-text">{{$desc2}}</div> - <ul> - <li>{{$url1}}<span class="zat-example">?f=&zat=<span class="token-mirror"></span></span></li> - <li>{{$url2}}<span class="zat-example">?f=&zat=<span class="token-mirror"></span></span></li> - </ul> - - {{if $tokens}} - <div class="section-content-wrapper-np"> - <table id="atoken-index"> - {{foreach $tokens as $t}} - <tr id="atoken-index-{{$t.atoken_id}}" class="atoken-index-row"> - <td width="99%"><a href="tokens/{{$t.atoken_id}}">{{$t.atoken_name}}</a></td> - <td width="1%" class="atoken-index-tool"><i class="fa fa-trash-o drop-icons" onClick="dropItem('tokens/{{$t.atoken_id}}/drop', '#atoken-index-{{$t.atoken_id}}')"></i></td> - </tr> - {{/foreach}} - </table> - </div> - {{/if}} </div> diff --git a/view/tpl/uexport.tpl b/view/tpl/uexport.tpl index 7eafd97a6..2b7967970 100644 --- a/view/tpl/uexport.tpl +++ b/view/tpl/uexport.tpl @@ -3,17 +3,54 @@ <h2>{{$title}}</h2> </div> <div class="section-content-wrapper"> - <b><a href="uexport/basic">{{$basictitle}}</a></b></p> - <p>{{$basic}}</p> - - <p><b><a href="uexport/complete">{{$fulltitle}}</a></b></p> - <p>{{$full}}</p> - - <p>{{$extra}}</p> - <p>{{$extra2}}</p> - <p>{{$extra3}}</p> - - <p>{{$extra4}}</p> - + <p class="mb-3"> + <h3>{{$channel_title}}</h3> + <p> + {{$channel_info}} + </p> + <a href="uexport/channel" class="btn btn-outline-primary"><i class="fa fa-download"></i> {{$channel_title}}</a> + </p> + <p class="mb-3"> + <h3>{{$content_title}}</h3> + <p> + {{$content_info}} + {{$items_extra_info}} + </p> + {{foreach $years as $year}} + <a href="uexport/{{$year}}" class="btn btn-outline-primary"><i class="fa fa-download"></i> {{$year}}</a> + {{/foreach}} + </p> + <p class="mb-3"> + <h3>{{$wikis_title}}</h3> + <p> + {{$wikis_info}} + {{$items_extra_info}} + </p> + <a href="uexport/wikis" class="btn btn-outline-primary"><i class="fa fa-download"></i> {{$wikis_title}}</a> + </p> + <p class="mb-3"> + <h3>{{$webpages_title}}</h3> + <p> + {{$webpages_info}} + {{$items_extra_info}} + </p> + <a href="uexport/webpages" class="btn btn-outline-primary"><i class="fa fa-download"></i> {{$webpages_title}}</a> + </p> + <p class="mb-3"> + <h3>{{$events_title}}</h3> + <p> + {{$events_info}} + {{$items_extra_info}} + </p> + <a href="uexport/events" class="btn btn-outline-primary"><i class="fa fa-download"></i> {{$events_title}}</a> + </p> + <p class="mb-3"> + <h3>{{$chatrooms_title}}</h3> + <p> + {{$chatrooms_info}} + {{$items_extra_info}} + </p> + <a href="uexport/chatrooms" class="btn btn-outline-primary"><i class="fa fa-download"></i> {{$chatrooms_title}}</a> + </p> </div> </div> diff --git a/view/tpl/widget_menu.tpl b/view/tpl/widget_menu.tpl new file mode 100644 index 000000000..86799ff00 --- /dev/null +++ b/view/tpl/widget_menu.tpl @@ -0,0 +1,10 @@ +<div class="widget"> + <h3>{{$title}}</h3> + <ul class="nav nav-pills flex-column"> + {{foreach $menu_items as $menu_item}} + <li class="nav-item"> + <a class="nav-link{{if $menu_item.active}} active{{/if}}" href="{{$menu_item.href}}" title="{{$menu_item.title}}">{{$menu_item.label}}</a> + <li> + {{/foreach}} + </ul> +</div> diff --git a/view/tpl/widget_menu_count.tpl b/view/tpl/widget_menu_count.tpl new file mode 100644 index 000000000..5e8189b5f --- /dev/null +++ b/view/tpl/widget_menu_count.tpl @@ -0,0 +1,13 @@ +<div class="widget"> + <h3>{{$title}}</h3> + <ul class="nav nav-pills flex-column"> + {{foreach $menu_items as $menu_item}} + <li class="nav-item"> + <a class="nav-link {{if $menu_item.active}} active{{/if}}" href="{{$menu_item.href}}" title="{{$menu_item.title}}"> + {{$menu_item.label}} + <span class="badge {{if $menu_item.active}} bg-light text-dark{{else}} bg-secondary{{/if}} float-end">{{$menu_item.count}}</span> + </a> + <li> + {{/foreach}} + </ul> +</div> diff --git a/view/tpl/xchan_vcard.tpl b/view/tpl/xchan_vcard.tpl index 7deae0f99..a5568f283 100644 --- a/view/tpl/xchan_vcard.tpl +++ b/view/tpl/xchan_vcard.tpl @@ -1,19 +1,19 @@ <div class="card mb-3 h-card"> <div class="row"> - <div class="col-4"> + <div class="col-4" style="width: 7rem;"> <a href="{{$link}}" > - <img class="u-photo" src="{{$photo}}" alt="{{$name}}" width="80px" height="80px"> + <img class="u-photo rounded-start" src="{{$photo}}" alt="{{$name}}" style="width: 6rem; height:6rem;"> </a> </div> - <div class="col-7 m-1"> - <div class="row"> - <strong class="fn p-name text-truncate">{{$name}}</strong> + <div class="col-7 m-1 p-0"> + <div class="text-truncate"> + <strong class="fn p-name">{{$name}}</strong> </div> - <div class="row"> - <small class="text-muted p-adr text-truncate">{{$addr}}</small> + <div class="text-truncate"> + <small class="text-muted p-adr">{{$addr}}</small> </div> {{if $connect}} - <div class="row mt-2"> + <div class="mt-1"> <a href="follow?f=&url={{$follow}}&interactive=1" class="btn btn-success btn-sm" rel="nofollow"> <i class="fa fa-plus"></i> {{$connect}} </a> diff --git a/view/tpl/xrd_host.tpl b/view/tpl/xrd_host.tpl index 2a40dcf47..43bd94664 100644 --- a/view/tpl/xrd_host.tpl +++ b/view/tpl/xrd_host.tpl @@ -1,11 +1,6 @@ <?xml version='1.0' encoding='UTF-8'?> -<XRD xmlns='http://docs.oasis-open.org/ns/xri/xrd-1.0' - xmlns:hm='http://host-meta.net/xrd/1.0'> - - <hm:Host>{{$zhost}}</hm:Host> - - <Link rel='lrdd' type="application/xrd+xml" template='{{$zroot}}/xrd/?uri={uri}' /> - <Link rel="http://oexchange.org/spec/0.8/rel/resident-target" type="application/xrd+xml" - href="{{$zroot}}/oexchange/xrd" /> - +<XRD xmlns='http://docs.oasis-open.org/ns/xri/xrd-1.0' xmlns:hm='http://host-meta.net/xrd/1.0'> + <hm:Host>{{$zhost}}</hm:Host> + <Link rel='lrdd' type="application/xrd+xml" template='{{$zroot}}/xrd/?uri={uri}' /> + <Link rel="http://oexchange.org/spec/0.8/rel/resident-target" type="application/xrd+xml" href="{{$zroot}}/oexchange/xrd" /> </XRD> diff --git a/view/tpl/xrd_person.tpl b/view/tpl/xrd_person.tpl index 52adb54e3..63f8e0846 100644 --- a/view/tpl/xrd_person.tpl +++ b/view/tpl/xrd_person.tpl @@ -1,28 +1,16 @@ <?xml version="1.0" encoding="UTF-8"?> <XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0"> - - <Subject>{{$subject}}</Subject> - {{if $aliases}}{{foreach $aliases as $a}} - <Alias>{{$a}}</Alias> - {{/foreach}}{{/if}} - - <Link rel="http://schemas.google.com/g/2010#updates-from" - type="application/atom+xml" - href="{{$atom}}" /> - <Link rel="http://webfinger.net/rel/profile-page" - type="text/html" - href="{{$profile_url}}" /> - <Link rel="http://portablecontacts.net/spec/1.0" - href="{{$poco_url}}" /> - <Link rel="http://webfinger.net/rel/avatar" - type="image/jpeg" - href="{{$photo}}" /> - <Link rel="http://microformats.org/profile/hcard" - type="text/html" - href="{{$hcard_url}}" /> - <Link rel="http://ostatus.org/schema/1.0/subscribe" - template="{{$subscribe}}" /> - <Link rel="magic-public-key" - href="{{$modexp}}" /> - + <Subject>{{$subject}}</Subject> +{{if $aliases}} +{{foreach $aliases as $a}} + <Alias>{{$a}}</Alias> +{{/foreach}} +{{/if}} + <Link rel="http://schemas.google.com/g/2010#updates-from" type="application/atom+xml" href="{{$atom}}" /> + <Link rel="http://webfinger.net/rel/profile-page" type="text/html" href="{{$profile_url}}" /> + <Link rel="http://portablecontacts.net/spec/1.0" href="{{$poco_url}}" /> + <Link rel="http://webfinger.net/rel/avatar" type="image/jpeg" href="{{$photo}}" /> + <Link rel="http://microformats.org/profile/hcard" type="text/html" href="{{$hcard_url}}" /> + <Link rel="http://ostatus.org/schema/1.0/subscribe" template="{{$subscribe}}" /> + <Link rel="magic-public-key" href="{{$modexp}}" /> </XRD> |