Skip to content
Extraits de code Groupes Projets
Valider 07d91d0f rédigé par Benaka's avatar Benaka
Parcourir les fichiers

Merge pull request #7895 from piwik/redesign-tables

New design for simple table layouts w/ non-API CSS class simple-table. To be eventually replaced w/ styling table elements directly.
parents 056b319c a459a138
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -65,16 +65,9 @@ p.next-step:first-child { ...@@ -65,16 +65,9 @@ p.next-step:first-child {
margin-top: 0; margin-top: 0;
} }
table { /* This rule is duplicated here from systemCheckPage.less */
margin: 20px 0; .system-check td:first-child {
width: 100%; width: 40%;
}
th, td {
border-top: 1px solid #cccccc;
padding: 8px;
}
tr:nth-of-type(odd) {
background-color: #FAFAFA;
} }
/* Form classes that we can't change */ /* Form classes that we can't change */
......
#systemCheckOptional, .system-check td:first-child {
#systemCheckRequired { width: 40%;
width: 100%;
max-width: 900px;
}
#systemCheckOptional {
margin-bottom: 2em;
}
#systemCheckOptional td,
#systemCheckRequired td {
padding: 1em .5em 1em 2em;
vertical-align: middle;
margin: 0;
min-width: 200px;
}
#systemCheckOptional tr,
#systemCheckRequired tr {
background-color: #f2f2f2;
} }
.error { .error {
......
{% import _self as local %} {% import _self as local %}
<table class="infosServer" id="systemCheckRequired"> <table class="simple-table system-check" id="systemCheckRequired">
{{ local.diagnosticTable(diagnosticReport.getMandatoryDiagnosticResults()) }} {{ local.diagnosticTable(diagnosticReport.getMandatoryDiagnosticResults()) }}
</table> </table>
<h3>{{ 'Installation_Optional'|translate }}</h3> <h3>{{ 'Installation_Optional'|translate }}</h3>
<table class="infos" id="systemCheckOptional"> <table class="simple-table system-check" id="systemCheckOptional">
{{ local.diagnosticTable(diagnosticReport.getOptionalDiagnosticResults()) }} {{ local.diagnosticTable(diagnosticReport.getOptionalDiagnosticResults()) }}
</table> </table>
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
{% for result in results %} {% for result in results %}
<tr> <tr>
<td class="label">{{ result.label }}</td> <td>{{ result.label }}</td>
<td> <td>
{% for item in result.items %} {% for item in result.items %}
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
@import "../../CoreHome/stylesheets/_donate.less"; @import "../../CoreHome/stylesheets/_donate.less";
@import "ui/_code"; @import "ui/_code";
@import "ui/_tables";
@import "ui/_alerts"; @import "ui/_alerts";
@import "ui/_list-group"; @import "ui/_list-group";
@import "ui/_progress-bars"; @import "ui/_progress-bars";
......
// We have to use a class (and not <table> directly) because HTML tables
// are used for layouts (e.g. forms in the admin section use tables)
// TODO refactor that: https://github.com/piwik/piwik/issues/8023
.simple-table {
margin: 20px 0;
width: 100%;
border-top: 1px solid @theme-color-border;
th, td {
border-bottom: 1px solid @theme-color-border;
padding: 14px;
}
th {
text-align: left;
}
}
...@@ -298,6 +298,9 @@ ...@@ -298,6 +298,9 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="demo-code">
<pre>&lt;table&gt;...&lt;/table&gt;</pre>
</div>
</div> </div>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<form {{ form_data.attributes|raw }}> <form {{ form_data.attributes|raw }}>
<div class="centrer"> <div class="centrer">
<table class="centrer"> <table class="centrer simple-table">
{% for fieldname in element_list %} {% for fieldname in element_list %}
{% if form_data[fieldname].type == 'checkbox' %} {% if form_data[fieldname].type == 'checkbox' %}
<tr> <tr>
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter