Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Stud.IP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marcus Eibrink-Lunzenauer
Stud.IP
Commits
3e885087
Commit
3e885087
authored
9 months ago
by
Jan-Hendrik Willms
Browse files
Options
Downloads
Patches
Plain Diff
fixes #4227
Closes #4227 Merge request
studip/studip!3058
parent
d5f07fc2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
resources/assets/stylesheets/scss/tables.scss
+2
-6
2 additions, 6 deletions
resources/assets/stylesheets/scss/tables.scss
resources/vue/components/FilesTable.vue
+23
-56
23 additions, 56 deletions
resources/vue/components/FilesTable.vue
with
25 additions
and
62 deletions
resources/assets/stylesheets/scss/tables.scss
+
2
−
6
View file @
3e885087
...
...
@@ -271,15 +271,11 @@ tr.sortable {
}
th
.sortasc
{
span
[
role
=
img
]
{
@include
icon
(
'after'
,
'arr_1up'
,
'clickable'
);
}
@include
icon
(
'after'
,
'arr_1up'
,
'clickable'
);
}
th
.sortdesc
{
span
[
role
=
img
]
{
@include
icon
(
'after'
,
'arr_1down'
,
'clickable'
);
}
@include
icon
(
'after'
,
'arr_1down'
,
'clickable'
);
}
}
...
...
This diff is collapsed.
Click to expand it.
resources/vue/components/FilesTable.vue
+
23
−
56
View file @
3e885087
...
...
@@ -54,109 +54,73 @@
<th
@
click=
"sort('mime_type')"
:class=
"sortClasses('mime_type')"
:aria-sort=
"getAriaSortString('mime_type')"
:aria-labelledby=
"sortedBy === 'mime_type' ? 'sort-indicator-mime_type' : null"
>
:aria-label=
"getAriaSortLabel('mime_type', $gettext('Typ'))"
>
<a
href=
"#"
@
click.prevent
:title=
"$gettext('Nach Typ sortieren')"
>
{{
$gettext
(
'
Typ
'
)
}}
</a>
<span
v-if=
"sortedBy === 'mime_type'"
role=
"img"
id=
"sort-indicator-mime_type"
:aria-label=
"sortDirection === 'asc'
? $gettext('Es wird aufsteigend nach der Spalte Typ sortiert.')
: $gettext('Es wird absteigend nach der Spalte Typ sortiert.')"
>
</span>
</th>
<th
@
click=
"sort('name')"
:class=
"sortClasses('name')"
:aria-sort=
"getAriaSortString('name')"
:aria-labelledby=
"sortedBy === 'name' ? 'sort-indicator-name' : null"
>
:aria-label=
"getAriaSortLabel('name', $gettext('Name'))"
>
<a
href=
"#"
@
click.prevent
:title=
"$gettext('Nach Name sortieren')"
>
{{
$gettext
(
'
Name
'
)
}}
</a>
<span
v-if=
"sortedBy === 'name'"
role=
"img"
id=
"sort-indicator-name"
:aria-label=
"sortDirection === 'asc'
? $gettext('Es wird aufsteigend nach der Spalte Name sortiert.')
: $gettext('Es wird absteigend nach der Spalte Name sortiert.')"
>
</span>
</th>
<th
@
click=
"sort('size')"
class=
"responsive-hidden"
:class=
"sortClasses('size')"
:aria-sort=
"getAriaSortString('size')"
:aria-labelledby=
"sortedBy === 'size' ? 'sort-indicator-size' : null"
>
:aria-label=
"getAriaSortLabel('size', $gettext('Größe'))"
>
<a
href=
"#"
@
click.prevent
:title=
"$gettext('Nach Größe sortieren')"
>
{{
$gettext
(
'
Größe
'
)
}}
</a>
<span
v-if=
"sortedBy === 'size'"
role=
"img"
id=
"sort-indicator-size"
:aria-label=
"sortDirection === 'asc'
? $gettext('Es wird aufsteigend nach der Spalte Größe sortiert.')
: $gettext('Es wird absteigend nach der Spalte Größe sortiert.')"
>
</span>
</th>
<th
v-if=
"showdownloads"
@
click=
"sort('downloads')"
class=
"responsive-hidden"
:class=
"sortClasses('downloads')"
:aria-sort=
"getAriaSortString('downloads')"
:aria-labelledby=
"sortedBy === 'downloads' ? 'sort-indicator-downloads' : null"
>
:aria-label=
"getAriaSortLabel('downloads', $gettext('Downloads'))"
>
<a
href=
"#"
@
click.prevent
:title=
"$gettext('Nach Downloads sortieren')"
>
{{
$gettext
(
'
Downloads
'
)
}}
</a>
<span
v-if=
"sortedBy === 'downloads'"
role=
"img"
id=
"sort-indicator-downloads"
:aria-label=
"sortDirection === 'asc'
? $gettext('Es wird aufsteigend nach der Spalte Downloads sortiert.')
: $gettext('Es wird absteigend nach der Spalte Downloads sortiert.')"
>
</span>
</th>
<th
class=
"responsive-hidden"
@
click=
"sort('author_name')"
:class=
"sortClasses('author_name')"
:aria-sort=
"getAriaSortString('author_name')"
:aria-labelledby=
"sortedBy === 'author_name' ? 'sort-indicator-author_name' : null"
>
:aria-label=
"getAriaSortLabel('author_name', $gettext('Autor/-in'))"
>
<a
href=
"#"
@
click.prevent
:title=
"$gettext('Nach Autor/-in sortieren')"
>
{{
$gettext
(
'
Autor/-in
'
)
}}
</a>
<span
v-if=
"sortedBy === 'author_name'"
role=
"img"
id=
"sort-indicator-author_name"
:aria-label=
"sortDirection === 'asc'
? $gettext('Es wird aufsteigend nach der Spalte Autor-/in sortiert.')
: $gettext('Es wird absteigend nach der Spalte Autor-/in sortiert.')"
>
</span>
</th>
<th
class=
"responsive-hidden"
@
click=
"sort('chdate')"
:class=
"sortClasses('chdate')"
:aria-sort=
"getAriaSortString('chdate')"
:aria-labelledby=
"sortedBy === 'chdate' ? 'sort-indicator-chdate' : null"
>
:aria-label=
"getAriaSortLabel('chdate', $gettext('Datum'))"
>
<a
href=
"#"
@
click.prevent
:title=
"$gettext('Nach Datum sortieren')"
>
{{
$gettext
(
'
Datum
'
)
}}
</a>
<span
v-if=
"sortedBy === 'chdate'"
role=
"img"
id=
"sort-indicator-chdate"
:aria-label=
"sortDirection === 'asc'
? $gettext('Es wird aufsteigend nach der Spalte Datum sortiert.')
: $gettext('Es wird absteigend nach der Spalte Datum sortiert.')"
>
</span>
</th>
<th
v-for=
"(name, index) in additionalColumns"
:key=
"index"
...
...
@@ -164,19 +128,13 @@
class=
"responsive-hidden"
:class=
"sortClasses(index)"
:aria-sort=
"getAriaSortString(name)"
:aria-labelledby=
"sortedBy === name ? 'sort-indicator-' + name : null"
>
:aria-label=
"getAriaSortLabel(name, name)"
>
<a
href=
"#"
@
click.prevent
:title=
"$gettextInterpolate($gettext('Nach %
{ colName } sortieren'), {colName: name})">
{{
name
}}
</a>
<span
v-if=
"sortedBy === name"
role=
"img"
:id=
"'sort-indicator-' + name"
:aria-label=
"sortDirection === 'asc'
? $gettextInterpolate($gettext('Es wird aufsteigend nach der Spalte %
{colName} sortiert.'), {colName: name})
: $gettextInterpolate($gettext('Es wird absteigend nach der Spalte %{colName} sortiert.'), {colName: name})">
</span>
</th>
<th
class=
"actions"
data-sort=
"false"
>
{{
$gettext
(
'
Aktionen
'
)
}}
</th>
</tr>
...
...
@@ -514,6 +472,15 @@ export default {
return
column
===
this
.
sortedBy
?
(
this
.
sortDirection
===
'
asc
'
?
'
ascending
'
:
'
descending
'
)
:
null
;
},
getAriaSortLabel
(
column
,
label
)
{
if
(
column
!==
this
.
sortedBy
)
{
return
null
;
}
const
template
=
this
.
sortDirection
===
'
asc
'
?
this
.
$gettext
(
'
Es wird aufsteigend nach der Spalte %{ label } sortiert.
'
)
:
this
.
$gettext
(
'
Es wird absteigend nach der Spalte %{ label } sortiert.
'
);
return
this
.
$gettextInterpolate
(
template
,
{
label
});
}
},
computed
:
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment