Skip to content

Commit

Permalink
CP table cleanup
Browse files Browse the repository at this point in the history
Resolves #5247
  • Loading branch information
brandonkelly committed Nov 23, 2019
1 parent 829bfed commit 83d27a3
Show file tree
Hide file tree
Showing 26 changed files with 271 additions and 277 deletions.
4 changes: 2 additions & 2 deletions src/templates/_elements/tableview/container.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<div class="tableview">
<div class="tableview{% if context == 'index' %} tablepane{% endif %}">
<table class="data fullwidth"{% if structureEditable is defined and structureEditable %} data-structure-id="{{ structure.id }}" data-max-levels="{{ structure.maxLevels }}"{% endif %}>
<thead>
<tr>
{% if showCheckboxes %}
<td class="checkbox-cell"></td>
<th class="checkbox-cell selectallcontainer orderable"></th>
{% endif %}
{% for attribute in attributes %}
{% set icon = (attribute[1].icon is defined ? attribute[1].icon : null) %}
Expand Down
2 changes: 1 addition & 1 deletion src/templates/_elements/tableview/elements.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% set structureEditable = structureEditable is defined ? structureEditable : false -%}

{% if structure -%}
{% set basePadding = (context == 'index' ? 20 + (showCheckboxes ? 7 : 0) + (structureEditable ? 14 : 0) : 7) %}
{% set basePadding = (showCheckboxes ? 14 : 24) + (structureEditable ? 14 : 0) %}
{% set padding = craft.app.locale.getOrientation() == 'ltr' ? 'left' : 'right' -%}
{% endif -%}

Expand Down
8 changes: 7 additions & 1 deletion src/templates/_elements/thumbsview/container.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
<div class="header">
<span class="selectallcontainer">
{{ 'Select all'|t('app') }}
</span>
</div>

<ul class="thumbsview">
{% include "_elements/thumbsview/elements" %}
{% include "_elements/thumbsview/elements" %}
</ul>
<div class="clear"></div>
6 changes: 1 addition & 5 deletions src/templates/_layouts/elementindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,7 @@


{% block content %}
<div class="elementindex">
<div class="main">
<div class="elements"></div>
</div>
</div>
<div class="elements"></div>
{% endblock %}


Expand Down
2 changes: 1 addition & 1 deletion src/templates/graphql/schemas/_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{% block content %}
{% set schemas = craft.app.gql.schemas %}

<div class="scrolltable">
<div class="tablepane">
<table id="schemas" class="data fullwidth">
<thead>
<th scope="col">{{ "Schema name"|t('app') }}</th>
Expand Down
2 changes: 1 addition & 1 deletion src/templates/settings/assets/transforms/_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</p>

{% if transforms|length %}
<div class="scrolltable">
<div class="tablepane">
<table id="transforms" class="data fullwidth">
<thead>
<th scope="col">{{ "Name"|t('app') }}</th>
Expand Down
2 changes: 1 addition & 1 deletion src/templates/settings/assets/volumes/_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{% if volumes|length %}
{% set sortable = (volumes|length > 1) %}

<div class="scrolltable">
<div class="tablepane">
<table id="volumes" class="data fullwidth">
<thead>
<th scope="col">{{ "Name"|t('app') }}</th>
Expand Down
2 changes: 1 addition & 1 deletion src/templates/settings/categories/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</div>

{% if categoryGroups|length %}
<div class="scrolltable">
<div class="tablepane">
<table id="categorygroups" class="data fullwidth">
<thead>
<th scope="col">{{ "Name"|t('app') }}</th>
Expand Down
2 changes: 1 addition & 1 deletion src/templates/settings/fields/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
</p>

{% if fields %}
<div class="scrolltable">
<div class="tablepane">
<table id="fields" class="data fullwidth">
<thead>
<th scope="col">{{ "Name"|t('app') }}</th>
Expand Down
2 changes: 1 addition & 1 deletion src/templates/settings/globals/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</p>

{% if globalSets %}
<div class="scrolltable">
<div class="tablepane">
<table id="sets" class="data fullwidth">
<thead>
<th scope="col">{{ "Global Set Name"|t('app') }}</th>
Expand Down
2 changes: 1 addition & 1 deletion src/templates/settings/plugins/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

{% block content %}
{% if info|length %}
<div class="scrolltable">
<div class="tablepane">
<table id="plugins" class="data fullwidth">
<tbody>
{% for handle, config in info %}
Expand Down
2 changes: 1 addition & 1 deletion src/templates/settings/sections/_entrytypes/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{% endblock %}

{% block content %}
<div class="scrolltable">
<div class="tablepane">
<table id="entrytypes" class="data fullwidth">
<thead>
<th scope="col">{{ "Name"|t('app') }}</th>
Expand Down
2 changes: 1 addition & 1 deletion src/templates/settings/sections/_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</div>

{% if sections|length %}
<div class="scrolltable">
<div class="tablepane">
<table id="sections" class="data fullwidth">
<thead>
<th scope="col">{{ "Name"|t('app') }}</th>
Expand Down
2 changes: 1 addition & 1 deletion src/templates/settings/sites/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@


{% block content %}
<div class="scrolltable">
<div class="tablepane">
<table id="sites" class="data fullwidth">
<thead>
<th scope="col">{{ "Name"|t('app') }}</th>
Expand Down
2 changes: 1 addition & 1 deletion src/templates/settings/tags/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</div>

{% if tagGroups|length %}
<div class="scrolltable">
<div class="tablepane">
<table id="taggroups" class="data fullwidth">
<thead>
<th scope="col">{{ "Name"|t('app') }}</th>
Expand Down
2 changes: 1 addition & 1 deletion src/templates/settings/users/groups/_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</p>

{% if groups|length %}
<div class="scrolltable">
<div class="tablepane">
<table id="groups" class="data fullwidth">
<thead>
<th scope="col">{{ "Name"|t('app') }}</th>
Expand Down
20 changes: 16 additions & 4 deletions src/web/assets/cp/dist/css/_cp.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1051,13 +1051,25 @@ $systemInfoHoverBgColor: darken($grey800, 10%);
#main-content,
#tabs ul li a,
#content,
#details .meta {
padding-left: 12px;
padding-right: 12px;
#details .meta,
.elements .header {
padding-left: 14px;
padding-right: 14px;
}

#tabs ul li + li {
@include margin-left(-6px);
@include margin-left(-7px);
}

#footer {
margin-left: -14px;
margin-right: -14px;
}

.tablepane,
.elements .header {
margin-left: -14px;
margin-right: -14px;
}
}

Expand Down
Loading

0 comments on commit 83d27a3

Please sign in to comment.