Skip to content

Commit

Permalink
Use Angle Bracket Invocation Syntax
Browse files Browse the repository at this point in the history
... for most things
  • Loading branch information
Turbo87 committed Oct 4, 2019
1 parent 9b20d0a commit ea81c53
Show file tree
Hide file tree
Showing 125 changed files with 875 additions and 882 deletions.
4 changes: 2 additions & 2 deletions ember/app/templates/about/imprint.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{#base-page}}
<BasePage>
<div class="page-header">
<h1>
{{t "imprint"}}
Expand All @@ -10,4 +10,4 @@
{{markdown model.content}}
</div>
</div>
{{/base-page}}
</BasePage>
4 changes: 2 additions & 2 deletions ember/app/templates/about/license.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{#base-page}}
<BasePage>
<div class="page-header">
<h1>
{{t "license"}}
Expand All @@ -10,4 +10,4 @@
<pre>{{model.content}}</pre>
</div>
</div>
{{/base-page}}
</BasePage>
4 changes: 2 additions & 2 deletions ember/app/templates/about/team.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{#base-page}}
<BasePage>
<div class="page-header">
<h1>
{{t "the-skylines-team"}}
Expand All @@ -10,4 +10,4 @@
{{markdown text}}
</div>
</div>
{{/base-page}}
</BasePage>
4 changes: 2 additions & 2 deletions ember/app/templates/application.hbs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{{head-layout}}
<HeadLayout />
{{title "SkyLines"}}

{{#if onFreestyleRoute}}
{{outlet}}
{{else}}
{{nav-bar onSearch=(action "search")}}
<NavBar @onSearch={{action "search"}} />
{{outlet}}
{{/if}}
6 changes: 3 additions & 3 deletions ember/app/templates/club/edit.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{#form-page title=(t "edit-club")}}
{{club-edit-form club=club}}
{{/form-page}}
<FormPage @title={{t "edit-club"}}>
<ClubEditForm @club={{club}} />
</FormPage>
14 changes: 7 additions & 7 deletions ember/app/templates/club/index.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{#base-page}}
<BasePage>
<div class="page-header">
<h1>{{club.name}}</h1>
</div>
Expand All @@ -24,7 +24,7 @@
<th>{{t "created"}}</th>
<td>
{{#if club.owner}}
{{format-relative club.timeCreated}} by {{#link-to "user" club.owner.id}}{{club.owner.name}}{{/link-to}}
{{format-relative club.timeCreated}} by <LinkTo @route="user" @model={{club.owner.id}}>{{club.owner.name}}</LinkTo>
{{else}}
{{format-relative club.timeCreated}}
{{/if}}
Expand All @@ -34,15 +34,15 @@

<p>
{{#if club.isWritable}}
{{#link-to "club.edit" club.id class="btn btn-default"}}{{t "edit"}}{{/link-to}}
<LinkTo @route="club.edit" @model={{club.id}} class="btn btn-default">{{t "edit"}}</LinkTo>
{{/if}}

{{#link-to "flights.club" club.id class="btn btn-default"}}{{fa-icon "plane"}} {{t "flights"}}{{/link-to}}
{{#link-to "statistics.club" club.id class="btn btn-default"}}{{fa-icon "bar-chart"}} {{t "statistics"}}{{/link-to}}
{{#link-to "club.pilots" club.id class="btn btn-default"}}{{fa-icon "group"}} {{t "members"}}{{/link-to}}
<LinkTo @route="flights.club" @model={{club.id}} class="btn btn-default">{{fa-icon "plane"}} {{t "flights"}}</LinkTo>
<LinkTo @route="statistics.club" @model={{club.id}} class="btn btn-default">{{fa-icon "bar-chart"}} {{t "statistics"}}</LinkTo>
<LinkTo @route="club.pilots" @model={{club.id}} class="btn btn-default">{{fa-icon "group"}} {{t "members"}}</LinkTo>
</p>
</div>
</div>
</div>
</div>
{{/base-page}}
</BasePage>
10 changes: 5 additions & 5 deletions ember/app/templates/club/pilots.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{#base-page}}
<BasePage>
<div class="page-header">
<h1>{{t "members-of-CLUB" htmlSafe=true club=club.name clubURL=(href-to "club" club.id)}}</h1>
</div>
Expand All @@ -15,11 +15,11 @@
{{#each model.users as |user|}}
<tr>
<td class="column-buttons">
{{#link-to "user" user.id}}{{user.name}}{{/link-to}}
<LinkTo @route="user" @model={{user.id}}>{{user.name}}</LinkTo>

<div class="pull-right">
{{#link-to "flights.pilot" user.id class="btn btn-default btn-sm"}}{{fa-icon "plane"}} {{t "flights"}}{{/link-to}}
{{#link-to "statistics.pilot" user.id class="btn btn-default btn-sm"}}{{fa-icon "bar-chart"}} {{t "statistics"}}{{/link-to}}
<LinkTo @route="flights.pilot" @model={{user.id}} class="btn btn-default btn-sm">{{fa-icon "plane"}} {{t "flights"}}</LinkTo>
<LinkTo @route="statistics.pilot" @model={{user.id}} class="btn btn-default btn-sm">{{fa-icon "bar-chart"}} {{t "statistics"}}</LinkTo>
</div>
</td>
</tr>
Expand All @@ -28,4 +28,4 @@
</table>
</div>
</div>
{{/base-page}}
</BasePage>
12 changes: 6 additions & 6 deletions ember/app/templates/clubs.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{#base-page}}
<BasePage>
<div class="page-header">
<h1>{{t "clubs"}}</h1>
</div>
Expand All @@ -15,12 +15,12 @@
{{#each model.clubs as |club|}}
<tr>
<td class="column-buttons">
{{link-to club.name "club" club.id }}
<LinkTo @route="club" @model={{club.id}}>{{club.name}}</LinkTo>

<div class="pull-right">
{{#link-to "flights.club" club.id class="btn btn-default btn-sm"}}{{fa-icon "plane"}} {{t "flights"}}{{/link-to}}
{{#link-to "statistics.club" club.id class="btn btn-default btn-sm hidden-xs-inline"}}{{fa-icon "bar-chart"}} {{t "statistics"}}{{/link-to}}
{{#link-to "club.pilots" club.id class="btn btn-default btn-sm hidden-xs-inline"}}{{fa-icon "group"}} {{t "members"}}{{/link-to}}
<LinkTo @route="flights.club" @model={{club.id}} class="btn btn-default btn-sm">{{fa-icon "plane"}} {{t "flights"}}</LinkTo>
<LinkTo @route="statistics.club" @model={{club.id}} class="btn btn-default btn-sm hidden-xs-inline">{{fa-icon "bar-chart"}} {{t "statistics"}}</LinkTo>
<LinkTo @route="club.pilots" @model={{club.id}} class="btn btn-default btn-sm hidden-xs-inline">{{fa-icon "group"}} {{t "members"}}</LinkTo>
</div>
</td>
</tr>
Expand All @@ -29,4 +29,4 @@
</table>
</div>
</div>
{{/base-page}}
</BasePage>
24 changes: 12 additions & 12 deletions ember/app/templates/components/aircraft-model-select.hbs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{{#power-select
options=modelsWithNull
selected=model
searchField="name"
onchange=(action "onChange")
as |model|}}
{{#if (eq model.id null)}}
[{{t 'unspecified'}}]
{{else}}
{{model.name}}
{{/if}}
{{/power-select}}
<PowerSelect
@options={{modelsWithNull}}
@selected={{model}}
@searchField="name"
@onchange={{action "onChange"}}
as |model|>
{{#if (eq model.id null)}}
[{{t 'unspecified'}}]
{{else}}
{{model.name}}
{{/if}}
</PowerSelect>
2 changes: 1 addition & 1 deletion ember/app/templates/components/base-map.hbs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{layer-switcher map=map}}
<LayerSwitcher @map={{map}} />
2 changes: 1 addition & 1 deletion ember/app/templates/components/cesium-plane-models.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{#each fixes as |fix|}}
{{#if fix.coordinate}}
{{cesium-plane-model scene=scene coordinate=fix.coordinate heading=fix.heading}}
<CesiumPlaneModel @scene={{scene}} @coordinate={{fix.coordinate}} @heading={{fix.heading}} />
{{/if}}
{{/each}}
28 changes: 14 additions & 14 deletions ember/app/templates/components/change-aircraft-form.hbs
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
<form {{action "submit" on="submit"}}>
{{#if error}}
{{#bs-alert type="danger" dismissible=false}}{{error}}{{/bs-alert}}
<BsAlert @type="danger" @dismissible={{false}}>{{error}}</BsAlert>
{{/if}}

<div class="form-group">
<label class="control-label">{{t "aircraft-type"}}</label>
{{aircraft-model-select models=models modelId=modelId onChange=(action (mut modelId))}}
<AircraftModelSelect @models={{models}} @modelId={{modelId}} @onChange={{action (mut modelId)}} />
</div>

{{validated-input
value=registration
validation=validations.attrs.registration
label=(t "registration")
disabled=saveTask.isRunning
didValidate=didValidate}}
<ValidatedInput
@value={{registration}}
@validation={{validations.attrs.registration}}
@label={{t "registration"}}
@disabled={{saveTask.isRunning}}
@didValidate={{didValidate}} />

{{validated-input
value=competitionId
validation=validations.attrs.competitionId
label=(t "competition-id")
disabled=saveTask.isRunning
didValidate=didValidate}}
<ValidatedInput
@value={{competitionId}}
@validation={{validations.attrs.competitionId}}
@label={{t "competition-id"}}
@disabled={{saveTask.isRunning}}
@didValidate={{didValidate}} />

<button class="btn btn-primary btn-block" type="submit" disabled={{or saveTask.isRunning (not validations.isValid)}}>
{{t (if saveTask.isRunning "changing" "change")}}
Expand Down
36 changes: 17 additions & 19 deletions ember/app/templates/components/change-pilot-form.hbs
Original file line number Diff line number Diff line change
@@ -1,32 +1,30 @@
<form {{action "submit" on="submit"}}>
{{#if error}}
{{#bs-alert type="danger" dismissible=false}}{{error}}{{/bs-alert}}
<BsAlert @type="danger" @dismissible={{false}}>{{error}}</BsAlert>
{{/if}}

{{#validated-block label=(t "pilot") validation=validations.attrs.pilotId didValidate=didValidate}}
{{pilot-select clubMembers=clubMembers pilotId=pilotId onChange=(action (mut pilotId))}}
{{/validated-block}}
<ValidatedBlock @label={{t "pilot"}} @validation={{validations.attrs.pilotId}} @didValidate={{didValidate}}>
<PilotSelect @clubMembers={{clubMembers}} @pilotId={{pilotId}} @onChange={{action (mut pilotId)}} />
</ValidatedBlock>

{{#if showPilotNameInput}}
{{validated-input
value=pilotName
validation=validations.attrs.pilotName
label=(t "pilot")
disabled=saveTask.isRunning
didValidate=didValidate}}
<ValidatedInput
@value={{pilotName}}
@validation={{validations.attrs.pilotName}}
@label={{t "pilot"}} @disabled={{saveTask.isRunning}}
@didValidate={{didValidate}} />
{{/if}}

{{#validated-block label=(t "copilot") validation=validations.attrs.copilotId didValidate=didValidate}}
{{pilot-select clubMembers=clubMembers pilotId=copilotId onChange=(action (mut copilotId))}}
{{/validated-block}}
<ValidatedBlock @label={{t "copilot"}} @validation={{validations.attrs.copilotId}} @didValidate={{didValidate}}>
<PilotSelect @clubMembers={{clubMembers}} @pilotId={{copilotId}} @onChange={{action (mut copilotId)}} />
</ValidatedBlock>

{{#if showCopilotNameInput}}
{{validated-input
value=copilotName
validation=validations.attrs.copilotName
label=(t "copilot")
disabled=saveTask.isRunning
didValidate=didValidate}}
<ValidatedInput
@value={{copilotName}}
@validation={{validations.attrs.copilotName}}
@label={{t "copilot"}} @disabled={{saveTask.isRunning}}
@didValidate={{didValidate}} />
{{/if}}

<button class="btn btn-primary btn-block" type="submit" disabled={{or saveTask.isRunning (not validations.isValid)}}>
Expand Down
8 changes: 4 additions & 4 deletions ember/app/templates/components/circling-performance-table.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<th class='numeric'>{{t "count"}}<br/>{{t "avg-vario-abbr"}}</th>
<th class='numeric'>{{t "duration"}}<br/>&Delta;H</th>
</tr>
{{#if total}}{{circling-performance-row perf=total}}{{/if}}
{{#if left}}{{circling-performance-row perf=left}}{{/if}}
{{#if right}}{{circling-performance-row perf=right}}{{/if}}
{{#if mixed}}{{circling-performance-row perf=mixed}}{{/if}}
{{#if total}}<CirclingPerformanceRow @perf={{total}} />{{/if}}
{{#if left}}<CirclingPerformanceRow @perf={{left}} />{{/if}}
{{#if right}}<CirclingPerformanceRow @perf={{right}} />{{/if}}
{{#if mixed}}<CirclingPerformanceRow @perf={{mixed}} />{{/if}}
</tbody>
</table>
24 changes: 11 additions & 13 deletions ember/app/templates/components/club-edit-form.hbs
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
<form {{action "submit" on="submit"}}>
{{#if error}}
{{#bs-alert type="danger" dismissible=false}}{{error}}{{/bs-alert}}
<BsAlert @type="danger" @dismissible={{false}}>{{error}}</BsAlert>
{{/if}}

{{validated-input
value=name
validation=validations.attrs.name
label=(t "name")
disabled=saveTask.isRunning
didValidate=didValidate}}
<ValidatedInput
@value={{name}}
@validation={{validations.attrs.name}}
@label={{t "name"}} @disabled={{saveTask.isRunning}}
@didValidate={{didValidate}} />

{{validated-input
value=website
validation=validations.attrs.website
label=(t "website")
disabled=saveTask.isRunning
didValidate=didValidate}}
<ValidatedInput
@value={{website}}
@validation={{validations.attrs.website}}
@label={{t "website"}} @disabled={{saveTask.isRunning}}
@didValidate={{didValidate}} />

<button class="btn btn-primary btn-block" type="submit" disabled={{or saveTask.isRunning (not validations.isValid)}}>
{{t (if saveTask.isRunning "editing" "edit")}}
Expand Down
4 changes: 2 additions & 2 deletions ember/app/templates/components/comments-list.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<td>
{{#if comment.user}}
<span style="float:left">
{{link-to comment.user.name "user" comment.user.id}}:&nbsp;
<LinkTo @route="user" @model={{comment.user.id}}>{{comment.user.name}}</LinkTo>:&nbsp;
</span>
{{/if}}

Expand All @@ -22,7 +22,7 @@
<tr>
<td>
<form {{action (perform addCommentTask) on="submit"}}>
{{textarea value=addCommentText class="form-control" disabled=addCommentTask.isRunning}}<br/>
<Textarea @value={{addCommentText}} class="form-control" @disabled={{addCommentTask.isRunning}} /><br/>
<input type="submit" value={{t "add-comment"}} class="btn btn-primary" disabled={{addCommentTask.isRunning}}/>
</form>
</td>
Expand Down
2 changes: 1 addition & 1 deletion ember/app/templates/components/contest-layer.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{#each contests as |contest|}}
{{#if contest}}
{{contest-layer-feature source=source contest=contest}}
<ContestLayerFeature @source={{source}} @contest={{contest}} />
{{/if}}
{{/each}}
12 changes: 6 additions & 6 deletions ember/app/templates/components/fix-table.hbs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<table id="fix-data" class="table table-condensed">
<tbody>
{{#each data as |row|}}
{{fix-table-row
row=row
selectable=selectable
selected=(and selectable (eq row.id selection))
onSelect=(action "select")
onRemove=onRemove}}
<FixTableRow
@row={{row}}
@selectable={{selectable}}
@selected={{and selectable (eq row.id selection)}}
@onSelect={{action "select"}}
@onRemove={{onRemove}} />
{{/each}}
</tbody>
</table>
Loading

0 comments on commit ea81c53

Please sign in to comment.