Skip to content
31 changes: 31 additions & 0 deletions builder/code/phreeze.backbone/styles/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ p.buttonContainer {

}

table {
width:auto !important;
margin-bottom:0px !important;
}

table.collection tr:hover {
cursor: pointer;
}
Expand All @@ -29,6 +34,14 @@ table.collection th:hover {
opacity: 0.5;
}

.tableContainer {
overflow: auto;
width: 940px; /* add responsive parts in bootstrap.css */
border: 2px solid #333;
border-radius: 4px;
padding:0px;
}

.date-picker input
{
width: 80px;
Expand Down Expand Up @@ -96,3 +109,21 @@ span.help-inline {
span.help-inline:empty {
display: none;
}

@media(min-width:1200px) {
.tableContainer{
width: 1170px;
}
}

@media(min-width:768px) and (max-width:979px) {
.tableContainer{
width: 724px;
}
}

@media(max-width:767px) {
.tableContainer{
width: 100%;
}
}
12 changes: 2 additions & 10 deletions builder/code/phreeze.backbone/templates/ListView.tpl.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,19 @@

<!-- underscore template for the collection -->
<script type="text/template" id="{$singular|lcfirst}CollectionTemplate">
<div class="tableContainer">
<table class="collection table table-bordered table-hover">
<thead>
<tr>
{foreach from=$table->Columns item=column name=columnsForEach}
{if $smarty.foreach.columnsForEach.index == 5}{ldelim}* UNCOMMENT TO SHOW ADDITIONAL COLUMNS *{rdelim}
{ldelim}*
{/if}
<th id="header_{$column->NameWithoutPrefix|studlycaps}">{$column->NameWithoutPrefix|underscore2space}<% if (page.orderBy == '{$column->NameWithoutPrefix|studlycaps}') { %> <i class='icon-arrow-<%= page.orderDesc ? 'up' : 'down' %>' /><% } %></th>
{/foreach}
{if $smarty.foreach.columnsForEach.index >= 5}*{rdelim}
{/if}
</tr>
</thead>
<tbody>
<% items.each(function(item) {ldelim} %>
<tr id="<%= _.escape(item.get('{$table->GetPrimaryKeyName()|studlycaps|lcfirst}')) %>">
{foreach from=$table->Columns item=column name=columnsForEach}
{if $smarty.foreach.columnsForEach.index == 5}{ldelim}* uncomment to show additional colums *{rdelim}
{ldelim}*
{/if}
{if $column->Type == "date"}
<td><%if (item.get('{$column->NameWithoutPrefix|studlycaps|lcfirst}')) { %><%= _date(app.parseDate(item.get('{$column->NameWithoutPrefix|studlycaps|lcfirst}'))).format('MMM D, YYYY') %><% } else { %>NULL<% } %></td>
{elseif $column->Type == "datetime" || $column->Type == "timestamp"}
Expand All @@ -66,12 +59,11 @@
<td><%= _.escape(item.get('{$column->NameWithoutPrefix|studlycaps|lcfirst}') || '') %></td>
{/if}
{/foreach}
{if $smarty.foreach.columnsForEach.index >= 5}*{rdelim}
{/if}
</tr>
<% {rdelim}); %>
</tbody>
</table>
</div>

<%= view.getPaginationHtml(page) %>
</script>
Expand Down
12 changes: 2 additions & 10 deletions builder/code/phreeze.blade/views/listview.blade.php.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,19 @@

<!-- underscore template for the collection -->
<script type="text/template" id="{$singular|lcfirst}CollectionTemplate">
<div class="tableContainer">
<table class="collection table table-bordered table-hover">
<thead>
<tr>
{foreach from=$table->Columns item=column name=columnsForEach}
{if $smarty.foreach.columnsForEach.index == 5}<!-- UNCOMMENT TO SHOW ADDITIONAL COLUMNS -->
<!--
{/if}
<th id="header_{$column->NameWithoutPrefix|studlycaps}">{$column->NameWithoutPrefix|underscore2space}<% if (page.orderBy == '{$column->NameWithoutPrefix|studlycaps}') { %> <i class='icon-arrow-<%= page.orderDesc ? 'up' : 'down' %>' /><% } %></th>
{/foreach}
{if $smarty.foreach.columnsForEach.index >= 5}-->
{/if}
</tr>
</thead>
<tbody>
<% items.each(function(item) {ldelim} %>
<tr id="<%= _.escape(item.get('{$table->GetPrimaryKeyName()|studlycaps|lcfirst}')) %>">
{foreach from=$table->Columns item=column name=columnsForEach}
{if $smarty.foreach.columnsForEach.index == 5}<!-- uncomment to show additional colums -->
<!--
{/if}
{if $column->Type == "date"}
<td><%if (item.get('{$column->NameWithoutPrefix|studlycaps|lcfirst}')) { %><%= _date(app.parseDate(item.get('{$column->NameWithoutPrefix|studlycaps|lcfirst}'))).format('MMM D, YYYY') %><% } else { %>NULL<% } %></td>
{elseif $column->Type == "datetime" || $column->Type == "timestamp"}
Expand All @@ -64,12 +57,11 @@
<td><%= _.escape(item.get('{$column->NameWithoutPrefix|studlycaps|lcfirst}') || '') %></td>
{/if}
{/foreach}
{if $smarty.foreach.columnsForEach.index >= 5}-->
{/if}
</tr>
<% {rdelim}); %>
</tbody>
</table>
</div>

<%= view.getPaginationHtml(page) %>
</script>
Expand Down
10 changes: 2 additions & 8 deletions builder/code/phreeze.savant/templates/ListView.tpl.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,19 @@

<!-- underscore template for the collection -->
<script type="text/template" id="{$singular|lcfirst}CollectionTemplate">
<div class="tableContainer">
<table class="collection table table-bordered table-hover">
<thead>
<tr>
{foreach from=$table->Columns item=column name=columnsForEach}
{if $smarty.foreach.columnsForEach.index == 5}<!-- UNCOMMENT TO SHOW ADDITIONAL COLUMNS
{/if}
<th id="header_{$column->NameWithoutPrefix|studlycaps}">{$column->NameWithoutPrefix|underscore2space}<% if (page.orderBy == '{$column->NameWithoutPrefix|studlycaps}') { %> <i class='icon-arrow-<%= page.orderDesc ? 'up' : 'down' %>' /><% } %></th>
{/foreach}
{if $smarty.foreach.columnsForEach.index >= 5}-->
{/if}
</tr>
</thead>
<tbody>
<% items.each(function(item) {ldelim} %>
<tr id="<%= _.escape(item.get('{$table->GetPrimaryKeyName()|studlycaps|lcfirst}')) %>">
{foreach from=$table->Columns item=column name=columnsForEach}
{if $smarty.foreach.columnsForEach.index == 5}<!-- UNCOMMENT TO SHOW ADDITIONAL COLUMNS
{/if}
{if $column->Type == "date"}
<td><%if (item.get('{$column->NameWithoutPrefix|studlycaps|lcfirst}')) { %><%= _date(app.parseDate(item.get('{$column->NameWithoutPrefix|studlycaps|lcfirst}'))).format('MMM D, YYYY') %><% } else { %>NULL<% } %></td>
{elseif $column->Type == "datetime" || $column->Type == "timestamp"}
Expand All @@ -59,12 +54,11 @@
<td><%= _.escape(item.get('{$column->NameWithoutPrefix|studlycaps|lcfirst}') || '') %></td>
{/if}
{/foreach}
{if $smarty.foreach.columnsForEach.index >= 5}-->
{/if}
</tr>
<% {rdelim}); %>
</tbody>
</table>
</div>

<%= view.getPaginationHtml(page) %>
</script>
Expand Down