From 26bc071ae307052f01b5ef0aeff84753d38aaf61 Mon Sep 17 00:00:00 2001 From: Daniel Dourvaris Date: Thu, 16 Jul 2020 12:48:00 +0200 Subject: [PATCH] ui: added secondary action instead of two buttons on files page. - also made improvements for secondary dropdown actions in pull-requests --- rhodecode/public/css/buttons.less | 8 ++--- rhodecode/templates/files/files_browser.mako | 32 ++++++++++++++----- rhodecode/templates/files/files_upload.mako | 6 ++-- .../pullrequests/pullrequest_show.mako | 2 +- 4 files changed, 32 insertions(+), 16 deletions(-) diff --git a/rhodecode/public/css/buttons.less b/rhodecode/public/css/buttons.less index e86a3c3d..78d7e551 100644 --- a/rhodecode/public/css/buttons.less +++ b/rhodecode/public/css/buttons.less @@ -264,16 +264,15 @@ input[type="button"] { .btn-action-switcher-container{ position: absolute; - top: 30px; - left: -82px; + top: 100%; + right: 0; } .btn-action-switcher { display: block; position: relative; z-index: 300; - min-width: 240px; - max-width: 500px; + max-width: 600px; margin-top: 4px; margin-bottom: 24px; font-size: 14px; @@ -283,6 +282,7 @@ input[type="button"] { border: 1px solid @grey4; border-radius: 3px; box-shadow: @dropdown-shadow; + overflow: auto; li { display: block; diff --git a/rhodecode/templates/files/files_browser.mako b/rhodecode/templates/files/files_browser.mako index aa87d9f5..3f0564b1 100644 --- a/rhodecode/templates/files/files_browser.mako +++ b/rhodecode/templates/files/files_browser.mako @@ -17,14 +17,30 @@ % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): -
- - ${_('Upload File')} - - - ${_('Add File')} - -
+ +
+ +
+ % endif % if c.enable_downloads: diff --git a/rhodecode/templates/files/files_upload.mako b/rhodecode/templates/files/files_upload.mako index fcdeb8f8..a76840ac 100644 --- a/rhodecode/templates/files/files_upload.mako +++ b/rhodecode/templates/files/files_upload.mako @@ -61,11 +61,11 @@ ##${h.secure_form(form_url, id='eform', enctype="multipart/form-data", request=request)}
-
    +
    • @@ -79,7 +79,7 @@
      -
      +

      diff --git a/rhodecode/templates/pullrequests/pullrequest_show.mako b/rhodecode/templates/pullrequests/pullrequest_show.mako index 4b666a5d..9c4b7dca 100644 --- a/rhodecode/templates/pullrequests/pullrequest_show.mako +++ b/rhodecode/templates/pullrequests/pullrequest_show.mako @@ -517,7 +517,7 @@