Skip to content

Commit 856ad30

Browse files
committed
Rewrite filter rendering from html_writer to Mustache
Finally.
1 parent a229090 commit 856ad30

File tree

7 files changed

+279
-529
lines changed

7 files changed

+279
-529
lines changed

lang/en/local_amos.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,9 @@
226226
$string['filtertxt_desc'] = 'String must contain given text';
227227
$string['filtertxtcasesensitive'] = 'case-sensitive';
228228
$string['filtertxtregex'] = 'regex';
229-
$string['filterver'] = 'Versions';
229+
$string['filterver'] = 'Version';
230230
$string['filtervernothingselected'] = 'Please select some version';
231-
$string['filterver_desc'] = 'Show strings from these Moodle versions';
231+
$string['filterver_desc'] = 'Show strings for this Moodle version';
232232
$string['found'] = 'Found: {$a->found}     Missing: {$a->missing} ({$a->missingonpage})';
233233
$string['foundinfo'] = 'Number of found strings';
234234
$string['foundinfo_help'] = 'Shows the total number of rows in the translator table, number of missing translations and number of missing translations at the current page.';
@@ -460,9 +460,12 @@
460460
* Grey - AMOS can\'t be used to translate this string. For example strings for Moodle 1.9 must be edited via the legacy CVS access only.
461461
462462
Language pack maintainers can see a small red symbol in the corner of the cells they are allowed to commit.';
463-
$string['typecontrib'] = 'Non-standard plugins';
463+
$string['typecontrib'] = 'Additional plugins';
464+
$string['typecontribbadge'] = 'Additional';
464465
$string['typecore'] = 'Core subsystems';
466+
$string['typecorebadge'] = 'Core';
465467
$string['typestandard'] = 'Standard plugins';
468+
$string['typestandardbadge'] = 'Standard';
466469
$string['unableenfixaddon'] = 'English fixes allowed for standard plugins only';
467470
$string['unableenfixcountries'] = 'Country names are copied from ISO 3166-1';
468471
$string['unableunmaintained'] = 'The language pack \'{$a}\' has no maintainer at the moment, so translation contributions cannot be accepted. Please consider volunteering to become \'{$a}\' language pack maintainer.';

renderer.php

Lines changed: 0 additions & 409 deletions
Large diffs are not rendered by default.

scss/filter.scss

Lines changed: 4 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -1,122 +1,14 @@
1-
// Strings filter at the translator page
1+
// Strings filter at the translator page.
22

33
#page-local-amos-view #region-main {
44
overflow-x: auto;
55
}
66

77
.path-local-amos {
88

9-
.string-control-label .fa-mobile {
10-
font-size: 1.7em;
11-
}
12-
13-
.form-check-inline {
14-
display: inline;
15-
margin-right: 4px;
16-
input[type="checkbox"] {
17-
margin-top: 0;
18-
}
19-
}
20-
.form-actions {
21-
button {
22-
margin-right: 4px;
23-
}
24-
}
25-
26-
input[type="radio"],
27-
input[type="checkbox"] {
28-
margin-top: 4px;
29-
margin-right: 0;
30-
}
31-
32-
#amosfilter_form {
33-
.help-block {
34-
font-size: 66%;
35-
}
36-
.jsactions {
37-
display: block;
38-
margin-top: 2px;
39-
min-height: 20px;
40-
input[type="radio"] {
41-
display: none;
42-
}
43-
}
44-
.col-form-label {
45-
text-align: right;
46-
}
47-
}
48-
49-
#amosfilter_fmis .form-check,
50-
#amosfilter_ftxt .form-check,
51-
#amosfilter_fsid .form-check {
52-
padding-left: 0;
53-
}
54-
55-
#amosfilter_fver .unsupported label {
56-
color: gray;
57-
}
58-
59-
#amosfilter_fver label {
60-
padding-right: 0.3em;
61-
}
62-
63-
#amosfilter_submitted_icon {
64-
display: inline-block;
65-
min-width: 20px;
66-
}
67-
68-
#amosfilter_fcmp {
69-
border: 1px solid rgb(204,204,204);
70-
@include border-radius(4px);
71-
padding: 0px 5px;
72-
height: 100px;
73-
overflow: auto;
74-
overflow-y: scroll;
75-
background-color: white;
76-
}
77-
78-
#amosfilter_fcmp.hiddenversions .version {
79-
display: none;
80-
}
81-
82-
.error #amosfilter_fcmp {
83-
border-color: #b94a48;
84-
color: #b94a48;
85-
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
86-
-moz-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
87-
box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
88-
}
89-
90-
.error #amosfilter_fcmp_actions_search {
91-
border-color: inherit;
92-
-webkit-box-shadow: inherit;
93-
-moz-box-shadow: inherit;
94-
box-shadow: inherit;
95-
color: inherit;
96-
}
97-
98-
#amosfilter_fcmp table tr th, #amosfilter_fcmp table tr td {
99-
border: none;
100-
padding: 0px 1px;
101-
margin: 0px;
102-
text-align: left;
103-
vertical-align: top;
104-
}
105-
106-
#amosfilter_fcmp table tr th {
107-
font-style: italic;
108-
font-weight: bold;
109-
}
110-
111-
#amosfilter_fcmp table tr td.version span {
112-
background-color: #ccc;
113-
font-size: 70%;
114-
color: white;
115-
padding: 2px;
116-
}
117-
118-
#amosfilter_fcmp table tr td.version.supported span {
119-
background-color: theme-color("success");
9+
label + .form-text {
10+
margin-top: 0;
11+
margin-bottom: 0.25rem;
12012
}
12113

12214
#amosfilter_fcmp input[type=checkbox]:checked + label {

scss/styles.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111

1212
.path-local-amos {
1313

14-
h1, h2 {
15-
text-align: center;
16-
}
17-
1814
// Translator specific styling
1915

2016
.translatorwrapper {

0 commit comments

Comments
 (0)