Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
archery
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
3
Issues
3
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
archery
Commits
0247fdff
Commit
0247fdff
authored
Oct 09, 2014
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Dutch translations
parent
98e9c747
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
288 additions
and
94 deletions
+288
-94
.gitignore
.gitignore
+1
-2
Makefile
Makefile
+4
-3
app.php
app.php
+19
-4
locale/nl_NL/LC_MESSAGES/archery.po
locale/nl_NL/LC_MESSAGES/archery.po
+171
-0
routes/common.php
routes/common.php
+4
-4
routes/match.php
routes/match.php
+19
-19
routes/register.php
routes/register.php
+7
-7
templates/layout.latte
templates/layout.latte
+3
-3
templates/login.latte
templates/login.latte
+4
-3
templates/match/create.latte
templates/match/create.latte
+9
-8
templates/match/delete.latte
templates/match/delete.latte
+3
-3
templates/match/edit.latte
templates/match/edit.latte
+6
-6
templates/match/list.latte
templates/match/list.latte
+12
-12
templates/match/scores.latte
templates/match/scores.latte
+10
-7
templates/match/view.latte
templates/match/view.latte
+15
-12
templates/register.latte
templates/register.latte
+1
-1
No files found.
.gitignore
View file @
0247fdff
...
@@ -7,5 +7,4 @@ www/js/
...
@@ -7,5 +7,4 @@ www/js/
www/css/
www/css/
config.local.json
config.local.json
config.mk
config.mk
*.po
*.mo
locale/messages.mo
Makefile
View file @
0247fdff
...
@@ -53,8 +53,9 @@ $(CACHE_DIR):
...
@@ -53,8 +53,9 @@ $(CACHE_DIR):
# Gettext translations
# Gettext translations
SRC_FILES
:=
$(
wildcard
*
.php
)
$(
wildcard
routes/
*
.php
)
SRC_FILES
:=
$(
wildcard
*
.php
)
$(
wildcard
routes/
*
.php
)
\
#XXX: $(shell find templates -name \*.latte)
$(
shell
find templates
-name
\*
.latte
)
#$(wildcard $(CACHE_DIR)/latte/*.php)
translations
:
$(patsubst %
,
$(LOCALE_DIR)/%/LC_MESSAGES/$(GETTEXT_DOMAIN).mo
,
$(LOCALES))
translations
:
$(patsubst %
,
$(LOCALE_DIR)/%/LC_MESSAGES/$(GETTEXT_DOMAIN).mo
,
$(LOCALES))
...
@@ -64,7 +65,7 @@ translations: $(patsubst %,$(LOCALE_DIR)/%/LC_MESSAGES/$(GETTEXT_DOMAIN).mo,$(LO
...
@@ -64,7 +65,7 @@ translations: $(patsubst %,$(LOCALE_DIR)/%/LC_MESSAGES/$(GETTEXT_DOMAIN).mo,$(LO
.PRECIOUS
:
$(LOCALE_DIR)/%/LC_MESSAGES/$(GETTEXT_DOMAIN).po
.PRECIOUS
:
$(LOCALE_DIR)/%/LC_MESSAGES/$(GETTEXT_DOMAIN).po
$(LOCALE_DIR)/%/LC_MESSAGES/$(GETTEXT_DOMAIN).po
:
$(SRC_FILES)
$(LOCALE_DIR)/%/LC_MESSAGES/$(GETTEXT_DOMAIN).po
:
$(SRC_FILES)
@
if
[
!
-e
$@
]
;
then
mkdir
-p
$
(
@D
)
;
touch
$@
;
fi
@
if
[
!
-e
$@
]
;
then
mkdir
-p
$
(
@D
)
;
touch
$@
;
fi
xgettext
-
j
-n
-o
$@
$^
xgettext
-
L
php
--omit-header
--join-existing
-o
$@
$^
# Cleanup
# Cleanup
...
...
app.php
View file @
0247fdff
...
@@ -5,12 +5,22 @@ require 'util.php';
...
@@ -5,12 +5,22 @@ require 'util.php';
require
'DatabaseAuthenticator.php'
;
require
'DatabaseAuthenticator.php'
;
/*
/*
* Set locale based on browser language specification
* Set locale based on browser language specification
, and set up gettext
*/
*/
$supported_locales
=
array
(
'nl_NL'
);
// English is default, Dutch is optional
if
(
$locale
=
locale_accept_from_http
(
$_SERVER
[
'HTTP_ACCEPT_LANGUAGE'
]))
{
if
(
$locale
=
locale_accept_from_http
(
$_SERVER
[
'HTTP_ACCEPT_LANGUAGE'
]))
{
putenv
(
"LANG=
$locale
"
);
// nl -> nl_NL
setlocale
(
LC_ALL
,
$locale
);
if
(
locale_get_region
(
$locale
)
==
''
)
$locale
.=
'_'
.
strtoupper
(
$locale
);
if
(
in_array
(
$locale
,
$supported_locales
))
{
putenv
(
"LANG=
$locale
"
);
putenv
(
"LC_ALL=
$locale
"
);
putenv
(
"LC_MESSAGES=
$locale
"
);
setlocale
(
LC_ALL
,
$locale
);
}
}
}
$domain
=
'archery'
;
$domain
=
'archery'
;
...
@@ -36,8 +46,13 @@ $view = new Slim\Latte\LatteView(array(
...
@@ -36,8 +46,13 @@ $view = new Slim\Latte\LatteView(array(
'path'
=>
__DIR__
.
'/templates'
,
'path'
=>
__DIR__
.
'/templates'
,
'cache'
=>
__DIR__
.
'/.cache/latte'
,
'cache'
=>
__DIR__
.
'/.cache/latte'
,
'configure_engine'
=>
function
(
$engine
)
{
'configure_engine'
=>
function
(
$engine
)
{
$engine
->
addFilter
(
'translate'
,
function
(
$s
)
{
return
gettext
(
$s
);
});
$engine
->
onCompile
[]
=
function
(
$latte
)
{
$engine
->
onCompile
[]
=
function
(
$latte
)
{
Instante\Bootstrap3Renderer\Latte\FormMacros
::
install
(
$latte
->
getCompiler
());
$compiler
=
$latte
->
getCompiler
();
Instante\Bootstrap3Renderer\Latte\FormMacros
::
install
(
$compiler
);
};
};
}
}
));
));
...
...
locale/nl_NL/LC_MESSAGES/archery.po
0 → 100644
View file @
0247fdff
msgid ""
msgstr ""
"Project-Id-Version: 0.1\n"
"POT-Creation-Date: 2014-10-09 13:24+0200\n"
"Last-Translator: Taddeus Kroes\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: routes/common.php:15 routes/register.php:18
msgid "Username"
msgstr "Gebruikersnaam"
#: routes/common.php:17 routes/register.php:24
msgid "Password"
msgstr "Wachtwoord"
#: routes/common.php:20 templates/layout.latte:3
msgid "Login"
msgstr "Inloggen"
#: routes/match.php:34
msgid "Match does not exist"
msgstr "Score bestaat niet"
#: routes/match.php:37
msgid "You are not allowed to view this match"
msgstr "Onvoldoende permissies"
#: routes/match.php:77 routes/match.php:105
msgid "Distance"
msgstr "Afstand"
#: routes/match.php:78
msgid "Select a distance"
msgstr "Selecteer een afstand"
#: routes/match.php:79
msgid "Tag"
msgstr "Tag"
#: routes/match.php:80
msgid "Select a tag"
msgstr "Selecteer een tag"
#: routes/match.php:81
msgid "Name"
msgstr "Naam"
#: routes/match.php:82
msgid "Filter"
msgstr "Filteren"
#: routes/match.php:99
msgid "Date"
msgstr "Datum"
#: routes/match.php:102
msgid "YYYY-MM-DD HH:MM"
msgstr ""
#: routes/match.php:103
msgid "Invalid date"
msgstr "Ongeldige datum"
#: routes/match.php:106
msgid "Distance in meters"
msgstr "Afstand in meters"
#: routes/match.php:109
msgid "Discipline"
msgstr "Discipline"
#: routes/match.php:112
msgid "Arrows"
msgstr "Pijlen"
#: routes/match.php:118
msgid "Turns"
msgstr "Beurten"
#: routes/match.php:123
msgid "Notes"
msgstr "Opmerkingen"
#: routes/match.php:124
msgid "Create"
msgstr "Opslaan"
#: routes/register.php:22
msgid "Username may not contain whitespace or special characters"
msgstr "Gebruikersnaam mag geen spaties of speciale tekens bevatten"
#: routes/register.php:23
msgid "This username has already been taken"
msgstr "Deze gebruikersnaam is al in gebruik"
#: routes/register.php:26
msgid "Confirm password"
msgstr "Bevestig wachtwoord"
#: routes/register.php:29
msgid "Passwords must match"
msgstr "Wachtwoorden moeten gelijk zijn"
#: routes/register.php:30 templates/layout.latte:4 templates/login.latte:13
msgid "Register"
msgstr "Registreren"
#: routes/common.php:19
msgid "Remember me"
msgstr "Onthoud mij"
#: templates/layout.latte:2
msgid "Matches"
msgstr "Scores"
#: templates/layout.latte:3
msgid "Logout"
msgstr "Uitloggen"
#: templates/match/create.latte:4
msgid "Add new match"
msgstr "Nieuwe score"
#: templates/match/create.latte:9
msgid "Tags"
msgstr "Tags"
#: templates/match/create.latte:28
msgid "Cancel"
msgstr "Annuleren"
msgid "Add tag"
msgstr "Tag toevoegen"
msgid "Yes, I'm sure"
msgstr "Ja, ik weet het zeker"
msgid "Click to remove tag"
msgstr "Klik om tag te verwijderen"
msgid "Clear filters"
msgstr "Filters wissen"
msgid "Points"
msgstr "Punten"
msgid "Subtotal"
msgstr "Subtotaal"
msgid "Total"
msgstr "Totaal"
msgid "Average"
msgstr "Gemiddeld"
msgid "Click here to make a note"
msgstr "Klik hier om te bewerken"
msgid "Edit metadata"
msgstr "Eigenschappen"
msgid "Edit scores"
msgstr "Punten bewerken"
msgid "Delete"
msgstr "Verwijderen"
msgid "Scores"
msgstr "Punten"
routes/common.php
View file @
0247fdff
...
@@ -12,12 +12,12 @@ function login_form() {
...
@@ -12,12 +12,12 @@ function login_form() {
$form
->
setRenderer
(
new
BootstrapRenderer
);
$form
->
setRenderer
(
new
BootstrapRenderer
);
$form
->
setAction
(
'login'
);
$form
->
setAction
(
'login'
);
$form
->
addText
(
'username'
,
'Username'
)
$form
->
addText
(
'username'
,
_
(
'Username'
)
)
->
setRequired
();
->
setRequired
();
$form
->
addPassword
(
'password'
,
'Password'
)
$form
->
addPassword
(
'password'
,
_
(
'Password'
)
)
->
setRequired
();
->
setRequired
();
//$form->addCheckbox('remember',
'Remember me'
);
//$form->addCheckbox('remember',
_('Remember me')
);
$form
->
addSubmit
(
'send'
,
'Login'
);
$form
->
addSubmit
(
'send'
,
_
(
'Login'
)
);
return
$form
;
return
$form
;
}
}
...
...
routes/match.php
View file @
0247fdff
...
@@ -31,10 +31,10 @@ function find_match($id) {
...
@@ -31,10 +31,10 @@ function find_match($id) {
$match
=
$db
->
table
(
'match'
)
->
get
(
$id
);
$match
=
$db
->
table
(
'match'
)
->
get
(
$id
);
if
(
!
$match
)
if
(
!
$match
)
$app
->
halt
(
404
,
'Match does not exist'
);
$app
->
halt
(
404
,
_
(
'Match does not exist'
)
);
if
(
$match
->
user_id
!=
$user
->
getId
()
&&
!
$user
->
hasRole
(
'admin'
))
if
(
$match
->
user_id
!=
$user
->
getId
()
&&
!
$user
->
hasRole
(
'admin'
))
$app
->
halt
(
403
,
'You are not allowed to view this match'
);
$app
->
halt
(
403
,
_
(
'You are not allowed to view this match'
)
);
return
$match
;
return
$match
;
}
}
...
@@ -74,12 +74,12 @@ function filter_form($matches) {
...
@@ -74,12 +74,12 @@ function filter_form($matches) {
asort
(
$distances
);
asort
(
$distances
);
$distances
=
map_format
(
'%d meters'
,
$distances
);
$distances
=
map_format
(
'%d meters'
,
$distances
);
$form
->
addSelect
(
'distance'
,
'Distance'
,
$distances
)
$form
->
addSelect
(
'distance'
,
_
(
'Distance'
)
,
$distances
)
->
setPrompt
(
'Select a distance'
);
->
setPrompt
(
_
(
'Select a distance'
)
);
$form
->
addSelect
(
'tag'
,
'Tag'
,
$tags
)
$form
->
addSelect
(
'tag'
,
_
(
'Tag'
)
,
$tags
)
->
setPrompt
(
'Select a tag'
);
->
setPrompt
(
_
(
'Select a tag'
)
);
$form
->
addText
(
'name'
,
'Name'
);
$form
->
addText
(
'name'
,
_
(
'Name'
)
);
$form
->
addSubmit
(
'send'
,
'Filter'
);
$form
->
addSubmit
(
'send'
,
_
(
'Filter'
)
);
return
$form
;
return
$form
;
}
}
...
@@ -94,34 +94,34 @@ function create_form() {
...
@@ -94,34 +94,34 @@ function create_form() {
$form
->
setRenderer
(
new
BootstrapRenderer
);
$form
->
setRenderer
(
new
BootstrapRenderer
);
$form
->
setAction
(
'match'
);
$form
->
setAction
(
'match'
);
$form
->
addText
(
'name'
,
'Name'
)
$form
->
addText
(
'name'
,
_
(
'Name'
)
)
->
setRequired
();
->
setRequired
();
$form
->
addText
(
'created_at'
,
'Date'
)
$form
->
addText
(
'created_at'
,
_
(
'Date'
)
)
->
setType
(
'datetime-local'
)
->
setType
(
'datetime-local'
)
->
setDefaultValue
(
strftime
(
'%Y-%m-%dT%H:%M'
))
->
setDefaultValue
(
strftime
(
'%Y-%m-%dT%H:%M'
))
->
setAttribute
(
'placeholder'
,
'YYYY-MM-DD HH:MM'
)
->
setAttribute
(
'placeholder'
,
_
(
'YYYY-MM-DD HH:MM'
)
)
->
addRule
(
Form
::
PATTERN
,
'Invalid date'
,
'\d{4}-\d{1,2}-\d{1,2}[T ]\d{1,2}:\d{1,2}'
)
->
addRule
(
Form
::
PATTERN
,
_
(
'Invalid date'
)
,
'\d{4}-\d{1,2}-\d{1,2}[T ]\d{1,2}:\d{1,2}'
)
->
setRequired
();
->
setRequired
();
$form
->
addText
(
'distance'
,
'Distance'
)
$form
->
addText
(
'distance'
,
_
(
'Distance'
)
)
->
setAttribute
(
'placeholder'
,
'distance in meters'
)
->
setAttribute
(
'placeholder'
,
_
(
'Distance in meters'
)
)
->
setType
(
'number'
)
->
setType
(
'number'
)
->
setRequired
();
->
setRequired
();
$form
->
addRadioList
(
'discipline'
,
'Discipline'
,
$disciplines
)
$form
->
addRadioList
(
'discipline'
,
_
(
'Discipline'
)
,
$disciplines
)
->
setAttribute
(
'data-inline'
,
true
)
->
setAttribute
(
'data-inline'
,
true
)
->
setRequired
();
->
setRequired
();
$form
->
addText
(
'arrows'
,
'Arrows'
)
$form
->
addText
(
'arrows'
,
_
(
'Arrows'
)
)
->
setType
(
'range'
)
->
setType
(
'range'
)
->
setAttribute
(
'min'
,
1
)
->
setAttribute
(
'min'
,
1
)
->
setAttribute
(
'max'
,
10
)
->
setAttribute
(
'max'
,
10
)
->
setDefaultValue
(
3
)
->
setDefaultValue
(
3
)
->
setRequired
();
->
setRequired
();
$form
->
addText
(
'turns'
,
'Turns'
)
$form
->
addText
(
'turns'
,
_
(
'Turns'
)
)
->
setType
(
'number'
)
->
setType
(
'number'
)
->
setAttribute
(
'min'
,
1
)
->
setAttribute
(
'min'
,
1
)
->
setDefaultValue
(
10
)
->
setDefaultValue
(
10
)
->
setRequired
();
->
setRequired
();
$form
->
addTextarea
(
'notes'
,
'Notes'
);
$form
->
addTextarea
(
'notes'
,
_
(
'Notes'
)
);
$form
->
addSubmit
(
'send'
,
'Create'
);
$form
->
addSubmit
(
'send'
,
_
(
'Create'
)
);
// Set attributes from last match as default, since the shooter is likely
// Set attributes from last match as default, since the shooter is likely
// to repeat the previous training in many cases
// to repeat the previous training in many cases
...
...
routes/register.php
View file @
0247fdff
...
@@ -15,19 +15,19 @@ function registration_form() {
...
@@ -15,19 +15,19 @@ function registration_form() {
$form
->
setRenderer
(
new
BootstrapRenderer
);
$form
->
setRenderer
(
new
BootstrapRenderer
);
$form
->
setAction
(
'register'
);
$form
->
setAction
(
'register'
);
$form
->
addText
(
'username'
,
'Username'
)
$form
->
addText
(
'username'
,
_
(
'Username'
)
)
->
setRequired
()
->
setRequired
()
->
addRule
(
Form
::
MIN_LENGTH
,
null
,
3
)
->
addRule
(
Form
::
MIN_LENGTH
,
null
,
3
)
->
addRule
(
Form
::
MAX_LENGTH
,
null
,
100
)
->
addRule
(
Form
::
MAX_LENGTH
,
null
,
100
)
->
addRule
(
Form
::
PATTERN
,
'Username may not contain whitespace or special characters'
,
'([a-zA-Z0-9-_])+'
)
->
addRule
(
Form
::
PATTERN
,
_
(
'Username may not contain whitespace or special characters'
)
,
'([a-zA-Z0-9-_])+'
)
->
addRule
(
'validate_unique_user'
,
'This username has already been taken'
);
->
addRule
(
'validate_unique_user'
,
_
(
'This username has already been taken'
)
);
$form
->
addPassword
(
'password'
,
'Password'
)
$form
->
addPassword
(
'password'
,
_
(
'Password'
)
)
->
setRequired
();
->
setRequired
();
$form
->
addPassword
(
'password_repeat'
,
'Confirm password'
)
$form
->
addPassword
(
'password_repeat'
,
_
(
'Confirm password'
)
)
->
setRequired
()
->
setRequired
()
->
addConditionOn
(
$form
[
'password'
],
Form
::
FILLED
)
->
addConditionOn
(
$form
[
'password'
],
Form
::
FILLED
)
->
addRule
(
Form
::
EQUAL
,
'Passwords must match'
,
$form
[
'password'
]);
->
addRule
(
Form
::
EQUAL
,
_
(
'Passwords must match'
)
,
$form
[
'password'
]);
$form
->
addSubmit
(
'send'
,
'Register'
);
$form
->
addSubmit
(
'send'
,
_
(
'Register'
)
);
return
$form
;
return
$form
;
}
}
...
...
templates/layout.latte
View file @
0247fdff
{var $menu = [
{var $menu = [
$user->isLoggedIn() ? ['matches',
'Matches'
],
$user->isLoggedIn() ? ['matches',
_('Matches')
],
$user->isLoggedIn() ? ['logout',
'Logout'] : ['login', 'Login'
],
$user->isLoggedIn() ? ['logout',
_('Logout')] : ['login', _('Login')
],
!$user->isLoggedIn() ? ['register',
'Register'
],
!$user->isLoggedIn() ? ['register',
_('Register')
],
]}
]}
<!doctype html>
<!doctype html>
<html
lang=
"en"
>
<html
lang=
"en"
>
...
...
templates/login.latte
View file @
0247fdff
...
@@ -2,14 +2,15 @@
...
@@ -2,14 +2,15 @@
{block content}
{block content}
<div class="row">
<div class="row">
<div class="col-
sm-8 col-md-6
">
<div class="col-
md-9
">
{form $form}
{form $form}
{form errors}
{form errors}
{form controls}
{form controls}
<div class="form-group">
<div class="form-group">
<div class="form-actions col-sm-offset-2 col-sm-10">
<div class="form-actions col-sm-offset-2 col-sm-10">
<button type="submit" name="send" class="btn btn-primary">Login</button>
<button type="submit" name="send" class="btn
<a href="register" class="btn">Register</a>
btn-primary">{_'Login'}</button>
<a href="register" class="btn">{_'Register'}</a>
</div>
</div>
</div>
</div>
{/form}
{/form}
...
...
templates/match/create.latte
View file @
0247fdff
{extends '../layout.latte'}
{extends '../layout.latte'}
{block content}
{block content}
<h2 class="page-header">
Add new match
</h2>
<h2 class="page-header">
{_'Add new match'}
</h2>
{form $form}
{form $form}
{form errors}
{form errors}
{form controls}
{form controls}
<div class="form-group">
<div class="form-group">
<label class="control-label col-sm-2" for="frm-tags">
Tags
</label>
<label class="control-label col-sm-2" for="frm-tags">
{_'Tags'}
</label>
<div class="form-actions col-sm-10 tags-control">
<div class="form-actions col-sm-10 tags-control">
<div class="input-group">
<div class="input-group">
<input type="text" id="frm-tags" class="form-control" placeholder="Add tag">
<input type="text" id="frm-tags" class="form-control"
placeholder="{_'Add tag'}">
<span class="input-group-btn">
<span class="input-group-btn">
<a class="btn btn-default" title="
Add tag
">
<a class="btn btn-default" title="
{_'Add tag'}
">
<span class="glyphicon glyphicon-plus"></span>
<span class="glyphicon glyphicon-plus"></span>
</a>
</a>
</span>
</span>
...
@@ -22,13 +23,13 @@
...
@@ -22,13 +23,13 @@
<div class="form-group">
<div class="form-group">
<div class="form-actions col-sm-offset-2 col-sm-10">
<div class="form-actions col-sm-offset-2 col-sm-10">
<div class="btn-group actions">
<div class="btn-group actions">
<a href="matches" class="btn btn-default" title="
Cancel"
>
<a href="matches" class="btn btn-default" title="
{_'Cancel'}
>
<span class="glyphicon glyphicon-remove"></span>
<span class="glyphicon glyphicon-remove"></span>
<span class="text">
Cancel
</span>
<span class="text">
{_'Cancel'}
</span>
</a>
</a>
<button type="submit" name="send" class="btn btn-primary" title="
Save"
>
<button type="submit" name="send" class="btn btn-primary" title="
{_'Save'}
>
<span class="glyphicon glyphicon-save"></span>
<span class="glyphicon glyphicon-save"></span>
<span class="text">
Save
</span>
<span class="text">
{_'Save'}
</span>
</button>
</button>
</div>
</div>
</div>
</div>
...
...
templates/match/delete.latte
View file @
0247fdff
...
@@ -11,13 +11,13 @@
...
@@ -11,13 +11,13 @@
<form action="match/{$match->id}" method="post">
<form action="match/{$match->id}" method="post">
<div class="btn-group actions">
<div class="btn-group actions">
<a href="match/{$match->id}" class="btn btn-default" title="
cancel
">
<a href="match/{$match->id}" class="btn btn-default" title="
{_'Cancel'}
">
<span class="glyphicon glyphicon-remove"></span>
<span class="glyphicon glyphicon-remove"></span>
<span class="text">
Cancel
</span>
<span class="text">
{_'Cancel'}
</span>
</a>
</a>
<button type="submit" class="btn btn-primary">
<button type="submit" class="btn btn-primary">
<span class="glyphicon glyphicon-ok"></span>
<span class="glyphicon glyphicon-ok"></span>
<span class="text">
Yes, I'm sure
</span>
<span class="text">
{_"Yes, I'm sure"}
</span>
</button>
</button>
</div>
</div>
<input type="hidden" name="_METHOD" value="DELETE"/>
<input type="hidden" name="_METHOD" value="DELETE"/>
...
...
templates/match/edit.latte
View file @
0247fdff
...
@@ -8,19 +8,19 @@
...
@@ -8,19 +8,19 @@
{form errors}
{form errors}
{form controls}
{form controls}
<div class="form-group">
<div class="form-group">
<label class="control-label col-sm-2" for="frm-tags">
Tags
</label>
<label class="control-label col-sm-2" for="frm-tags">
{_'Tags'}
</label>
<div class="form-actions col-sm-10 tags-control">
<div class="form-actions col-sm-10 tags-control">
<div class="input-group">
<div class="input-group">
<input type="text" id="frm-tags" class="form-control" placeholder="
Add tag
">
<input type="text" id="frm-tags" class="form-control" placeholder="
{_'Add tag'}
">
<span class="input-group-btn">
<span class="input-group-btn">
<a class="btn btn-default" title="
Add tag
">
<a class="btn btn-default" title="
{_'Add tag'}
">
<span class="glyphicon glyphicon-plus"></span>
<span class="glyphicon glyphicon-plus"></span>
</a>
</a>
</span>
</span>
</div>
</div>
<div class="tags">
<div class="tags">
<a n:foreach="$tags as $tag" href="javascript:void(0)"
<a n:foreach="$tags as $tag" href="javascript:void(0)"
class="tag" title="Click to remove tag
">
class="tag" title="{_'Click to remove tag'}
">
<span class="label label-default">
<span class="label label-default">
<span class="text">{$tag->name}</span>
<span class="text">{$tag->name}</span>
<span class="glyphicon glyphicon-remove"></span>
<span class="glyphicon glyphicon-remove"></span>
...
@@ -33,9 +33,9 @@
...
@@ -33,9 +33,9 @@
<div class="form-group">
<div class="form-group">
<div class="form-actions col-sm-offset-2 col-sm-10">
<div class="form-actions col-sm-offset-2 col-sm-10">
<div class="btn-group actions">
<div class="btn-group actions">
<button type="submit" name="send" class="btn btn-primary" title="
Save
">
<button type="submit" name="send" class="btn btn-primary" title="
{_'Save'}
">
<span class="glyphicon glyphicon-ok"></span>
<span class="glyphicon glyphicon-ok"></span>
<span class="text">
Save
</span>
<span class="text">
{_'Save'}
</span>
</button>
</button>
</div>
</div>
</div>
</div>
...
...
templates/match/list.latte
View file @
0247fdff
...
@@ -4,10 +4,10 @@
...
@@ -4,10 +4,10 @@
<h2 class="page-header">
<h2 class="page-header">
Matches
Matches
<div class="btn-group">
<div class="btn-group">
<a href="match" class="btn btn-sm btn-default" title="
Add new match
">
<a href="match" class="btn btn-sm btn-default" title="
{_'Add new match'}
">
<span class="glyphicon glyphicon-plus"></span>
<span class="glyphicon glyphicon-plus"></span>
</a>
</a>
<a data-toggle="collapse" href="#filter" title="
Filter
"
<a data-toggle="collapse" href="#filter" title="
{_'Filter'}
"
class="btn btn-sm btn-default">
class="btn btn-sm btn-default">
<span class="glyphicon glyphicon-filter"></span>
<span class="glyphicon glyphicon-filter"></span>
</a>
</a>
...
@@ -20,8 +20,8 @@
...
@@ -20,8 +20,8 @@
{form controls}
{form controls}
<div class="form-group">
<div class="form-group">
<div class="form-actions col-sm-offset-2 col-sm-10">
<div class="form-actions col-sm-offset-2 col-sm-10">
<button type="submit" name="send" class="btn btn-primary">
Filter
</button>
<button type="submit" name="send" class="btn btn-primary">
{_'Filter'}
</button>
<a href="matches" class="btn btn-default">
Clear filters
</a>
<a href="matches" class="btn btn-default">
{_'Clear filters'}
</a>
</div>
</div>
</div>
</div>
{/form}
{/form}
...
@@ -31,12 +31,12 @@
...
@@ -31,12 +31,12 @@
<table id="results" class="table table-hover matches">
<table id="results" class="table table-hover matches">
<thead>
<thead>
<tr>
<tr>
<th>
Name
</th>
<th>
{_'Name'}
</th>
<th>
Date
</th>
<th>
{_'Date'}
</th>
<th class="hidden-xs-pt">
Distance
</th>
<th class="hidden-xs-pt">
{_'Distance'}
</th>
<th class="hidden-xs-pt">
Discipline
</th>
<th class="hidden-xs-pt">
{_'Discipline'}
</th>
<th class="hidden-xs-pt">
Arrows
</th>
<th class="hidden-xs-pt">
{_'Arrows'}
</th>
<th>
Score
</th>
<th>
{_'Score'}
</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
...
@@ -54,9 +54,9 @@
...
@@ -54,9 +54,9 @@
<tr n:if="!$matches->count()">
<tr n:if="!$matches->count()">
<td colspan="5">
<td colspan="5">
{if $filter_form->isSubmitted()}
{if $filter_form->isSubmitted()}
No search results.
{_'No search results.'}
{else}
{else}
You have not saved any matches yet.
{_'You have not saved any matches yet.'}
{/if}
{/if}
</td>
</td>
</tr>
</tr>
...
...
templates/match/scores.latte
View file @
0247fdff
...
@@ -22,8 +22,8 @@
...
@@ -22,8 +22,8 @@
<thead>
<thead>
<tr>
<tr>
<th class="separator"></th>
<th class="separator"></th>
<th class="separator" colspan="{$match->arrows}">
Points
</th>
<th class="separator" colspan="{$match->arrows}">
{_'Points'}
</th>
<th colspan="2">
Subtotal
</th>
<th colspan="2">
{_'Subtotal'}
</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
...
@@ -40,7 +40,10 @@
...
@@ -40,7 +40,10 @@
</tbody>
</tbody>
<tbody>
<tbody>
<tr>
<tr>
<th colspan="{$match->arrows + 2}">Total:<br>Average:</th>
<th colspan="{$match->arrows + 2}">
{_'Total'}:<br>
{_'Average'}:
</th>
<td>
<td>
<span class="match-total">{$total}</span><br>
<span class="match-total">{$total}</span><br>
<span class="match-avg" title="{$total / ($match->turns * $match->arrows)|number:4}">
<span class="match-avg" title="{$total / ($match->turns * $match->arrows)|number:4}">
...
@@ -53,18 +56,18 @@
...
@@ -53,18 +56,18 @@
<div class="panel panel-default">
<div class="panel panel-default">
<div class="panel-heading">
<div class="panel-heading">
<h3 class="panel-title">
Notes
</h3>
<h3 class="panel-title">
{_'Notes'}
</h3>
</div>
</div>
<div class="panel-body">
<div class="panel-body">
<textarea name="notes" wrap="hard" placeholder="
Click here to make a note
"
<textarea name="notes" wrap="hard" placeholder="
{_'Click here to make a note'}
"
>{$match->notes}</textarea>
>{$match->notes}</textarea>
</div>
</div>
</div>
</div>
<div class="actions">
<div class="actions">
<button type="submit" class="btn btn-primary" title="
Save
">
<button type="submit" class="btn btn-primary" title="
{_'Save'}
">
<span class="glyphicon glyphicon-ok"></span>
<span class="glyphicon glyphicon-ok"></span>
<span class="text">
Save
</span>
<span class="text">
{_'Save'}
</span>
</button>
</button>
</div>
</div>
...
...
templates/match/view.latte
View file @
0247fdff
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
{$match->created_at|date:'%A %e %B %Y %H:%m'}
{$match->created_at|date:'%A %e %B %Y %H:%m'}
</p>
</p>
<p n:if="$tags->count()" class="tags">
<p n:if="$tags->count()" class="tags">
<strong>
Tags
:</strong>
<strong>
{_'Tags'}
:</strong>
<a n:foreach="$tags as $tag" href="matches?tag={$tag->name}" class="tag">
<a n:foreach="$tags as $tag" href="matches?tag={$tag->name}" class="tag">
<span class="label label-primary">{$tag->name}</span>
<span class="label label-primary">{$tag->name}</span>
</a>
</a>
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
{*
{*
<div class="panel panel-default">
<div class="panel panel-default">
<div class="panel-heading">
<div class="panel-heading">
<h3 class="panel-title">
Scores
</h3>
<h3 class="panel-title">
{_'Scores'}
</h3>
</div>
</div>
*}
*}
...
@@ -34,8 +34,8 @@
...
@@ -34,8 +34,8 @@
<thead>
<thead>
<tr>
<tr>
<th class="separator"></th>
<th class="separator"></th>
<th class="separator" colspan="{$match->arrows}">
Points
</th>
<th class="separator" colspan="{$match->arrows}">
{_'Points'}
</th>
<th colspan="2">
Subtotal
</th>
<th colspan="2">
{_'Subtotal'}
</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
...
@@ -51,7 +51,10 @@
...
@@ -51,7 +51,10 @@
</tbody>
</tbody>
<tbody>
<tbody>
<tr>
<tr>
<th colspan="{$match->arrows + 2}">Total:<br>Average:</th>
<th colspan="{$match->arrows + 2}">
{_'Total'}:<br>
{_'Average'}:
</th>
<td>
<td>
{$total}<br>
{$total}<br>
<abbr title="{$total / ($match->turns * $match->arrows)|number:4}">
<abbr title="{$total / ($match->turns * $match->arrows)|number:4}">
...
@@ -66,23 +69,23 @@
...
@@ -66,23 +69,23 @@
<div n:if="$match->notes" class="panel panel-default">
<div n:if="$match->notes" class="panel panel-default">
<div class="panel-heading">
<div class="panel-heading">
<h3 class="panel-title">Notes</h3>
<h3 class="panel-title">
{_'
Notes</h3>
</div>
</div>
<div class="panel-body">{htmlentities($match->notes, ENT_QUOTES)|noescape|nl2br}</div>
<div class="panel-body">{htmlentities($match->notes, ENT_QUOTES)|noescape|nl2br}</div>
</div>
</div>
<div class="btn-group actions">
<div class="btn-group actions">
<a href="match/{$match->id}/edit" class="btn btn-default" title="
Edit metadata
">
<a href="match/{$match->id}/edit" class="btn btn-default" title="
{_'Edit metadata'}
">
<span class="glyphicon glyphicon-cog"></span>
<span class="glyphicon glyphicon-cog"></span>
<span class="text">
Edit metadata
</span>
<span class="text">
{_'Edit metadata'}
</span>
</a>
</a>
<a href="match/{$match->id}/scores" class="btn btn-default" title="
Edit scores
">
<a href="match/{$match->id}/scores" class="btn btn-default" title="
{_'Edit scores'}
">
<span class="glyphicon glyphicon-pencil"></span>
<span class="glyphicon glyphicon-pencil"></span>
<span class="text">
Edit scores
</span>
<span class="text">
{_'Edit scores'}
</span>
</a>
</a>
<a href="match/{$match->id}/delete" class="btn btn-danger" title="
Delete
">
<a href="match/{$match->id}/delete" class="btn btn-danger" title="
{_'Delete'}
">
<span class="glyphicon glyphicon-trash"></span>
<span class="glyphicon glyphicon-trash"></span>
<span class="text">
Delete
</span>
<span class="text">
{_'Delete'}
</span>
</a>
</a>
</div>
</div>
...
...
templates/register.latte
View file @
0247fdff
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
{block content}
{block content}
<div class="row">
<div class="row">
<div class="col-
sm-8 col-md-6
">
<div class="col-
md-9
">
{$form}
{$form}
</div>
</div>
</div>
</div>
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