Last active
October 22, 2015 11:57
-
-
Save Tomucha/79d5868ce21685158919 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<polymer-element name="bavse-daily-tip" attributes="resource"> | |
<template> | |
<div class="place-toolbar"> | |
<h3>Tipy dne</h3> | |
<a _href="#{{myRoute}}/edit"><paper-fab icon="add"></paper-fab></a> | |
</div> | |
<ma-activity | |
form-edit | |
class="screen" | |
route="/edit/?{entityId:int}" on-route-visible="{{editEntity}}"> | |
<paper-input floatingLabel label="Nadpis tipu" value="{{entityEdit['name']}}"></paper-input> | |
<paper-input floatingLabel label="Text tipu" value="{{entityEdit['text']}}"></paper-input> | |
<paper-input floatingLabel label="Nadpis tipu (SK)" value="{{entityEdit['nameSk']}}"></paper-input> | |
<paper-input floatingLabel label="Text tipu (SK)" value="{{entityEdit['textSk']}}"></paper-input> | |
<ma-pick-one-radio label="Typ tipu (tipni si)" value="{{entityEdit['category']}}" choices="DAILY_TIP, WEEKLY_TIP"></ma-pick-one-radio> | |
<ma-imagery label="Obrázek k tipu" value="{{entityEdit['image']}}" setId="tips"></ma-imagery> | |
<ma-imagery label="Obrázek na detail" value="{{entityEdit['imageDetail']}}" setId="tips"></ma-imagery> | |
<label>Na titulce?</label> <paper-checkbox checked="{{entityEdit['showOnHomepage']}}"></paper-checkbox> | |
<ma-submit-bar on-submit="{{saveEntity}}"></ma-submit-bar> | |
</ma-activity> | |
<ma-rest-listing | |
id="listing" | |
class="screen" | |
route="/list" | |
rest="{{rest}}"> | |
<table listing> | |
<tr template repeat="{{tip in $['listing'].entities}}"> | |
<td> | |
<ma-entity entity="{{tip}}"></ma-entity>{{tip['text']}} | |
</td> | |
<td> | |
{{tip['showOnHomepage'] ? "titulka": ""}} | |
</td> | |
<td>{{tip['category']}}</td> | |
<td class="actions"> | |
<a _href="#{{myRoute}}/edit/{{tip['id']}}">edit</a> | |
</td> | |
</tr> | |
</table> | |
</ma-rest-listing> | |
</template> | |
<script type="application/dart" src="bavse_daily_tip.dart"></script> | |
</polymer-element> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment