diff --git a/modules/system/assets/css/updates/details.css b/modules/system/assets/css/updates/details.css index d0f782ba0..0722d9f38 100644 --- a/modules/system/assets/css/updates/details.css +++ b/modules/system/assets/css/updates/details.css @@ -5,16 +5,16 @@ margin-top: 0; } .plugin-details-content h1 { - font-size: 31px; + font-size: 28px; } .plugin-details-content h2 { - font-size: 26px; + font-size: 24px; } .plugin-details-content h3 { - font-size: 22px; + font-size: 20px; } .plugin-details-content h4 { - font-size: 18px; + font-size: 17px; } .plugin-details-content h1, .plugin-details-content h2 { @@ -23,12 +23,12 @@ } .plugin-details-content ul, .plugin-details-content ol { - padding-left: 25px; + padding-left: 20px; } .plugin-details-content pre { display: block; border: none; - padding: 10px 10px 10px 25px; + padding: 10px 10px 10px 20px; font-size: 13px; word-break: break-all; word-wrap: break-word; @@ -36,8 +36,8 @@ background-color: #333; margin-top: 10px; margin-bottom: 20px; - margin-left: -25px; - margin-right: -25px; + margin-left: -20px; + margin-right: -20px; } .plugin-details-content pre code { padding: 0; @@ -49,21 +49,36 @@ } .plugin-details-content ul pre, .plugin-details-content ol pre { - margin-left: -50px; - padding-left: 50px; + margin-left: -40px; + padding-left: 40px; } .plugin-details-content table th { - font-weight: bold + font-weight: bold; } .plugin-details-content table th, .plugin-details-content table td { - padding: 6px 13px; - border: 1px solid #ddd + padding: 6px 13px; + border: 1px solid #ddd; } .plugin-details-content table tr { - background-color: #fff; - border-top: 1px solid #ccc + background-color: #fff; + border-top: 1px solid #ccc; } .plugin-details-content table tr:nth-child(2n) { - background-color: #f8f8f8 -} \ No newline at end of file + background-color: #f8f8f8; +} +.plugin-details-content dl dt, +.plugin-details-content dl dd { + margin-bottom: 10px; +} +.plugin-details-content dl dt { + width: 75px; + float: left; + text-align: right; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; +} +.plugin-details-content dl dd { + margin-left: 85px; +} diff --git a/modules/system/assets/css/updates/install.css b/modules/system/assets/css/updates/install.css index 3d687efe1..48a14584a 100644 --- a/modules/system/assets/css/updates/install.css +++ b/modules/system/assets/css/updates/install.css @@ -70,6 +70,8 @@ border: 1px solid #E6E9E9; background: #fff; position: relative; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; border-radius: 3px; -webkit-transition: border .2s linear; -moz-transition: border .2s linear; diff --git a/modules/system/assets/css/updates/updates.css b/modules/system/assets/css/updates/updates.css index f9e99dc97..3de4192d7 100644 --- a/modules/system/assets/css/updates/updates.css +++ b/modules/system/assets/css/updates/updates.css @@ -3,7 +3,7 @@ } .control-updatelist { border: 1px solid #ccc; - margin-bottom: 21px; + margin-bottom: 20px; } .control-updatelist .update-item { border-bottom: 1px solid #ccc; @@ -80,7 +80,9 @@ text-align: center; white-space: nowrap; vertical-align: baseline; - border-radius: .25em; + -webkit-border-radius: 0.25em; + -moz-border-radius: 0.25em; + border-radius: 0.25em; } .control-updatelist .update-item:last-child { border-bottom: none; diff --git a/modules/system/assets/less/updates/details.less b/modules/system/assets/less/updates/details.less index 66ab40bd3..8c8127e6c 100644 --- a/modules/system/assets/less/updates/details.less +++ b/modules/system/assets/less/updates/details.less @@ -68,4 +68,21 @@ } } } -} \ No newline at end of file + + dl { + dt, dd { + margin-bottom: (@padding-standard / 2); + } + dt { + width: 75px; + float: left; + text-align: right; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + } + dd { + margin-left: 85px; + } + } +} diff --git a/modules/system/controllers/Updates.php b/modules/system/controllers/Updates.php index 6b14bcfce..57e025585 100644 --- a/modules/system/controllers/Updates.php +++ b/modules/system/controllers/Updates.php @@ -3,6 +3,7 @@ use Str; use Lang; use Html; +use Yaml; use File; use Flash; use Config; @@ -125,7 +126,7 @@ class Updates extends Controller if ($path && $plugin) { $details = $plugin->pluginDetails(); $readme = $this->getPluginMarkdownFile($path, $readmeFiles); - $changelog = File::get($path.'/updates/version.yaml'); + $changelog = $this->getPluginVersionFile($path, 'updates/version.yaml'); $upgrades = $this->getPluginMarkdownFile($path, $upgradeFiles); $licence = $this->getPluginMarkdownFile($path, $licenceFiles); @@ -151,7 +152,7 @@ class Updates extends Controller $this->vars['activeTab'] = $tab ?: 'readme'; $this->vars['urlCode'] = $urlCode; $this->vars['readme'] = $readme; - $this->vars['changelog'] = nl2br(str_replace('- ', ' - ', '
'.$changelog.'
')); + $this->vars['changelog'] = $changelog; $this->vars['upgrades'] = $upgrades; $this->vars['licence'] = $licence; } @@ -160,6 +161,25 @@ class Updates extends Controller } } + protected function getPluginVersionFile($path, $filename) + { + $contents = []; + + try { + $updates = Yaml::parseFile($path.'/'.$filename); + $updates = is_array($updates) ? array_reverse($updates) : []; + + foreach ($updates as $version => $details) { + $contents[$version] = is_array($details) + ? array_shift($details) + : $details; + } + } + catch (Exception $ex) {} + + return $contents; + } + protected function getPluginMarkdownFile($path, $filenames) { $contents = null; diff --git a/modules/system/controllers/updates/details.htm b/modules/system/controllers/updates/details.htm index 9407e2c4d..96bf9f99e 100644 --- a/modules/system/controllers/updates/details.htm +++ b/modules/system/controllers/updates/details.htm @@ -75,7 +75,12 @@= e(trans('system::lang.updates.details_changelog_missing')) ?>