Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Few updates, mongodb support, still no docs ;)
- Loading branch information
Mateusz Mikołajczyk
committed
Mar 21, 2012
1 parent
248f186
commit 2749a8a
Showing
11 changed files
with
284 additions
and
39 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{% for col in grid.columns %} | ||
{% load dict %} | ||
<th{% if col.colname == "__delete__" %} width="5%"{% endif %}> | ||
{% if col.colname == "__delete__" %} | ||
<input type="submit" name="{{ deletesubmit|default:"delete" }}" value="{{ col.label }}" /> | ||
{% else %} | ||
{% if col.sortable %} | ||
<a href="{{ grid.request.path }}?order={{ col.order }}&page={{ grid.page.number }}" class="sort-column" | ||
{% if grid.order|check_order:col.colname %} | ||
style="text-decoration: underline; {{ grid.order|check_order_by }}" | ||
{% endif %} | ||
> | ||
{{ col.label }} | ||
</a> | ||
{% else %} | ||
{{ col.label }} | ||
{% endif %} | ||
{% endif %} | ||
</th> | ||
{% endfor %} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<div class="table"> | ||
{% if title %} | ||
<div class="title"> | ||
<h5>{{ title }}</h5> | ||
</div> | ||
{% endif %} | ||
<div> | ||
<table class="grid" style="border-right: 15px solid white;"> | ||
<thead> | ||
<tr> | ||
{% include header_template|default:"grid/header.html" %} | ||
</tr> | ||
</thead> | ||
</table> | ||
</div> | ||
<div style="overflow-y: scroll; max-height: 350px; border: solid 1px; border-color: #EEE"> | ||
<table class="grid"> | ||
<tbody> | ||
{% if grid.page.object_list %} | ||
{% for row in grid.page.object_list %} | ||
{% include row_template|default:"grid/row.html" %} | ||
{% endfor %} | ||
{% else %} | ||
<tr> | ||
<td colspan="{{ grid.columns|length }}" align="center">Brak rekordów do wyświetlenia</td> | ||
</tr> | ||
{% endif %} | ||
</tbody> | ||
</table> | ||
</div> | ||
{% if grid.paginator.num_pages > 1 %} | ||
{% include paginator_template|default:"grid/paginator.html" %} | ||
{% endif %} | ||
|
||
<table style="margin-top:5px;width: 150px"> | ||
<tr class=d0> | ||
{% if foldery %} | ||
|
||
<td style="width: 20px"><input type="submit" onclick="$('#maile_form').attr('target', '_self');" value="" title="Usuń wiadomości" name="usun" style="background: url('{{ STATIC_URL }}resources/images/poczta/usun.png');background-repeat:no-repeat; width: 28px; height: 26px; border:0; cursor: pointer;"/></td> | ||
<td style="width: 20px"><input type="submit" onclick="$('#maile_form').attr('target', '_self');" value="" name="odpowiedz" title="Odpowiedz" style="background: url('{{ STATIC_URL }}resources/images/poczta/odp.png');background-repeat:no-repeat; width: 28px; height: 26px; border:0; cursor: pointer"/></td> | ||
<td style="width: 20px"><input type="submit" onclick="$('#maile_form').attr('target', '_self');" value="" name="odpowiedz_w" title="Odpowiedz wszystkim" style="background: url('{{ STATIC_URL }}resources/images/poczta/odp_w.png');background-repeat:no-repeat; width: 28px; height: 26px; border:0; cursor: pointer"/></td> | ||
<td style="width: 20px"><input type="submit" onclick="$('#maile_form').attr('target', '_self');" value="" name="przekaz" title="Przekaż dalej" style="background: url('{{ STATIC_URL }}resources/images/poczta/przekaz.png');background-repeat:no-repeat; width: 32px; height: 26px; border:0; cursor: pointer"/></th> | ||
<td style="width: 20px"><input type="submit" onclick="$('#maile_form').attr('target', '_self');" value="" name="dodaj_kontakt" title="Dodaj kontakt z maila" style="background: url('{{ STATIC_URL }}resources/images/poczta/dodaj_kontakt.png');background-repeat:no-repeat; width: 33px; height: 26px; border:0; cursor: pointer"/></td> | ||
<td><a id="druk_but" title="Drukuj wiadomość" target="_blank"><img src="{{ STATIC_URL }}resources/images/poczta/drukuj.png"></a></td> | ||
{% else %} | ||
<td><img src="{{ STATIC_URL }}resources/images/poczta/usun_nie.png"></td> | ||
<td><img src="{{ STATIC_URL }}resources/images/poczta/odp_nie.png"></td> | ||
<td><img src="{{ STATIC_URL }}resources/images/poczta/odp_w_nie.png"></td> | ||
<td><img src="{{ STATIC_URL }}resources/images/poczta/przekaz_nie.png"></td> | ||
<td><img src="{{ STATIC_URL }}resources/images/poczta/dodaj_kontakt_nie.png"></td> | ||
{% endif %} | ||
</tr> | ||
</table> | ||
<div style="border: solid 1px; max-height: 350px; padding: 5px; border-color: #EEE"> | ||
<div id="tresc_wiadomosci"> | ||
<iframe id="myframe" name="myframe" class="autoHeigh" scrolling="auto" frameborder="0" src="" style="width: 100%; height: 350px"></iframe> | ||
</div> | ||
</div> | ||
|
||
</div> |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{% load dict %} | ||
<tr> | ||
{% for col in grid.columns %} | ||
|
||
{% if grid.custom_columns|contains:col.colname %} | ||
{% include grid.custom_columns|get:col.colname %} | ||
{% else %} | ||
<td> | ||
{% if col.colname == "__delete__" %} | ||
<input type="checkbox" name="{{ deletename|default:"id" }}" value="{% if deletename %}{{ row|get:deletename }}{% else %}{{ row|get:"id" }}{% endif %}" /> | ||
{% else %} | ||
{{ row|get:col.colname|default:"" }} | ||
{% endif %} | ||
</td> | ||
{% endif %} | ||
{% endfor %} | ||
</tr> |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from django.template import Library | ||
|
||
register = Library() | ||
|
||
def limit(_list, howmany): | ||
return _list[:howmany] | ||
|
||
register.filter(limit) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from django.template import Library | ||
|
||
register = Library() | ||
|
||
def get_verbose_name(meta, field): | ||
return meta.get_field(field).verbose_name | ||
|
||
register.filter(get_verbose_name) |
Oops, something went wrong.