Skip to content

Commit

Permalink
example templates
Browse files Browse the repository at this point in the history
benjamindavid committed Jan 11, 2014
1 parent 6811d3d commit 322ac59
Showing 3 changed files with 19 additions and 6 deletions.
17 changes: 14 additions & 3 deletions example-templates/like/assets.html
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ <h1>Assets</h1>
<p>You need to <a href="{{url('like/login')}}">log in</a> in order to start liking elements.</p>
{% endif %}

{% set assets = craft.assets.limit(5).find() %}
{% set assets = craft.assets.find() %}

<hr>

@@ -30,12 +30,23 @@ <h1>Assets</h1>
{% else %}
<a class="btn disabled btn-primary" href="#">Like</a>
{% endif %}
<br />
<br />

{% set likes = craft.like.getLikes(asset.id) %}

{% if likes|length == 0 %}
0 likes
{% else %}
{{likes|length}} like{{(likes|length > 1 ? 's':'')}}
{% endif %}

</p>

</div>
</div>

{% if loop.index is divisible by(2) %}
<div class="clearfix"></div>
{% endif %}
{% endfor %}
</div>
</div>
2 changes: 1 addition & 1 deletion example-templates/like/entries.html
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ <h1>Entries</h1>
<p>You need to <a href="{{url('like/login')}}">log in</a> in order to start liking elements.</p>
{% endif %}

{% set entries = craft.entries.limit(5).find() %}
{% set entries = craft.entries.find() %}

<hr>

6 changes: 4 additions & 2 deletions example-templates/like/users.html
Original file line number Diff line number Diff line change
@@ -9,12 +9,14 @@ <h1>Users</h1>
<p>You need to <a href="{{url('like/login')}}">log in</a> in order to start liking elements.</p>
{% endif %}

{% set entries = craft.users.limit(5).find() %}
{% set entries = craft.users.find() %}

<hr>

{% for entry in entries %}
<h2>{{entry.email}}</h2>

<h2>{{entry.fullName}}</h2>

<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Officia, earum, incidunt, ad, necessitatibus consectetur soluta eaque ratione porro corrupti dignissimos itaque provident amet non. Veritatis illum laudantium consectetur vel earum?</p>

<p>

0 comments on commit 322ac59

Please sign in to comment.