mirror of
https://github.com/Deutscher-Tischfussballbund/com_sportsmanager.git
synced 2026-06-10 14:37:52 +00:00
Compare commits
59 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 40633f864a | |||
| 8e6aa127c6 | |||
| 9289843cb1 | |||
| 7a70500175 | |||
| 31b8e5251e | |||
| 455f845ab0 | |||
| f55d89827a | |||
| 874e06e061 | |||
| 83b8e1c25f | |||
| 3c9fac7e1a | |||
| 4ec02e5f02 | |||
| 4d1573729d | |||
| 6da371569a | |||
| fdede4a4a7 | |||
| 7ced30cf5b | |||
| 934b5b4971 | |||
| 085e5a8aeb | |||
| 53ada7c6b0 | |||
| 29dbfaeea4 | |||
| 95e02435fd | |||
| 32eacde07d | |||
| 2b19aee00f | |||
| 8b6ad5103c | |||
| 743f2b4013 | |||
| 2d2a124239 | |||
| d1e0dec74a | |||
| c4c3ea88fc | |||
| 761e04b6f2 | |||
| 089796d201 | |||
| e2b6f48498 | |||
| 3422813152 | |||
| 67b46f121a | |||
| 6c3c9badfd | |||
| e05d107af3 | |||
| 2f94c29c7e | |||
| b656cb5df3 | |||
| af97c59960 | |||
| ebb3580fad | |||
| 4a313d5914 | |||
| 771856b842 | |||
| 0c4d0820d1 | |||
| 8a0ad8d8e9 | |||
| 03a448f4cc | |||
| 9d75619c2c | |||
| a1890c51c0 | |||
| 51ee656f66 | |||
| 6d9df0e769 | |||
| a74bcb0ee8 | |||
| 6399eab0af | |||
| 9cde84a1d0 | |||
| 76738ec307 | |||
| 59e1a4571b | |||
| 7952c95217 | |||
| 1e4e34ef71 | |||
| de467c0d4a | |||
| 385bef0752 | |||
| 2dddfa473a | |||
| 82c0f3a58b | |||
| a6fe497cad |
@@ -0,0 +1,25 @@
|
|||||||
|
name-template: "Release $COMPLETE"
|
||||||
|
tag-template: "v$COMPLETE"
|
||||||
|
draft: false
|
||||||
|
|
||||||
|
exclude:
|
||||||
|
pulls: true
|
||||||
|
exclude-labels:
|
||||||
|
- changelog-ignore
|
||||||
|
|
||||||
|
categories:
|
||||||
|
- title: "Features"
|
||||||
|
labels: ["feature", "enhancement"]
|
||||||
|
- title: "Fixes"
|
||||||
|
labels: ["bug"]
|
||||||
|
- title: "Maintenance"
|
||||||
|
labels: ["chore", "refactor"]
|
||||||
|
|
||||||
|
change-template: "- $TITLE [#$NUMBER]"
|
||||||
|
|
||||||
|
template: |
|
||||||
|
# Release $RESOLVED_VERSION
|
||||||
|
|
||||||
|
## Changes
|
||||||
|
|
||||||
|
$CHANGES
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
name-template: "Release $COMPLETE"
|
||||||
|
tag-template: "v$COMPLETE"
|
||||||
|
draft: false
|
||||||
|
|
||||||
|
exclude:
|
||||||
|
pulls: true
|
||||||
|
exclude-labels:
|
||||||
|
- changelog-ignore
|
||||||
|
|
||||||
|
categories:
|
||||||
|
- title: "Features"
|
||||||
|
labels: ["feature", "enhancement"]
|
||||||
|
- title: "Fixes"
|
||||||
|
labels: ["bug"]
|
||||||
|
- title: "Maintenance"
|
||||||
|
labels: ["chore", "refactor"]
|
||||||
|
|
||||||
|
change-template: "- $TITLE [#$NUMBER]"
|
||||||
|
|
||||||
|
template: |
|
||||||
|
## Changes
|
||||||
|
|
||||||
|
$CHANGES
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
name: Auto-label PRs
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [opened, reopened, synchronize, edited]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
label-changelog-ignore:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Label PRs
|
||||||
|
uses: actions/github-script@v7
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
script: |
|
||||||
|
const base = context.payload.pull_request.base.ref;
|
||||||
|
const head = context.payload.pull_request.head.ref;
|
||||||
|
|
||||||
|
if ((base === 'sportsmanager2-prod' && head === 'sportsmanager2-stage') || (base === 'sportsmanager2-stage' && head === 'sportsmanager2-dev')) {
|
||||||
|
await github.rest.issues.addLabels({
|
||||||
|
...context.repo,
|
||||||
|
issue_number: context.payload.pull_request.number,
|
||||||
|
labels: ['changelog-ignore']
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
# This workflow will run release using node and then publish a package to GitHub Packages when a release is created
|
||||||
|
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
|
||||||
|
|
||||||
|
name: Sportsmanager Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v[0-9]+.[0-9]+.[0-9]+' # run only on version tags like v1.0.0
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: sportsmanager2-prod
|
||||||
|
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
|
||||||
|
- name: Install npm dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Generate release notes
|
||||||
|
id: release_notes_extension
|
||||||
|
uses: release-drafter/release-drafter@v6
|
||||||
|
with:
|
||||||
|
config-name: release-drafter_extension.yml
|
||||||
|
version: ${{ github.ref_name }}
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Save release notes to file
|
||||||
|
run: |
|
||||||
|
echo "${{ steps.release_notes_extension.outputs.body }}" > RELEASE_NOTES.md
|
||||||
|
|
||||||
|
- name: Run build script
|
||||||
|
run: npm run release
|
||||||
|
|
||||||
|
- name: Generate release notes
|
||||||
|
id: release_notes_github
|
||||||
|
uses: release-drafter/release-drafter@v6
|
||||||
|
with:
|
||||||
|
config-name: release-drafter_github.yml
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Save release notes to file
|
||||||
|
run: |
|
||||||
|
echo "${{ steps.release_notes_github.outputs.body }}" > RELEASE_NOTES.md
|
||||||
|
|
||||||
|
- name: Create GitHub Release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
tag_name: "${{ github.ref_name }}"
|
||||||
|
name: "Release ${{ github.ref_name }}"
|
||||||
|
files: package/packages/com_sportsmanager.zip
|
||||||
|
body_path: "RELEASE_NOTES.md"
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Delete draft release via API # workaround: remove leftover draft by release-drafter
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
REPO: ${{ github.repository }}
|
||||||
|
run: |
|
||||||
|
drafts=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \
|
||||||
|
https://api.github.com/repos/$REPO/releases | jq '.[] | select(.draft == true)')
|
||||||
|
|
||||||
|
if [ -n "$drafts" ]; then
|
||||||
|
id=$(echo "$drafts" | jq -r '.id')
|
||||||
|
curl -s -X DELETE -H "Authorization: token $GITHUB_TOKEN" \
|
||||||
|
https://api.github.com/repos/$REPO/releases/$id
|
||||||
|
echo "Deleted draft release with ID: $id"
|
||||||
|
else
|
||||||
|
echo "No draft releases found"
|
||||||
|
fi
|
||||||
@@ -6,7 +6,7 @@ name: Snapshot Release
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v*-snapshot' # run only on version tags like v1.0.0-snapshot
|
- 'v[0-9]+.[0-9]+.[0-9]+-snapshot' # run only on version tags like v1.0.0-snapshot
|
||||||
# - 'v*' # Run only on version tags like v1.0.0
|
# - 'v*' # Run only on version tags like v1.0.0
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -33,7 +33,7 @@ jobs:
|
|||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
prerelease: true
|
prerelease: true
|
||||||
name: SNAPSHOT
|
name: "Snapshot ${{ github.ref_name }}"
|
||||||
files: package/packages/com_sportsmanager.zip
|
files: package/packages/com_sportsmanager.zip
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
@@ -2,11 +2,14 @@
|
|||||||
|
|
||||||
## DEV/STAGE environments
|
## DEV/STAGE environments
|
||||||
|
|
||||||
| LV | HOSTER | DOMAIN | BRANCH |
|
| LV | HOSTER | DOMAIN | BRANCH |
|
||||||
| ------ | -------- | ------------------------------------------------------------ | ------------------ |
|
| ------ | -------- | ------------------------------------------------------------ | -------------------- |
|
||||||
| DTFB | Kicktemp | [stage.dtfb.de](https://stage.dtfb.de) | dev |
|
| DTFB | Kicktemp | [stage.dtfb.de](https://stage.dtfb.de) | dev |
|
||||||
| TFVHH | Kicktemp | [stage.kickern-hamburg.de](https://stage.kickern-hamburg.de) | dev |
|
| TFVHH | Kicktemp | [stage.kickern-hamburg.de](https://stage.kickern-hamburg.de) | dev |
|
||||||
| STFVH | DTFB | [stage.stfv.de](https://stage.stfv.de/) | sportsmanager2-dev |
|
| STFVH | DTFB | [stage.stfv.de](https://stage.stfv.de/) | sportsmanager2-stage |
|
||||||
|
| MTFV | DTFB | [stage.mtfv.de](https://stage.mtfv.de/) | ? |
|
||||||
|
| TFVSH | DTFB | [relaunch.tfvsh.de](https://relaunch.tfvsh.de) | ? |
|
||||||
|
|
||||||
|
|
||||||
## PROD environments
|
## PROD environments
|
||||||
|
|
||||||
@@ -46,6 +49,41 @@ joomla specific database prefixes like #__
|
|||||||
To set it up, insert into the configuration popup which follows after you enable the framework support:
|
To set it up, insert into the configuration popup which follows after you enable the framework support:
|
||||||
Joomla install path: `./data/joomla_data`
|
Joomla install path: `./data/joomla_data`
|
||||||
JConfig: `./data/joomla_data/configuration.php`
|
JConfig: `./data/joomla_data/configuration.php`
|
||||||
|
> This works only with mounted volumes. However, mounted volumes will slow down the joomla instance significantly.
|
||||||
|
> The current setup does not use mounted volumes.
|
||||||
|
> An alternative would be to download joomla and use that installation
|
||||||
|
|
||||||
|
### Debugging (with Docker/Intellij)
|
||||||
|
1. Start Docker Container (see above)
|
||||||
|
2. Create a terminal for that container
|
||||||
|
```shell
|
||||||
|
docker exec -it <container_name> bash
|
||||||
|
```
|
||||||
|
3. install xdebug within the container since joomla does not come with xdebug preinstalled
|
||||||
|
```shell
|
||||||
|
pecl install xdebug
|
||||||
|
```
|
||||||
|
4. restart the container
|
||||||
|
5. In Intellij Go to [File | Settings | Languages & Frameworks | PHP | Servers](jetbrains://idea/settings?name=Languages+%26+Frameworks--PHP--Servers) and setup your server
|
||||||
|
|
||||||
|
| | |
|
||||||
|
|----------|-----------|
|
||||||
|
| name | anything |
|
||||||
|
| host | localhost |
|
||||||
|
| port | 8080 |
|
||||||
|
| debugger | xdebug |
|
||||||
|
|
||||||
|
use the path mapping and map the repo structure to the container content
|
||||||
|
|
||||||
|
| File/Directory | path on server |
|
||||||
|
|------------------------------------------------------------------|----------------------------------------|
|
||||||
|
| \<path>/com_sportsmanager/src/structure/administrator/components | /var/www/html/administrator/components |
|
||||||
|
| \<path>/com_sportsmanager/src/structure/components | /var/www/html/components |
|
||||||
|
|
||||||
|
7. Click on "Start Listening for PHP Debug Connections" in the top row of intellij
|
||||||
|
8. (Not sure if optional) Install a browser extension by Jetbrains
|
||||||
|
https://chromewebstore.google.com/detail/xdebug-helper-by-jetbrain/aoelhdemabeimdhedkidlnbkfhnhgnhm
|
||||||
|
|
||||||
|
=======
|
||||||
|
|
||||||
Test
|
Test
|
||||||
@@ -30,6 +30,7 @@ services:
|
|||||||
MYSQL_USER: joomla
|
MYSQL_USER: joomla
|
||||||
MYSQL_PASSWORD: examplepass
|
MYSQL_PASSWORD: examplepass
|
||||||
MYSQL_RANDOM_ROOT_PASSWORD: '1'
|
MYSQL_RANDOM_ROOT_PASSWORD: '1'
|
||||||
|
TZ: Europe/Berlin
|
||||||
volumes:
|
volumes:
|
||||||
- joomla_database:/var/lib/mysql
|
- joomla_database:/var/lib/mysql
|
||||||
networks:
|
networks:
|
||||||
|
|||||||
@@ -1924,3 +1924,12 @@ opcache.file_cache = /tmp/opcache_file
|
|||||||
|
|
||||||
; List of headers files to preload, wildcard patterns allowed.
|
; List of headers files to preload, wildcard patterns allowed.
|
||||||
;ffi.preload=
|
;ffi.preload=
|
||||||
|
|
||||||
|
zend_extension=xdebug.so
|
||||||
|
xdebug.mode=debug
|
||||||
|
xdebug.start_with_request=yes
|
||||||
|
xdebug.client_host=host.docker.internal
|
||||||
|
xdebug.client_port=9003
|
||||||
|
xdebug.log=/tmp/xdebug.log
|
||||||
|
xdebug.discover_client_host=false
|
||||||
|
xdebug.log_level=7
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export const config = {
|
|||||||
watch: ['src/structure/**/*.{php,html,xml,ini,less,json,js,css}'],
|
watch: ['src/structure/**/*.{php,html,xml,ini,less,json,js,css}'],
|
||||||
},
|
},
|
||||||
copyrelease: {
|
copyrelease: {
|
||||||
src: ['src/structure/**/**', 'src/structure/**/.*', '!src/structure/**/*.{php,html,xml,ini,less,json,js,css}', '!src/structure/**/.*.{php,html,xml,ini,less,json,js,css}'],
|
src: ['RELEASE_NOTES.md','src/structure/**/**', 'src/structure/**/.*', '!src/structure/**/*.{php,html,xml,ini,less,json,js,css}', '!src/structure/**/.*.{php,html,xml,ini,less,json,js,css}'],
|
||||||
replacesrc: ['src/structure/**/**.{php,html,xml,ini,less,json,js,css}', 'src/structure/**/.*.{php,html,xml,ini,less,json,js,css}'],
|
replacesrc: ['src/structure/**/**.{php,html,xml,ini,less,json,js,css}', 'src/structure/**/.*.{php,html,xml,ini,less,json,js,css}'],
|
||||||
dest: 'releasefiles/'
|
dest: 'releasefiles/'
|
||||||
},
|
},
|
||||||
@@ -90,6 +90,10 @@ export const config = {
|
|||||||
{
|
{
|
||||||
src: './releasefiles/plugins/system/kickyootheme/**/**',
|
src: './releasefiles/plugins/system/kickyootheme/**/**',
|
||||||
dest: 'sourcefiles/plg_system_kickyootheme'
|
dest: 'sourcefiles/plg_system_kickyootheme'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
src: './releasefiles/RELEASE_NOTES.md',
|
||||||
|
dest: 'sourcefiles/com_sportsmanager/admin/'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
package: [
|
package: [
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "sportsmanager",
|
"name": "sportsmanager",
|
||||||
"description": "",
|
"description": "",
|
||||||
"version": "0.0.1",
|
"version": "2.0.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"boilerplate": "cross-env NODE_ENV=development gulp boilerplate",
|
"boilerplate": "cross-env NODE_ENV=development gulp boilerplate",
|
||||||
"build": "cross-env NODE_ENV=production gulp build",
|
"build": "cross-env NODE_ENV=production gulp build",
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/nielsnuebel/com_sportsmanager.git"
|
"url": "https://github.com/Deutscher-Tischfussballbund/com_sportsmanager.git"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": {
|
"author": {
|
||||||
|
|||||||
+9
@@ -24,6 +24,15 @@ class HtmlView extends BaseHtmlView
|
|||||||
?>
|
?>
|
||||||
<h3><?php echo Text::_('COM_SPORTSMANAGER'); ?> – Created by Sven Nickel | Maintained by DTFB</h3>
|
<h3><?php echo Text::_('COM_SPORTSMANAGER'); ?> – Created by Sven Nickel | Maintained by DTFB</h3>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
$notesPath = JPATH_COMPONENT_ADMINISTRATOR . '/RELEASE_NOTES.md';
|
||||||
|
if (file_exists($notesPath)) {
|
||||||
|
$notes = file_get_contents($notesPath);
|
||||||
|
echo '<div style="padding:1em;"><h3>Release Notes</h3><pre>' .
|
||||||
|
htmlspecialchars($notes) . '</pre></div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Display the template
|
// Display the template
|
||||||
parent::display($tpl);
|
parent::display($tpl);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7203,7 +7203,16 @@ function adminMannschaften(): void
|
|||||||
$query = "SELECT #__sportsmanager_team.*, #__sportsmanager_verein.vereinsname, #__sportsmanager_spielort.*,"
|
$query = "SELECT #__sportsmanager_team.*, #__sportsmanager_verein.vereinsname, #__sportsmanager_spielort.*,"
|
||||||
. "\n (SELECT COUNT(*) FROM #__sportsmanager_mitglied_von_team WHERE #__sportsmanager_team.team_id = #__sportsmanager_mitglied_von_team.team_id AND NOT ausgetreten) AS mitglieder_aktiv,"
|
. "\n (SELECT COUNT(*) FROM #__sportsmanager_mitglied_von_team WHERE #__sportsmanager_team.team_id = #__sportsmanager_mitglied_von_team.team_id AND NOT ausgetreten) AS mitglieder_aktiv,"
|
||||||
. "\n (SELECT COUNT(*) FROM #__sportsmanager_mitglied_von_team WHERE #__sportsmanager_team.team_id = #__sportsmanager_mitglied_von_team.team_id) AS mitglieder,"
|
. "\n (SELECT COUNT(*) FROM #__sportsmanager_mitglied_von_team WHERE #__sportsmanager_team.team_id = #__sportsmanager_mitglied_von_team.team_id) AS mitglieder,"
|
||||||
. "\n (SELECT COUNT(*) FROM #__sportsmanager_begegnung WHERE heim_team_id = #__sportsmanager_team.team_id OR gast_team_id = #__sportsmanager_team.team_id) AS begegnungen"
|
. "\n (SELECT COUNT(*) FROM #__sportsmanager_begegnung WHERE heim_team_id = #__sportsmanager_team.team_id OR gast_team_id = #__sportsmanager_team.team_id) AS begegnungen,"
|
||||||
|
. "\n (SELECT COUNT(team_id) FROM #__sportsmanager_begegnung_historie"
|
||||||
|
. "\n WHERE begegnung_historie_id IN ("
|
||||||
|
. "\n SELECT MIN(begegnung_historie_id) AS historie_id FROM #__sportsmanager_begegnung_historie "
|
||||||
|
. "\n WHERE aktion IN (0, 3) AND team_id in "
|
||||||
|
. "\n (SELECT team_id FROM #__sportsmanager_team WHERE veranstaltung_id = $veranstaltungId)"
|
||||||
|
. "\n GROUP BY begegnung_id"
|
||||||
|
. "\n )"
|
||||||
|
. "\n AND team_id = #__sportsmanager_team.team_id"
|
||||||
|
. "\n ) AS anzahl_verschiebungen"
|
||||||
. "\n FROM #__sportsmanager_team"
|
. "\n FROM #__sportsmanager_team"
|
||||||
. "\n LEFT JOIN #__sportsmanager_verein ON #__sportsmanager_verein.verein_id = #__sportsmanager_team.verein_id"
|
. "\n LEFT JOIN #__sportsmanager_verein ON #__sportsmanager_verein.verein_id = #__sportsmanager_team.verein_id"
|
||||||
. "\n LEFT JOIN #__sportsmanager_spielort ON #__sportsmanager_spielort.spielort_id = #__sportsmanager_team.heimspielort_id"
|
. "\n LEFT JOIN #__sportsmanager_spielort ON #__sportsmanager_spielort.spielort_id = #__sportsmanager_team.heimspielort_id"
|
||||||
@@ -8875,7 +8884,56 @@ function adminBegegnungen(): void
|
|||||||
|
|
||||||
$query = "SELECT t1.*, t2.teamname AS heim_name, t3.teamname AS gast_name, t4.unbestaetigtes_ergebnis_id, t4.zwischenergebnis, t2.nichtraucherschutz AS heim_nichtraucherschutz, t3.nichtraucherschutz AS gast_nichtraucherschutz,"
|
$query = "SELECT t1.*, t2.teamname AS heim_name, t3.teamname AS gast_name, t4.unbestaetigtes_ergebnis_id, t4.zwischenergebnis, t2.nichtraucherschutz AS heim_nichtraucherschutz, t3.nichtraucherschutz AS gast_nichtraucherschutz,"
|
||||||
. "\n EXISTS(SELECT * FROM #__sportsmanager_begegnung_historie USE INDEX (begegnung_id) WHERE #__sportsmanager_begegnung_historie.begegnung_id = t1.begegnung_id AND aktion IN (1, 5)) AS verlegt,"
|
. "\n EXISTS(SELECT * FROM #__sportsmanager_begegnung_historie USE INDEX (begegnung_id) WHERE #__sportsmanager_begegnung_historie.begegnung_id = t1.begegnung_id AND aktion IN (1, 5)) AS verlegt,"
|
||||||
. "\n (SELECT IF(#__sportsmanager_begegnung_historie.aktion NOT IN (0, 3, 4), NULL, #__sportsmanager_begegnung_historie.eingetragen) AS eingetragen FROM #__sportsmanager_begegnung_historie USE INDEX (begegnung_id) WHERE #__sportsmanager_begegnung_historie.begegnung_id = t1.begegnung_id ORDER BY begegnung_historie_id DESC LIMIT 1) AS verlegung_eingetragen"
|
. "\n (SELECT IF(#__sportsmanager_begegnung_historie.aktion NOT IN (0, 3, 4), NULL, #__sportsmanager_begegnung_historie.eingetragen) AS eingetragen FROM #__sportsmanager_begegnung_historie USE INDEX (begegnung_id) WHERE #__sportsmanager_begegnung_historie.begegnung_id = t1.begegnung_id ORDER BY begegnung_historie_id DESC LIMIT 1) AS verlegung_eingetragen,"
|
||||||
|
|
||||||
|
. "\n UNIX_TIMESTAMP(t1.zeitpunkt) AS termin_spiel,"
|
||||||
|
|
||||||
|
. "\n ("
|
||||||
|
. "\n SELECT UNIX_TIMESTAMP(zeitpunkt)"
|
||||||
|
. "\n FROM #__sportsmanager_begegnung_historie"
|
||||||
|
. "\n WHERE begegnung_id = t1.begegnung_id AND aktion = 2"
|
||||||
|
. "\n ORDER BY begegnung_historie_id ASC"
|
||||||
|
. "\n LIMIT 1"
|
||||||
|
. "\n ) AS termin_original,"
|
||||||
|
|
||||||
|
. "\n ("
|
||||||
|
. "\n SELECT team_id"
|
||||||
|
. "\n FROM #__sportsmanager_begegnung_historie"
|
||||||
|
. "\n WHERE begegnung_id = t1.begegnung_id AND aktion IN (0, 3)"
|
||||||
|
. "\n ORDER BY begegnung_historie_id ASC"
|
||||||
|
. "\n LIMIT 1"
|
||||||
|
. "\n ) AS verantwortliches_team,"
|
||||||
|
|
||||||
|
. "\n ("
|
||||||
|
. "\n SELECT UNIX_TIMESTAMP(zeitpunkt)"
|
||||||
|
. "\n FROM #__sportsmanager_begegnung_historie"
|
||||||
|
. "\n WHERE begegnung_id = t1.begegnung_id AND aktion = 1"
|
||||||
|
. "\n ORDER BY begegnung_historie_id ASC"
|
||||||
|
. "\n LIMIT 1"
|
||||||
|
. "\n ) AS termin_akzeptiert,"
|
||||||
|
|
||||||
|
. "\n ("
|
||||||
|
. "\n SELECT UNIX_TIMESTAMP(eingetragen)"
|
||||||
|
. "\n FROM #__sportsmanager_begegnung_historie"
|
||||||
|
. "\n WHERE begegnung_id = t1.begegnung_id AND aktion = 6"
|
||||||
|
. "\n ORDER BY begegnung_historie_id ASC"
|
||||||
|
. "\n LIMIT 1"
|
||||||
|
. "\n ) AS ergebnis_vorgeschlagen,"
|
||||||
|
|
||||||
|
. "\n ("
|
||||||
|
. "\n SELECT UNIX_TIMESTAMP(eingetragen)"
|
||||||
|
. "\n FROM #__sportsmanager_begegnung_historie"
|
||||||
|
. "\n WHERE begegnung_id = t1.begegnung_id AND aktion = 7"
|
||||||
|
. "\n ORDER BY begegnung_historie_id ASC"
|
||||||
|
. "\n LIMIT 1"
|
||||||
|
. "\n ) AS ergebnis_akzeptiert,"
|
||||||
|
|
||||||
|
. "\n ("
|
||||||
|
. "\n SELECT COUNT(*) FROM #__sportsmanager_teamspiel"
|
||||||
|
. "\n WHERE begegnung_id = t1.begegnung_id"
|
||||||
|
. "\n AND (heim_spieler_1_id = 0 OR heim_spieler_2_id = 0 OR gast_spieler_1_id = 0 OR gast_spieler_2_id = 0)"
|
||||||
|
. "\n ) AS fehlende_spieler"
|
||||||
|
|
||||||
. "\n FROM #__sportsmanager_begegnung AS t1"
|
. "\n FROM #__sportsmanager_begegnung AS t1"
|
||||||
. "\n LEFT JOIN #__sportsmanager_team AS t2 ON t1.heim_team_id = t2.team_id"
|
. "\n LEFT JOIN #__sportsmanager_team AS t2 ON t1.heim_team_id = t2.team_id"
|
||||||
. "\n LEFT JOIN #__sportsmanager_team AS t3 ON t1.gast_team_id = t3.team_id"
|
. "\n LEFT JOIN #__sportsmanager_team AS t3 ON t1.gast_team_id = t3.team_id"
|
||||||
|
|||||||
@@ -12,6 +12,29 @@ defined('_JEXEC') or die('Restricted access');
|
|||||||
require_once JPATH_SITE . '/components/com_sportsmanager/views/sportsmanager/view_tools.php';
|
require_once JPATH_SITE . '/components/com_sportsmanager/views/sportsmanager/view_tools.php';
|
||||||
require_once JPATH_SITE . '/components/com_sportsmanager/util/image.php';
|
require_once JPATH_SITE . '/components/com_sportsmanager/util/image.php';
|
||||||
|
|
||||||
|
function formatTimediff( $timestamp1, $timestamp2, $verbose ) {
|
||||||
|
if (empty($timestamp1) || empty($timestamp2)) {
|
||||||
|
return "";
|
||||||
|
} else {
|
||||||
|
$daydiff = round(($timestamp2 - $timestamp1) / (3600.0 * 24.0));
|
||||||
|
if ($verbose) {
|
||||||
|
return sprintf("%+d d", $daydiff);
|
||||||
|
} else if (abs($daydiff) > 0) {
|
||||||
|
return sprintf("%dd", $daydiff);
|
||||||
|
} else {
|
||||||
|
return "-";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function formatTeamName( $team_name, $team_id, $highlight_team_id ) {
|
||||||
|
if ($team_id == $highlight_team_id) {
|
||||||
|
return "<b><i>" . htmlentities_utf8($team_name) . "</i></b>";
|
||||||
|
} else {
|
||||||
|
return htmlentities_utf8($team_name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class HTML_sportsmanager_admin
|
class HTML_sportsmanager_admin
|
||||||
{
|
{
|
||||||
static function adminUebersicht($veranstaltungen, $spielerstatistiken, $turniere, $ranglisten, $individualwettbewerbe, $statistik, $saisons, $filter_saison_id, $externe_datenbank): void
|
static function adminUebersicht($veranstaltungen, $spielerstatistiken, $turniere, $ranglisten, $individualwettbewerbe, $statistik, $saisons, $filter_saison_id, $externe_datenbank): void
|
||||||
@@ -7405,6 +7428,8 @@ class HTML_sportsmanager_admin
|
|||||||
<th nowrap><strong><?php echo Text::_('COM_SPORTSMANAGER_CLUB'); ?></strong></th>
|
<th nowrap><strong><?php echo Text::_('COM_SPORTSMANAGER_CLUB'); ?></strong></th>
|
||||||
<th nowrap title="<?php echo Text::_('COM_SPORTSMANAGER_PLAYERS_ACTIVE_INACTIVE'); ?>">
|
<th nowrap title="<?php echo Text::_('COM_SPORTSMANAGER_PLAYERS_ACTIVE_INACTIVE'); ?>">
|
||||||
<strong><?php echo Text::_('COM_SPORTSMANAGER_PLAYERS'); ?></strong></th>
|
<strong><?php echo Text::_('COM_SPORTSMANAGER_PLAYERS'); ?></strong></th>
|
||||||
|
<th nowrap title="<?php echo Text::_('COM_SPORTSMANAGER_NUM_REQUESTED_SHFITS_TOOLTIP'); ?>">
|
||||||
|
<strong><?php echo Text::_('COM_SPORTSMANAGER_NUM_REQUESTED_SHIFTS'); ?></strong></th>
|
||||||
<th nowrap><strong><?php echo Text::_('COM_SPORTSMANAGER_HOME_VENUE'); ?></strong></th>
|
<th nowrap><strong><?php echo Text::_('COM_SPORTSMANAGER_HOME_VENUE'); ?></strong></th>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
@@ -7446,6 +7471,7 @@ class HTML_sportsmanager_admin
|
|||||||
<td nowrap style="text-align: center"><a
|
<td nowrap style="text-align: center"><a
|
||||||
href="<?php echo SportsManagerURL('&task=admin_mitglieder&teamid=' . $row->team_id); ?>"><?php echo $row->mitglieder_aktiv . " / " . ($row->mitglieder - $row->mitglieder_aktiv); ?></a>
|
href="<?php echo SportsManagerURL('&task=admin_mitglieder&teamid=' . $row->team_id); ?>"><?php echo $row->mitglieder_aktiv . " / " . ($row->mitglieder - $row->mitglieder_aktiv); ?></a>
|
||||||
</td>
|
</td>
|
||||||
|
<td nowrap align="center"><?php echo $row->anzahl_verschiebungen; ?></td>
|
||||||
<td nowrap><?php if (!empty($row->name)) echo htmlentities_utf8($row->name); ?></td>
|
<td nowrap><?php if (!empty($row->name)) echo htmlentities_utf8($row->name); ?></td>
|
||||||
<?php if ($row->begegnungen == 0) { ?>
|
<?php if ($row->begegnungen == 0) { ?>
|
||||||
<td nowrap><small><a
|
<td nowrap><small><a
|
||||||
@@ -8616,6 +8642,7 @@ class HTML_sportsmanager_admin
|
|||||||
<strong><?php echo $modus->punktetyp == 0 ? Text::_('COM_SPORTSMANAGER_GOALS') : Text::_('COM_SPORTSMANAGER_SETS'); ?></strong>
|
<strong><?php echo $modus->punktetyp == 0 ? Text::_('COM_SPORTSMANAGER_GOALS') : Text::_('COM_SPORTSMANAGER_SETS'); ?></strong>
|
||||||
</th>
|
</th>
|
||||||
<th nowrap><strong><?php echo Text::_('COM_SPORTSMANAGER_GAME_POINTS'); ?></strong></th>
|
<th nowrap><strong><?php echo Text::_('COM_SPORTSMANAGER_GAME_POINTS'); ?></strong></th>
|
||||||
|
<th nowrap><strong><?php echo Text::_('COM_SPORTSMANAGER_GAME_RESULT_DELAYS');?></strong></th>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
@@ -8648,7 +8675,7 @@ class HTML_sportsmanager_admin
|
|||||||
if ($row->verlegung_eingetragen != null)
|
if ($row->verlegung_eingetragen != null)
|
||||||
echo " **";
|
echo " **";
|
||||||
else if ($row->verlegt != 0)
|
else if ($row->verlegt != 0)
|
||||||
echo " *";
|
echo " (" . formatTimediff($row->termin_original, $row->termin_akzeptiert, true) . ")";
|
||||||
if ($row->nichtraucherschutz == 0 && ((($row->heim_nichtraucherschutz == 1 || $row->heim_nichtraucherschutz == 2 || $row->heim_nichtraucherschutz == 3) && ($row->gast_nichtraucherschutz == 3 || $row->gast_nichtraucherschutz == 7 || $row->gast_nichtraucherschutz == 8)) || (($row->heim_nichtraucherschutz == 5 || $row->heim_nichtraucherschutz == 6 || $row->heim_nichtraucherschutz == 8) && ($row->gast_nichtraucherschutz == 1 || $row->gast_nichtraucherschutz == 4 || $row->gast_nichtraucherschutz == 5))))
|
if ($row->nichtraucherschutz == 0 && ((($row->heim_nichtraucherschutz == 1 || $row->heim_nichtraucherschutz == 2 || $row->heim_nichtraucherschutz == 3) && ($row->gast_nichtraucherschutz == 3 || $row->gast_nichtraucherschutz == 7 || $row->gast_nichtraucherschutz == 8)) || (($row->heim_nichtraucherschutz == 5 || $row->heim_nichtraucherschutz == 6 || $row->heim_nichtraucherschutz == 8) && ($row->gast_nichtraucherschutz == 1 || $row->gast_nichtraucherschutz == 4 || $row->gast_nichtraucherschutz == 5))))
|
||||||
echo " !";
|
echo " !";
|
||||||
?>
|
?>
|
||||||
@@ -8658,13 +8685,20 @@ class HTML_sportsmanager_admin
|
|||||||
echo "<br/><small>" . Text::_('COM_SPORTSMANAGER_MATCH_TABLE') . ": " . htmlentities_utf8($row->tisch) . "</small>";
|
echo "<br/><small>" . Text::_('COM_SPORTSMANAGER_MATCH_TABLE') . ": " . htmlentities_utf8($row->tisch) . "</small>";
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td nowrap><?php echo htmlentities_utf8($row->heim_name); ?></td>
|
<td nowrap><?php echo formatTeamName($row->heim_name, $row->heim_team_id, $row->verantwortliches_team); ?></td>
|
||||||
<td nowrap><?php echo htmlentities_utf8($row->gast_name); ?></td>
|
<td nowrap><?php echo formatTeamName($row->gast_name, $row->gast_team_id, $row->verantwortliches_team); ?></td>
|
||||||
<td nowrap style="text-align: center"><a
|
<td nowrap style="text-align: center"><a
|
||||||
href="<?php echo SportsManagerURL('&task=admin_begegnung_spielplan_edit&veranstaltungid=' . $veranstaltung->veranstaltung_id . '&id=' . $row->begegnung_id); ?>"><?php if ($ergebnis_vorhanden) echo $row->heim_punkte . " : " . $row->gast_punkte; else echo "_ : _" ?></a><?php if ($row->unbestaetigtes_ergebnis_id != null) echo "<br /><small>" . ($row->zwischenergebnis ? "live" : "unbestätigt") . "</small>"; ?>
|
href="<?php echo SportsManagerURL('&task=admin_begegnung_spielplan_edit&veranstaltungid=' . $veranstaltung->veranstaltung_id . '&id=' . $row->begegnung_id); ?>"><?php if ($ergebnis_vorhanden) echo $row->heim_punkte . " : " . $row->gast_punkte; else echo "_ : _" ?></a><?php if ($row->unbestaetigtes_ergebnis_id != null) echo "<br /><small>" . ($row->zwischenergebnis ? "live" : "unbestätigt") . "</small>"; else if ($row->fehlende_spieler > 0) echo " (*)"; ?>
|
||||||
</td>
|
</td>
|
||||||
<td nowrap
|
<td nowrap
|
||||||
style="text-align: center"><?php if ($ergebnis_vorhanden) echo $row->heim_spielpunkte . " : " . $row->gast_spielpunkte; else echo "_ : _" ?><?php if ($row->unbestaetigtes_ergebnis_id != null) echo "<br /><small>" . ($row->zwischenergebnis ? "live" : "unbestätigt") . "</small>"; ?></td>
|
style="text-align: center"><?php if ($ergebnis_vorhanden) echo $row->heim_spielpunkte . " : " . $row->gast_spielpunkte; else echo "_ : _" ?><?php if ($row->unbestaetigtes_ergebnis_id != null) echo "<br /><small>" . ($row->zwischenergebnis ? "live" : "unbestätigt") . "</small>"; ?></td>
|
||||||
|
<td nowrap align="center">
|
||||||
|
<?php echo
|
||||||
|
formatTimediff($row->termin_spiel, $row->ergebnis_vorgeschlagen, false)
|
||||||
|
. " / "
|
||||||
|
. formatTimediff($row->ergebnis_vorgeschlagen, $row->ergebnis_akzeptiert, false);
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
<td nowrap><small><a
|
<td nowrap><small><a
|
||||||
href="<?php echo SportsManagerURL('&task=admin_begegnung_heimtausch&veranstaltungid=' . $veranstaltung->veranstaltung_id . '&id=' . $row->begegnung_id); ?>"><?php echo Text::_('COM_SPORTSMANAGER_HOME_EXCHANGE'); ?></a></small>
|
href="<?php echo SportsManagerURL('&task=admin_begegnung_heimtausch&veranstaltungid=' . $veranstaltung->veranstaltung_id . '&id=' . $row->begegnung_id); ?>"><?php echo Text::_('COM_SPORTSMANAGER_HOME_EXCHANGE'); ?></a></small>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -990,3 +990,6 @@ COM_SPORTSMANAGER_ARIA_LABEL_RANKING_EVALUATION="Ranking Wertung"
|
|||||||
COM_SPORTSMANAGER_ARIA_LABEL_LASTNAME="Nachname"
|
COM_SPORTSMANAGER_ARIA_LABEL_LASTNAME="Nachname"
|
||||||
COM_SPORTSMANAGER_ARIA_LABEL_FIRSTNAME="Vorname"
|
COM_SPORTSMANAGER_ARIA_LABEL_FIRSTNAME="Vorname"
|
||||||
COM_SPORTSMANAGER_ARIA_LABEL_CLUB="Verein"
|
COM_SPORTSMANAGER_ARIA_LABEL_CLUB="Verein"
|
||||||
|
COM_SPORTSMANAGER_NUM_REQUESTED_SHIFTS="Verschiebungen"
|
||||||
|
COM_SPORTSMANAGER_NUM_REQUESTED_SHFITS_TOOLTIP="Spielverschiebungen durch diese Mannschaft"
|
||||||
|
COM_SPORTSMANAGER_GAME_RESULT_DELAYS="Verzögerung"
|
||||||
|
|||||||
@@ -988,3 +988,6 @@ COM_SPORTSMANAGER_ARIA_LABEL_RANKING_EVALUATION="Ranking evaluation"
|
|||||||
COM_SPORTSMANAGER_ARIA_LABEL_LASTNAME="Lastname"
|
COM_SPORTSMANAGER_ARIA_LABEL_LASTNAME="Lastname"
|
||||||
COM_SPORTSMANAGER_ARIA_LABEL_FIRSTNAME="Firstname"
|
COM_SPORTSMANAGER_ARIA_LABEL_FIRSTNAME="Firstname"
|
||||||
COM_SPORTSMANAGER_ARIA_LABEL_CLUB="Club"
|
COM_SPORTSMANAGER_ARIA_LABEL_CLUB="Club"
|
||||||
|
COM_SPORTSMANAGER_NUM_REQUESTED_SHIFTS="Shifts"
|
||||||
|
COM_SPORTSMANAGER_NUM_REQUESTED_SHFITS_TOOLTIP="Game shifts caused by this team"
|
||||||
|
COM_SPORTSMANAGER_GAME_RESULT_DELAYS="Delay"
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
<files folder="admin">
|
<files folder="admin">
|
||||||
<filename>access.xml</filename>
|
<filename>access.xml</filename>
|
||||||
<filename>index.html</filename>
|
<filename>index.html</filename>
|
||||||
|
<filename>RELEASE_NOTES.md</filename>
|
||||||
<folder>services</folder>
|
<folder>services</folder>
|
||||||
<folder>src</folder>
|
<folder>src</folder>
|
||||||
<folder>tmpl</folder>
|
<folder>tmpl</folder>
|
||||||
|
|||||||
Reference in New Issue
Block a user