Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
osticket
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
docker
osticket
Commits
090dff69
Commit
090dff69
authored
10 years ago
by
Jared Hancock
Browse files
Options
Downloads
Patches
Plain Diff
i18n: Localize status on ticket queue pages
parent
8f43c5a2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/class.list.php
+5
-0
5 additions, 0 deletions
include/class.list.php
include/client/tickets.inc.php
+3
-2
3 additions, 2 deletions
include/client/tickets.inc.php
include/staff/tickets.inc.php
+2
-2
2 additions, 2 deletions
include/staff/tickets.inc.php
with
10 additions
and
4 deletions
include/class.list.php
+
5
−
0
View file @
090dff69
...
...
@@ -1035,6 +1035,11 @@ class TicketStatus extends VerySimpleModel implements CustomListItem {
$T
=
CustomDataTranslation
::
translate
(
$tag
);
return
$T
!=
$tag
?
$T
:
$this
->
get
(
$subtag
);
}
static
function
getLocalById
(
$id
,
$subtag
,
$default
)
{
$tag
=
_H
(
sprintf
(
'status.%s.%s'
,
$subtag
,
$id
));
$T
=
CustomDataTranslation
::
translate
(
$tag
);
return
$T
!=
$tag
?
$T
:
$default
;
}
function
getConfiguration
()
{
...
...
This diff is collapsed.
Click to expand it.
include/client/tickets.inc.php
+
3
−
2
View file @
090dff69
...
...
@@ -82,7 +82,7 @@ $negorder=$order=='-'?'ASC':'DESC'; //Negate the sorting
$tickets
->
order_by
(
$order
.
$order_by
);
$tickets
->
values
(
'ticket_id'
,
'number'
,
'created'
,
'isanswered'
,
'source'
,
'status_
_
id'
,
'ticket_id'
,
'number'
,
'created'
,
'isanswered'
,
'source'
,
'status_id'
,
'status__state'
,
'status__name'
,
'cdata__subject'
,
'dept_id'
,
'dept__name'
,
'dept__ispublic'
,
'user__default_email__address'
);
...
...
@@ -143,6 +143,7 @@ $tickets->values(
$subject
=
Format
::
truncate
(
$subject_field
->
display
(
$subject_field
->
to_php
(
$T
[
'cdata__subject'
])
?:
$T
[
'cdata__subject'
]
),
40
);
$status
=
TicketStatus
::
getLocalById
(
$T
[
'status_id'
],
'value'
,
$T
[
'status__name'
]);
if
(
false
)
// XXX: Reimplement attachment count support
$subject
.
=
' <span class="Icon file"></span>'
;
...
...
@@ -158,7 +159,7 @@ $tickets->values(
href=
"tickets.php?id=
<?php
echo
$T
[
'ticket_id'
];
?>
"
>
<?php
echo
$ticketNumber
;
?>
</a>
</td>
<td>
<?php
echo
Format
::
date
(
$T
[
'created'
]);
?>
</td>
<td>
<?php
echo
$
T
[
'
status
__name'
]
;
?>
</td>
<td>
<?php
echo
$status
;
?>
</td>
<td>
<a
href=
"tickets.php?id=
<?php
echo
$T
[
'ticket_id'
];
?>
"
>
<?php
echo
$subject
;
?>
</a>
</td>
...
...
This diff is collapsed.
Click to expand it.
include/staff/tickets.inc.php
+
2
−
2
View file @
090dff69
...
...
@@ -108,7 +108,7 @@ $tickets->annotate(array(
// Select pertinent columns
// ------------------------------------------------------------
$tickets
->
values
(
'lock__lock_id'
,
'staff_id'
,
'isoverdue'
,
'team_id'
,
'ticket_id'
,
'number'
,
'cdata__subject'
,
'user__default_email__address'
,
'source'
,
'cdata__:priority__priority_color'
,
'cdata__:priority__priority_desc'
,
'status__name'
,
'status__state'
,
'dept_id'
,
'dept__name'
,
'user__name'
,
'lastupdate'
,
'collab_count'
);
$tickets
->
values
(
'lock__lock_id'
,
'staff_id'
,
'isoverdue'
,
'team_id'
,
'ticket_id'
,
'number'
,
'cdata__subject'
,
'user__default_email__address'
,
'source'
,
'cdata__:priority__priority_color'
,
'cdata__:priority__priority_desc'
,
'status_id'
,
'status__name'
,
'status__state'
,
'dept_id'
,
'dept__name'
,
'user__name'
,
'lastupdate'
,
'collab_count'
);
// Apply requested quick filter
...
...
@@ -322,7 +322,7 @@ $_SESSION[':Q:tickets'] = $tickets;
Format
::
truncate
(
$un
,
22
,
strpos
(
$un
,
'@'
)));
?>
</td>
<?php
if
(
$search
&&
!
$status
){
$displaystatus
=
ucfirst
(
$T
[
'status__name'
]);
$displaystatus
=
TicketStatus
::
getLocalById
(
$T
[
'status_id'
],
'value'
,
$T
[
'status__name'
]);
if
(
!
strcasecmp
(
$T
[
'status__state'
],
'open'
))
$displaystatus
=
"<b>
$displaystatus
</b>"
;
echo
"<td>
$displaystatus
</td>"
;
...
...
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