diff options
author | Jan-Christoph Borchardt <hey@jancborchardt.net> | 2017-08-12 15:14:59 +0200 |
---|---|---|
committer | Jan-Christoph Borchardt <hey@jancborchardt.net> | 2017-11-01 11:52:58 +0100 |
commit | 3d05540d36e741fade7ff32e2b0c6985782c4c72 (patch) | |
tree | ec05b0e3ac552f68e99f4b8eb59f7c4ea4002004 /apps/files_sharing | |
parent | ce12cd91db86c14dc304ee89bbca66ba3af8f6c7 (diff) | |
download | nextcloud-server-3d05540d36e741fade7ff32e2b0c6985782c4c72.tar.gz nextcloud-server-3d05540d36e741fade7ff32e2b0c6985782c4c72.zip |
Move shared page controls to menu in top right
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/css/public.scss | 19 | ||||
-rw-r--r-- | apps/files_sharing/templates/public.php | 54 |
2 files changed, 43 insertions, 30 deletions
diff --git a/apps/files_sharing/css/public.scss b/apps/files_sharing/css/public.scss index 652d36f77db..c87ae46b5d0 100644 --- a/apps/files_sharing/css/public.scss +++ b/apps/files_sharing/css/public.scss @@ -3,6 +3,11 @@ min-height: calc(100vh - 120px); } +#header .menutoggle { + padding: 14px; + cursor: pointer; +} + /* force layout to make sure the content element's height matches its contents' height */ .ie #content { display: inline-block; @@ -78,12 +83,6 @@ thead { margin: 0; } - -.directDownload, -.directLink { - margin-bottom: 20px; -} - /* keep long file names in one line to not overflow download button on mobile */ .directDownload #downloadFile { white-space: nowrap; @@ -125,6 +124,7 @@ thead { /* within #save */ #save .save-form { position: relative; + margin-right: -10px; } #remote_address { @@ -138,10 +138,9 @@ thead { position: absolute; background-color: transparent; border: none; - margin: 2px 4px !important; - right: 7px; - top: -8px; - height: 30px; + margin: 0; + right: 0px; + height: 40px; } #public-upload .avatardiv { diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php index 8bbb53fa4e0..0c12c86da09 100644 --- a/apps/files_sharing/templates/public.php +++ b/apps/files_sharing/templates/public.php @@ -48,22 +48,38 @@ $maxUploadFilesize = min($upload_max_filesize, $post_max_size); </div> <div class="header-right"> - <?php if (!isset($_['hideFileList']) || (isset($_['hideFileList']) && $_['hideFileList'] === false)) { - if ($_['server2serversharing']) { - ?> - <span id="save" data-protected="<?php p($_['protected']) ?>" - data-owner-display-name="<?php p($_['displayName']) ?>" data-owner="<?php p($_['owner']) ?>" data-name="<?php p($_['filename']) ?>"> - <button id="save-button"><?php p($l->t('Add to your Nextcloud')) ?></button> - <form class="save-form hidden" action="#"> - <input type="text" id="remote_address" placeholder="user@yourNextcloud.org"/> - <button id="save-button-confirm" class="icon-confirm svg" disabled></button> - </form> - </span> - <?php } ?> - <a href="<?php p($_['downloadURL']); ?>" id="download" class="button"> - <span class="icon icon-download"></span> - <span id="download-text"><?php p($l->t('Download'))?></span> - </a> + <?php if (!isset($_['hideFileList']) || (isset($_['hideFileList']) && $_['hideFileList'] === false)) { ?> + <a href="#" title="<?php p($l->t('Download & link')) ?>" id="share-menutoggle" class="menutoggle icon-more-white"></a> + <div id="share-menu" class="popovermenu menu hidden" style="display: block;"> + <ul> + <li> + <a href="<?php p($_['downloadURL']); ?>" id="download"> + <span class="icon icon-download"></span> + <span id="download-text"><?php p($l->t('Download'))?> (<?php p($_['fileSize']) ?>)</span> + </a> + </li> + <li> + <a href="#"> + <span class="icon icon-public"></span> + <label for="directLink"><?php p($l->t('Direct link')) ?></label> + <input id="directLink" class="hidden" type="text" readonly value="<?php p($_['downloadURL']); ?>"> + </a> + </li> + <?php if ($_['server2serversharing']) { ?> + <li> + <a href="#" id="save" data-protected="<?php p($_['protected']) ?>" + data-owner-display-name="<?php p($_['displayName']) ?>" data-owner="<?php p($_['owner']) ?>" data-name="<?php p($_['filename']) ?>"> + <span class="icon icon-external"></span> + <span id="save-button"><?php p($l->t('Add to your Nextcloud')) ?></span> + <form class="save-form hidden" action="#"> + <input type="text" id="remote_address" placeholder="user@yourNextcloud.org"/> + <button id="save-button-confirm" class="icon-confirm svg" disabled></button> + </form> + </a> + </li> + <?php } ?> + </ul> + </div> <?php } ?> </div> </div></header> @@ -84,16 +100,14 @@ $maxUploadFilesize = min($upload_max_filesize, $post_max_size); <!-- Preview frame is filled via JS to support SVG images for modern browsers --> <div id="imgframe"></div> <?php endif; ?> + <?php if ($_['previewURL'] === $_['downloadURL']): ?> <div class="directDownload"> <a href="<?php p($_['downloadURL']); ?>" id="downloadFile" class="button"> <span class="icon icon-download"></span> <?php p($l->t('Download %s', array($_['filename'])))?> (<?php p($_['fileSize']) ?>) </a> </div> - <div class="directLink"> - <label for="directLink"><?php p($l->t('Direct link')) ?></label> - <input id="directLink" type="text" readonly value="<?php p($_['previewURL']); ?>"> - </div> + <?php endif; ?> <?php endif; ?> </div> </div> |