Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
KDE.org Applications Subsite
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
4
Issues
4
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Websites
KDE.org Applications Subsite
Commits
ebe499c7
Commit
ebe499c7
authored
Sep 17, 2020
by
Carl Schwan
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more app data extensions
* mailing list * irc * matrix
parent
11f24253
Pipeline
#34610
passed with stage
in 3 minutes and 35 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
5 deletions
+49
-5
src/Model/AppData.php
src/Model/AppData.php
+35
-4
templates/main/application.html.twig
templates/main/application.html.twig
+14
-1
No files found.
src/Model/AppData.php
View file @
ebe499c7
...
...
@@ -481,7 +481,9 @@ class AppData
*/
public
function
getForum
():
string
{
if
(
isset
(
$this
->
raw
[
'X-KDE-Forum'
]))
{
if
(
isset
(
$this
->
raw
[
'Custom'
])
&&
isset
(
$this
->
raw
[
'Custom'
][
'KDE::forum'
]))
{
return
$this
->
raw
[
'Custom'
][
'KDE::forum'
];
}
else
if
(
isset
(
$this
->
raw
[
'X-KDE-Forum'
]))
{
return
'https://forum.kde.org/viewforum.php?f='
.
$this
->
raw
[
'X-KDE-Forum'
];
}
else
{
return
'https://forum.kde.org/'
;
...
...
@@ -489,12 +491,14 @@ class AppData
}
/**
* Get App
Data extension X-KDE-IRC
* Get App
lication irc channel
* @return string[]
*/
public
function
getIrcChannels
():
array
{
if
(
isset
(
$this
->
raw
[
'X-KDE-IRC'
]))
{
if
(
isset
(
$this
->
raw
[
'Custom'
])
&&
isset
(
$this
->
raw
[
'Custom'
][
'KDE::irc'
]))
{
return
$this
->
raw
[
'Custom'
][
'KDE::irc'
];
}
else
if
(
isset
(
$this
->
raw
[
'X-KDE-IRC'
]))
{
$irc
=
$this
->
raw
[
'X-KDE-IRC'
];
if
(
is_array
(
$irc
))
{
return
$irc
;
...
...
@@ -506,6 +510,18 @@ class AppData
}
}
/**
* Get Application matrix channel
* @return string[]
*/
public
function
getMatrixChannel
():
?string
{
if
(
isset
(
$this
->
raw
[
'Custom'
])
&&
isset
(
$this
->
raw
[
'Custom'
][
'KDE::matrix'
]))
{
return
$this
->
raw
[
'Custom'
][
'KDE::matrix'
];
}
return
null
;
}
private
function
unifyMailingList
(
string
$mailingList
):
string
{
if
(
endsWith
(
$mailingList
,
'@kde.org'
))
{
...
...
@@ -524,11 +540,14 @@ class AppData
}
/**
* AppData extension X-KDE-MailingLists
* AppData extension X-KDE-MailingLists
or KDE::mailinglist
* @return string[]
*/
public
function
getMailingLists
():
array
{
if
(
isset
(
$this
->
raw
[
'Custom'
])
&&
isset
(
$this
->
raw
[
'Custom'
][
'KDE::mailinglist'
]))
{
return
unifyMailingList
(
$this
->
raw
[
'Custom'
][
'KDE::mailinglist'
]);
}
$ml
=
[];
if
(
isset
(
$this
->
raw
[
'X-KDE-MailingLists'
]))
{
$ml
=
$this
->
raw
[
'X-KDE-MailingLists'
];
...
...
@@ -542,6 +561,18 @@ class AppData
return
array_map
(
'App\Model\AppData::unifyMailingList'
,
$ml
);
}
/**
* AppData extension KDE::mailinglist-devel
* @return string[]
*/
public
function
getDevelMailingList
():
?string
{
if
(
isset
(
$this
->
raw
[
'Custom'
])
&&
isset
(
$this
->
raw
[
'Custom'
][
'KDE::mailinglist-devel'
]))
{
return
unifyMailingList
(
$this
->
raw
[
'Custom'
][
'KDE::mailinglist-devel'
]);
}
return
null
;
}
/**
* AppData extension X-KDE-Repository
* @return string|null
...
...
templates/main/application.html.twig
View file @
ebe499c7
...
...
@@ -265,7 +265,13 @@ AppStream application stores. You can also use your distribution's package manag
{%
trans
%}
Report a bug
{%
endtrans
%}
</a>
</div>
{%
else
%}
{%
endif
%}
{%
if
application.matrixChannel
is
not
null
%}
{%
trans
%}
Matrix:
{%
endtrans
%}
<a
href=
"https://webchat.kde.org/#/room/
{{
application.matrixChannel
}}
"
>
{{
application.matrixChannel
}}
</a>
<br/>
{%
endif
%}
{%
if
application.ircChannels
|
length
>
0
%}
{%
trans
%}
IRC:
{%
endtrans
%}
...
...
@@ -283,6 +289,13 @@ AppStream application stores. You can also use your distribution's package manag
</a>
{%
endfor
%}
{%
endif
%}
{%
if
application.develMailingList
is
not
null
%}
{%
trans
%}
Developer mailing list:
{%
endtrans
%}
<a
href=
"https://mail.kde.org/mailman/listinfo/
{{
application.develMailingList
}}
"
>
{{
application.develMailingList
}}
@kde.org
</a>
<br/>
{%
endif
%}
{%
if
application.authors
is
not
null
%}
<div>
<b>
{%
trans
%}
Author(s):
{%
endtrans
%}
</b>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment