Skip to content

Commit

Permalink
label field added; semantic versioning 2.0 adopted
Browse files Browse the repository at this point in the history
  • Loading branch information
sebschlicht committed Feb 23, 2018
1 parent 9c6f0c4 commit eb66834
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 3 deletions.
2 changes: 2 additions & 0 deletions admin/language/de-DE/de-DE.com_nuliga.ini
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ COM_NULIGA_EDIT_TEAM="NuLiga-Mannschaft bearbeiten"
COM_NULIGA_TEAM_DETAILS="Details"
COM_NULIGA_TEAM_FIELD_TITLE_LABEL="Name"
COM_NULIGA_TEAM_FIELD_TITLE_DESC="Name der Mannschaft"
COM_NULIGA_TEAM_FIELD_LABEL_LABEL="Label"
COM_NULIGA_TEAM_FIELD_LABEL_DESC="Angezeigter Name der Mannschaft in NuLiga-Tabellen"
COM_NULIGA_TEAM_FIELD_URLPORTRAIT_LABEL="Portrait-Link"
COM_NULIGA_TEAM_FIELD_URLPORTRAIT_DESC="Link zur NuLiga-Seite mit dem Mannschafts-Portrait"
COM_NULIGA_TEAM_FIELD_LASTUPDATEPORTRAIT_LABEL="Spielplan zuletzt aktualisiert am"
Expand Down
2 changes: 2 additions & 0 deletions admin/language/en-GB/en-GB.com_nuliga.ini
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ COM_NULIGA_EDIT_TEAM="Edit NuLiga team"
COM_NULIGA_TEAM_DETAILS="Details"
COM_NULIGA_TEAM_FIELD_TITLE_LABEL="Name"
COM_NULIGA_TEAM_FIELD_TITLE_DESC="Team name"
COM_NULIGA_TEAM_FIELD_LABEL_LABEL="Label"
COM_NULIGA_TEAM_FIELD_LABEL_DESC="Team name as displayed in NuLiga tables"
COM_NULIGA_TEAM_FIELD_URLPORTRAIT_LABEL="Portrait link"
COM_NULIGA_TEAM_FIELD_URLPORTRAIT_DESC="Link to the NuLiga page with the team portrait"
COM_NULIGA_TEAM_FIELD_LASTUPDATEPORTRAIT_LABEL="Match schedule last updated at"
Expand Down
9 changes: 9 additions & 0 deletions admin/models/forms/team.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@
required="true"
default=""
/>
<field
name="label"
type="text"
label="COM_NULIGA_TEAM_FIELD_LABEL_LABEL"
description="COM_NULIGA_TEAM_FIELD_LABEL_DESC"
size="40"
class="inputbox"
default=""
/>
<field
name="urlPortrait"
type="text"
Expand Down
4 changes: 2 additions & 2 deletions admin/sql/install.mysql.utf8.sql
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ CREATE TABLE `#__nuliga_matches` (
DROP TABLE IF EXISTS `#__nuliga_teams`;

CREATE TABLE `#__nuliga_teams` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`id` INT(11) NOT NULL AUTO_INCREMENT,
`title` VARCHAR(64) NOT NULL,
`label` VARCHAR(64),
`urlPortrait` VARCHAR(255),
`last_update_portrait` DATETIME,
`league` VARCHAR(255) NOT NULL,
Expand All @@ -60,4 +61,3 @@ CREATE TABLE `#__nuliga_teams` (
ENGINE =MyISAM
AUTO_INCREMENT =0
DEFAULT CHARSET =utf8;

2 changes: 2 additions & 0 deletions admin/sql/updates/mysql/0.1.0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE `#__nuliga_teams`
ADD COLUMN `label` VARCHAR(64);
2 changes: 1 addition & 1 deletion nuliga.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</updateservers>

<!-- The version string is recorded in the components table -->
<version>0.0.42</version>
<version>0.1.0</version>

<!-- The description is optional and defaults to the name -->
<description>COM_NULIGA_DESCRIPTION</description>
Expand Down
10 changes: 10 additions & 0 deletions site/models/team.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,14 @@ public function getMatches()
return false;
}
}

/**
* Returns the currently loaded NuLiga team, if any.
*
* @return JTable|null previously loaded NuLiga team or null if none has been loaded yet
*/
public function getTeam()
{
return $this->_team;
}
}

0 comments on commit eb66834

Please sign in to comment.