Commit 710b8b66 authored by webchick's avatar webchick

Issue #1663206 by mortendk, aliyakhan, LewisNyman, Manuel Garcia, pakmanlh,...

Issue #1663206 by mortendk, aliyakhan, LewisNyman, Manuel Garcia, pakmanlh, rteijeiro, jwilson3: Update update.admin.css inline with our CSS standards
parent 4192117d
/**
* @file
* Styles used by the Update Manager module.
*/
.update .project {
font-weight: bold;
font-size: 110%;
padding-left: .25em; /* LTR */
height: 22px;
}
[dir="rtl"] .update .project {
padding-right: .25em;
}
.update .version-status {
float: right; /* LTR */
padding-right: 10px; /* LTR */
font-size: 110%;
height: 20px;
}
[dir="rtl"] .update .version-status {
float: left;
padding-left: 10px;
}
.update .not-supported {
float: left; /* LTR */
}
[dir="rtl"] .update .not-supported {
float: right;
}
.update .version-status .icon {
padding-left: .5em; /* LTR */
}
[dir="rtl"] .update .version-status .icon {
padding-right: .5em;
}
.update .version-date {
white-space: nowrap;
}
.update .info {
margin: 0;
padding: 1em 1em .25em 1em;
}
.update tr.even,
.update tr.odd {
border: none;
}
.update tr td {
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
}
.update tr.error {
background: #fcc;
}
.update tr.error .version-recommended {
background: #fdd;
}
.update tr.ok {
background: #dfd;
}
.update tr.warning {
background: #ffd;
}
.update tr.warning .version-recommended {
background: #ffe;
}
.current-version,
.new-version {
direction: ltr; /* Note: version numbers should always be LTR. */
}
.update tr.unknown {
background: #ddd;
}
table.update,
.update table.version {
width: 100%;
margin-top: .5em;
border: none;
}
.update table.version tbody {
border: none;
}
.update table.version tr,
.update table.version td {
line-height: .9em;
padding: 0;
margin: 0;
border: none;
background: none;
}
.update table.version .version-title {
padding-left: 1em; /* LTR */
width: 14em;
}
[dir="rtl"] .update table.version .version-title {
padding-left: 1em;
}
.update table.version .version-details {
padding-right: .5em; /* LTR */
}
[dir="rtl"] .update table.version .version-details {
padding-left: .5em;
direction: ltr;
}
.update table.version .version-links {
text-align: right; /* LTR */
padding-right: 1em; /* LTR */
}
[dir="rtl"] .update table.version .version-links {
text-align: left;
padding-left: 1em;
}
.update table.version-security .version-title {
color: #970f00;
}
.update table.version-recommended-strong .version-title {
font-weight: bold;
}
.update .security-error {
font-weight: bold;
color: #970f00;
}
.update .check-manually {
padding-left: 1em; /* LTR */
}
[dir="rtl"] .update .check-manually {
padding-right: 1em;
}
.update-major-version-warning {
color: #ff0000;
}
table tbody tr.update-security,
table tbody tr.update-unsupported {
background: #fcc;
}
th.update-project-name {
width: 50%;
}
.versions table ul.links {
list-style-type: none;
}
/**
* @file
* Styles used by the Update Manager module.
*/
.project-update__title {
font-weight: bold;
font-size: 110%;
}
.project-update__status {
float: right; /* LTR */
font-size: 110%;
}
[dir="rtl"] .project-update__status {
float: left;
}
.project-update__status--not-supported {
float: left; /* LTR */
}
[dir="rtl"] .project-update__status--not-supported {
float: right;
}
.project-update__status--security-error {
font-weight: bold;
color: #970f00;
}
.project-update__status-icon {
padding-left: 0.5em; /* LTR */
}
[dir="rtl"] .project-update__status-icon {
padding-left: 0;
padding-right: 0.5em;
}
.project-update__details {
padding: 1em 1em 0.25em 1em;
}
.project-update__version {
padding: 1em 0;
}
.project-update__version-date {
white-space: nowrap;
}
.project-update__version-details {
padding-right: 0.5em; /* LTR */
}
[dir="rtl"] .project-update__version-details {
padding-left: 0.5em;
direction: ltr; /* Version numbers should always be LTR. */
}
.project-update__version-links {
text-align: right; /* LTR */
padding-right: 1em; /* LTR */
list-style-type: none;
}
[dir="rtl"] .project-update__version-links {
text-align: left;
padding-left: 1em;
}
.project-update__version--recommended-strong .project-update__version-title {
font-weight: bold;
}
......@@ -157,8 +157,8 @@ function testUpdateContribOrder() {
// Instead of just searching for 'BBB Update test' or something, we want
// to use the full markup that starts the project entry itself, so that
// we're really testing that the project listings are in the right order.
$bbb_project_link = '<div class="project"><a href="http://example.com/project/bbb_update_test">BBB Update test</a>';
$ccc_project_link = '<div class="project"><a href="http://example.com/project/ccc_update_test">CCC Update test</a>';
$bbb_project_link = '<div class="project-update__title"><a href="http://example.com/project/bbb_update_test">BBB Update test</a>';
$ccc_project_link = '<div class="project-update__title"><a href="http://example.com/project/ccc_update_test">CCC Update test</a>';
$this->assertTrue(strpos($this->getRawContent(), $bbb_project_link) < strpos($this->getRawContent(), $ccc_project_link), "'BBB Update test' project is listed before the 'CCC Update test' project");
}
......@@ -327,7 +327,7 @@ function testUpdateBrokenFetchURL() {
// We need to check that this string is found as part of a project row,
// not just in the "Failed to get available update data for ..." message
// at the top of the page.
$this->assertRaw('<div class="version-status">' . t('Failed to get available update data'));
$this->assertRaw('<div class="project-update__status">' . t('Failed to get available update data'));
// We should see the output messages from fetching manually.
$this->assertUniqueText(t('Checked available update data for 3 projects.'));
......
......@@ -13,11 +13,11 @@
* @ingroup themeable
*/
#}
<div class="update checked">
<p>
{% if last %}
{{ 'Last checked: @time ago'|t({'@time': time}) }}
{% else %}
{{ 'Last checked: never'|t }}
{% endif %}
<span class="check-manually">({{ link }})</span>
</div>
({{ link }})
</p>
......@@ -31,23 +31,25 @@
#}
{%
set status_classes = [
project.status == constant('UPDATE_NOT_SECURE') ? 'security-error',
project.status == constant('UPDATE_REVOKED') ? 'revoked',
project.status == constant('UPDATE_NOT_SUPPORTED') ? 'not-supported',
project.status == constant('UPDATE_NOT_CURRENT') ? 'not-current',
project.status == constant('UPDATE_CURRENT') ? 'current',
project.status == constant('UPDATE_NOT_SECURE') ? 'project-update__status--security-error',
project.status == constant('UPDATE_REVOKED') ? 'project-update__status--revoked',
project.status == constant('UPDATE_NOT_SUPPORTED') ? 'project-update__status--not-supported',
project.status == constant('UPDATE_NOT_CURRENT') ? 'project-update__status--not-current',
project.status == constant('UPDATE_CURRENT') ? 'project-update__status--current',
]
%}
<div class="version-status">
<div{{ status.attributes.addClass('project-update__status', status_classes) }}>
{%- if status.label -%}
<span{{ status.attributes.addClass(status_classes) }}>{{ status.label }}</span>
<span>{{ status.label }}</span>
{%- else -%}
{{ status.reason }}
{%- endif %}
<span class="icon">{{ status.icon }}</span>
<span class="project-update__status-icon">
{{ status.icon }}
</span>
</div>
<div class="project">
<div class="project-update__title">
{%- if url -%}
<a href="{{ url }}">{{ title }}</a>
{%- else -%}
......@@ -55,16 +57,14 @@
{%- endif %}
{{ existing_version }}
{% if install_type == 'dev' and datestamp %}
<span class="version-date">({{ datestamp }})</span>
<span class="project-update__version-date">({{ datestamp }})</span>
{% endif %}
</div>
{% if versions %}
<div class="versions">
{% for version in versions %}
{{ version }}
{% endfor %}
</div>
{% for version in versions %}
{{ version }}
{% endfor %}
{% endif %}
{%
......@@ -74,7 +74,7 @@
project.status == constant('UPDATE_NOT_SUPPORTED') ? 'project-not-supported',
]
%}
<div class="info">
<div class="project-updates__details">
{% if extras %}
<div class="extra">
{% for extra in extras %}
......@@ -84,45 +84,39 @@
{% endfor %}
</div>
{% endif %}
<div class="includes">
{% set includes = includes|join(', ') %}
{% if disabled %}
{{ 'Includes:'|t }}
<ul>
<li class="first odd">
{% trans %}
Enabled: {{ includes|placeholder }}
{% endtrans %}
</li>
<li class="last even">
{% set disabled = disabled|join(', ') %}
{% trans %}
Disabled: {{ disabled|placeholder }}
{% endtrans %}
</li>
</ul>
{% else %}
{% trans %}
Includes: {{ includes|placeholder }}
{% endtrans %}
{% endif %}
</div>
{% set includes = includes|join(', ') %}
{% if disabled %}
{{ 'Includes:'|t }}
<ul>
<li>
{% trans %}
Enabled: {{ includes|placeholder }}
{% endtrans %}
</li>
<li>
{% set disabled = disabled|join(', ') %}
{% trans %}
Disabled: {{ disabled|placeholder }}
{% endtrans %}
</li>
</ul>
{% else %}
{% trans %}
Includes: {{ includes|placeholder }}
{% endtrans %}
{% endif %}
{% if base_themes %}
{% set basethemes = base_themes|join(', ') %}
<div class="basethemes">
{% trans %}
Depends on: {{ basethemes }}
{% endtrans %}
</div>
{% trans %}
Depends on: {{ basethemes }}
{% endtrans %}
{% endif %}
{% if sub_themes %}
{% set subthemes = sub_themes|join(', ') %}
<div class="subthemes">
{% trans %}
Required by: {{ subthemes|placeholder }}
{% endtrans %}
</div>
{% trans %}
Required by: {{ subthemes|placeholder }}
{% endtrans %}
{% endif %}
</div>
......@@ -17,22 +17,22 @@
* @ingroup themeable
*/
#}
<table class="{{ attributes.class }} version"{{ attributes|without('class') }}>
<tr>
<td class="version-title">{{ title }}</td>
<td class="version-details">
<div class="{{ attributes.class }} project-update__version"{{ attributes|without('class') }}>
<div class="clearfix">
<div class="project-update__version-title layout-column quarter">{{ title }}</div>
<div class="project-update__version-details layout-column quarter">
<a href="{{ version.release_link }}">{{ version.version }}</a>
<span class="version-date">({{ version.date|date('Y-M-d') }})</span>
</td>
<td class="version-links">
<ul class="links">
<li class="download">
<span class="project-update__version-date">({{ version.date|date('Y-M-d') }})</span>
</div>
<div class="layout-column half">
<ul class="project-update__version-links">
<li class="project-update__download-link">
<a href="{{ version.download_link }}">{{ 'Download'|t }}</a>
</li>
<li class="release-notes">
<li class="project-update__release-notes-link">
<a href="{{ version.release_link }}">{{ 'Release notes'|t }}</a>
</li>
</ul>
</td>
</tr>
</table>
</div>
</div>
</div>
......@@ -2,4 +2,4 @@ drupal.update.admin:
version: VERSION
css:
theme:
css/update.admin.css: {}
css/update.admin.theme.css: {}
......@@ -74,22 +74,18 @@ function template_preprocess_update_report(&$variables) {
// Add project status class attribute to the table row.
switch ($project['status']) {
case UPDATE_CURRENT:
$rows[$project['project_type']][$row_key]['#attributes'] = array('class' => array('ok'));
break;
case UPDATE_UNKNOWN:
case UPDATE_FETCH_PENDING:
case UPDATE_NOT_FETCHED:
$rows[$project['project_type']][$row_key]['#attributes'] = array('class' => array('unknown'));
break;
case UPDATE_NOT_SECURE:
case UPDATE_REVOKED:
case UPDATE_NOT_SUPPORTED:
$rows[$project['project_type']][$row_key]['#attributes'] = array('class' => array('error'));
$rows[$project['project_type']][$row_key]['#attributes'] = array('class' => array('color-error'));
break;
case UPDATE_NOT_CHECKED:
case UPDATE_NOT_CURRENT:
default:
$rows[$project['project_type']][$row_key]['#attributes'] = array('class' => array('warning'));
$rows[$project['project_type']][$row_key]['#attributes'] = array('class' => array('color-warning'));
break;
}
}
......@@ -156,11 +152,11 @@ function template_preprocess_update_project_status(&$variables) {
&& count($project['security updates']) == 1
&& $project['security updates'][0]['version'] === $project['recommended']
) {
$security_class[] = 'version-recommended';
$security_class[] = 'version-recommended-strong';
$security_class[] = 'project-update__version--recommended';
$security_class[] = 'project-update__version---strong';
}
else {
$version_class[] = 'version-recommended';
$version_class[] = 'project-update__version--recommended';
// Apply an extra class if we're displaying both a recommended
// version and anything else for an extra visual hint.
if ($project['recommended'] !== $project['latest_version']
......@@ -172,7 +168,7 @@ function template_preprocess_update_project_status(&$variables) {
|| (isset($project['security updates'][0])
&& $project['recommended'] !== $project['security updates'][0])
) {
$version_class[] = 'version-recommended-strong';
$version_class[] = 'project-update__version--recommended-strong';
}
$versions_inner[] = array(
'#theme' => 'update_version',
......
/* Update status */
.versions table.version {
border: none;
}
......@@ -28,7 +28,6 @@ global-styling:
css/components/system-status-report.css: {}
css/components/tabs.css: {}
css/components/tour.theme.css: {}
css/components/update-status.css: {}
css/components/views-ui.css: {}
layout:
css/layout/layout.css: {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment