From 21a021da9c175b1795ce519a85fa5ce84c865fd8 Mon Sep 17 00:00:00 2001 From: Zacharie Guet Date: Wed, 3 Nov 2021 16:14:02 +0100 Subject: [PATCH] #1467 Redesign of the extension update page --- .../themes/default/css/components/general.css | 47 +++++++++++++++++++ admin/themes/default/template/updates_ext.tpl | 14 +++--- admin/themes/default/template/user_list.tpl | 19 -------- admin/themes/default/theme.css | 40 +++++++++++++++- admin/themes/roma/theme.css | 8 +++- admin/updates_ext.php | 5 +- language/en_UK/admin.lang.php | 2 + language/fr_FR/admin.lang.php | 2 + 8 files changed, 104 insertions(+), 33 deletions(-) diff --git a/admin/themes/default/css/components/general.css b/admin/themes/default/css/components/general.css index d3a9fa19b..b489b6e96 100644 --- a/admin/themes/default/css/components/general.css +++ b/admin/themes/default/css/components/general.css @@ -1,3 +1,50 @@ +/* ------------- +Head Buttons +------------- + +.head-button-1 + +or + +.head-button-2 + +*/ + +.head-button-1, .head-button-2 { + position: relative; + padding: 10px; + border-radius: 5px; + font-weight: bold; + display: flex; + align-items: baseline; + cursor: pointer; + margin-right: 10px; +} + +.head-button-1:active, .head-button-2:active { + box-shadow: none; + transform: translateY(2px); +} + +.head-button-1 { + color: white; + background: #ffa646; + box-shadow: 0px 2px #bb7932; +} + +.head-button-1:hover { + background: #ff7700; +} + +.head-button-2 { + background: #fafafa; + box-shadow: 0px 2px #00000024; +} + +.head-button-2:hover { + background: #eee; +} + /* ------------- Advanced filter ------------- diff --git a/admin/themes/default/template/updates_ext.tpl b/admin/themes/default/template/updates_ext.tpl index f7c858d3c..cc3a9acab 100644 --- a/admin/themes/default/template/updates_ext.tpl +++ b/admin/themes/default/template/updates_ext.tpl @@ -1,6 +1,7 @@ {combine_script id='jquery.ajaxmanager' load='footer' require='jquery' path='themes/default/js/plugins/jquery.ajaxmanager.js'} {combine_script id='jquery.jgrowl' load='footer' require='jquery' path='themes/default/js/plugins/jquery.jgrowl_minimized.js'} {combine_css path="themes/default/js/plugins/jquery.jgrowl.css"} +{combine_css path="admin/themes/default/css/components/general.css"} {footer_script require='jquery.ui.effect-blind,jquery.ajaxmanager,jquery.jgrowl'} var pwg_token = '{$PWG_TOKEN}'; @@ -165,9 +166,9 @@ $("#update_all").click(function() { {if $isWebmaster == 1}
- - - +
{'Update All'|@translate}
+
{'Ignore All'|@translate}
+
{'Reset ignored updates'|@translate}
- {'New Version'|@translate} : {$extension.NEW_VERSION} - | {'By %s'|@translate:$extension.AUTHOR} + {$extension.CURRENT_VERSION} {$extension.NEW_VERSION} +
{$extension.REV_DESC}
+ {'More information'|@translate}
{'Install'|@translate} - {'Download'|@translate} + {'Download'|@translate} {'Ignore this update'|@translate}
diff --git a/admin/themes/default/template/user_list.tpl b/admin/themes/default/template/user_list.tpl index 9733d7817..7b6bab777 100644 --- a/admin/themes/default/template/user_list.tpl +++ b/admin/themes/default/template/user_list.tpl @@ -951,25 +951,6 @@ $(".icon-help-circled").tipTip({ padding-bottom:10px; } -.user-header-button { - position:relative; -} - -.user-header-button-label { - position: relative; - padding: 10px; - box-shadow: 0px 2px #00000024; - border-radius: 5px; - font-weight: bold; - display: flex; - align-items: baseline; - cursor: pointer; -} - - -.user-header-button-label p { - margin:0; -} #AddUserSuccess { display:none; diff --git a/admin/themes/default/theme.css b/admin/themes/default/theme.css index d6594566b..7ec03c287 100644 --- a/admin/themes/default/theme.css +++ b/admin/themes/default/theme.css @@ -2209,6 +2209,41 @@ h2:lang(en) { text-transform:capitalize; } margin-right: 5px; } +.autoupdate_bar { + display: flex; + align-items: center; + margin-left: 20px; + margin-bottom: 10px; +} + +.plugin-version { + border-radius: 5px; + color: white; + padding: 0px 5px; + background: #ff7700; + font-weight: bold; +} + +.plugin-version-old { + color: rgb(59, 59, 59); + background: #ddd; +} + +.plugin-revision-info { + display: inline-grid; + max-width: 40%; + margin-left: 5px; +} + +.plugin-revision-info span{ + overflow: hidden; + text-overflow: ellipsis; +} + +.plugin-update-link { + margin-left: 5px; +} + .pluginImage .screenshot { background-image: url(path-to-file/img.jpg); background-repeat:no-repeat; @@ -2830,7 +2865,7 @@ legend {text-align:left;} .pluginContainer.line-form .pluginBox .pluginDesc{ margin: auto 10px auto 10px; - display: block !important; + display: flex !important; align-items: center; white-space: nowrap; @@ -2839,6 +2874,7 @@ legend {text-align:left;} max-width: 1000px; flex: 1; + height: 100%; } /* Classic view */ @@ -5993,7 +6029,7 @@ li.plupload_delete a:hover {background: url("images/cancelhover.svg")!important; background: orange; } -.user-header-button-label { +.head-button { background-color: #fafafa; } diff --git a/admin/themes/roma/theme.css b/admin/themes/roma/theme.css index 24dd17467..5d3e0b17f 100644 --- a/admin/themes/roma/theme.css +++ b/admin/themes/roma/theme.css @@ -1357,8 +1357,12 @@ li.plupload_delete a:hover {background: url("images/cancelhover.svg")!important; color: #c1c1c1; } -.user-header-button-label { - background-color: #333; +.head-button-2 { + background-color: #333 !important; +} + +.head-button-2:hover { + background-color: #222 !important; } .user-container { diff --git a/admin/updates_ext.php b/admin/updates_ext.php index 916e07061..9062581e4 100644 --- a/admin/updates_ext.php +++ b/admin/updates_ext.php @@ -60,13 +60,10 @@ foreach ($autoupdate->types as $type) 'REVISION_ID' => $ext_info['revision_id'], 'EXT_ID' => $ext_id, 'EXT_NAME' => $fs_ext['name'], - 'EXT_URL' => PEM_URL.'/extension_view.php?eid='.$ext_info['extension_id'], - 'EXT_DESC' => trim($ext_info['extension_description'], " \n\r"), + 'EXT_URL' => PEM_URL.'/extension_view.php?eid='.$ext_info['extension_id'].'#changelog', 'REV_DESC' => trim($ext_info['revision_description'], " \n\r"), 'CURRENT_VERSION' => $fs_ext['version'], 'NEW_VERSION' => $ext_info['revision_name'], - 'AUTHOR' => $ext_info['author_name'], - 'DOWNLOADS' => $ext_info['extension_nb_downloads'], 'URL_DOWNLOAD' => $ext_info['download_url'] . '&origin=piwigo_download', 'IGNORED' => in_array($ext_id, $conf['updates_ignored'][$type]), ) diff --git a/language/en_UK/admin.lang.php b/language/en_UK/admin.lang.php index 90de04c51..c0fdc8fd0 100644 --- a/language/en_UK/admin.lang.php +++ b/language/en_UK/admin.lang.php @@ -1271,6 +1271,8 @@ $lang['Purge Cache'] = 'Purge Cache'; $lang['Rename "%s"'] = 'Rename "%s"'; $lang['Yes, rename'] = 'Yes, rename'; $lang['Tag name'] = 'Tag name'; +$lang['Current Version'] = 'Current Version'; +$lang['More information'] = 'More information'; $lang['Visited'] = 'Visited'; $lang['Downloaded'] = 'Downloaded'; diff --git a/language/fr_FR/admin.lang.php b/language/fr_FR/admin.lang.php index a1f3736b6..a581d10d9 100644 --- a/language/fr_FR/admin.lang.php +++ b/language/fr_FR/admin.lang.php @@ -1278,3 +1278,5 @@ $lang['Downloaded'] = 'Téléchargé'; $lang['Personnalized filters'] = 'Filtres personnalisés'; $lang['Object'] = 'Objet'; $lang['Memories'] = 'Souvenirs'; +$lang['Current Version'] = 'Version actuelle'; +$lang['More information'] = 'Plus d\'information';