diff --git a/server/content/planning_view.php b/server/content/planning_view.php index cf37f0c..ba8b855 100644 --- a/server/content/planning_view.php +++ b/server/content/planning_view.php @@ -6,7 +6,8 @@ // Title $content = '

Saison-Planung

'; - $content .= '

'; + $content .= '

'; + $content .= $tpl->load('button', [' Teilen', '#', 'html-id' => 'button-share']); $content .= $tpl->load('select', ['html-id' => 'select-year', 'placeholder' => 'Jahr', 'css-class' => 'mt-3 mb-0']); $sp['output'] .= $tpl->load('card', [$content]); diff --git a/server/page/menus.php b/server/page/menus.php index ff88dde..7ef3608 100644 --- a/server/page/menus.php +++ b/server/page/menus.php @@ -3,27 +3,27 @@
- + Facebook - + Twitter - + LinkedIn - + WhatsApp - + Email diff --git a/server/scripts/planning.js b/server/scripts/planning.js index a109b34..e6a0e3e 100644 --- a/server/scripts/planning.js +++ b/server/scripts/planning.js @@ -115,6 +115,8 @@ var siteScript = async function() { $('#switch-status-bezahlt').parent().parent().click(planningSwitchChanged); } + $('#a-share-planning').attr('href', LINK_PRE + 'planning_view?user=' + USER_ID); + today = getToday(); var selectedYear = $('#select-year').val(); diff --git a/server/scripts/planning_view.js b/server/scripts/planning_view.js index c0cc616..e1f770b 100644 --- a/server/scripts/planning_view.js +++ b/server/scripts/planning_view.js @@ -46,6 +46,15 @@ var siteScript = async function() { $('#p-username').text(user.username); + if (isLoggedIn() && (userid == USER_ID)) { + $('#button-share').show(); + $('#button-share').click(function(){ + $('#menu-share').showMenu(); + }); + } else { + $('#button-share').hide(); + } + if (firstCall) { firstCall = false; initYear();