Skip to content

Commit

Permalink
Get rid of table-based view for tag groups and search results
Browse files Browse the repository at this point in the history
The template files for file/tagged and show/searchresults have been
overhauled to replace the table view with a view similar to dir view.
Also fixed a bug where the existing display would not render correctly in
the new version of Firefox.
  • Loading branch information
skinnynerd authored and kblin committed Dec 5, 2010
1 parent c86449c commit a8bede5
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 60 deletions.
8 changes: 4 additions & 4 deletions wombat/templates/derived/dir/filelist.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ <h3>${group.capitalize()} Files</h3>
type="text/itemDetail"
rel="${h.url_for(controller="file", action="panel")}?path=${file.path}"
class="clr">
<div class="lfloat">
<span class="lfloat">
<img class="fade" src="/images/other.png"
height="32" width="32" vspace="1" hspace="1" border="0" alt="" />
</div>
<div class="lfloat">
</span>
<span class="lfloat">
${h.truncStr(file.name, 20)}<br />
</div>
</span>
</a>
<script type="text/javascript">
lazyLoad('${h.url_for(controller="file", action="file_li2", id=None)}?path=${file.path}&id=${g}_${i}', $('act_${g}_${i}'));
Expand Down
8 changes: 4 additions & 4 deletions wombat/templates/derived/file/file_li2.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

<div class="lfloat">
<span class="lfloat">
<img class="fade" src="${h.getIcon(c.file)}"
height="32" width="32" vspace="1" hspace="1" border="0" alt="" />
</div>
<div class="lfloat">
</span>
<span class="lfloat">
${h.truncStr(c.file.name, 20)}<br />
<span class="meta">
(${h.sizeToStr(c.file.size)})
</span>
</div>
</span>
53 changes: 27 additions & 26 deletions wombat/templates/derived/file/tagged.html
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@
<%inherit file="/base/index.html"/>
<div id="main">
<h3>Found Files</h3>
<div class="group">
<h3>Found ${len(c.tagged)} Files</h3>
%if c.tagged is not None:
<table border="0" class="group">
<tr>
<% i = 0 %>
<div class="clr set">
<% i = 0 %>
%for file in c.tagged:
<td class="cell" valign="top" width="50%" id="file_li_${i}">
<script type="text/javascript">
lazyLoad('${h.url_for(controller="file", action="file_li", id=None)}?path=${file.path}', $('file_li_${i}'));
</script>
<a
href="${h.url_for(controller="file", action="index", id=None)}?path=${file.path}" title="Download ${file.name}">
<img class="fade" src="/images/other.png" border="0" alt="*" />
</a>
&nbsp;
<a
href="${h.url_for(controller="file", action="index", id=None)}?path=${file.path}" title="File details: ${file.name}">
${file.name}
</a>
<div>&nbsp;</div>
</td>
<%i+=1%>
%if i%2 == 0:
</tr>
<tr>
%endif
<div id="item_${i}" class="lfloat item">
<a href="${h.url_for(controller="file")}?path=${file.path}"
id="act_${i}"
title="View Details for: &ldquo;${file.name}&rdquo;"
type="text/itemDetail"
rel="${h.url_for(controller="file", action="panel")}?path=${file.path}"
class="clr">
<span class="lfloat">
<img class="fade" src="/images/other.png"
height="32" width="32" vspace="1" hspace="1" border="0" alt="" />
</span>
<span class="lfloat">
${h.truncStr(file.name, 20)}<br />
</span>
</a>
<script type="text/javascript">
lazyLoad('${h.url_for(controller="file", action="file_li2", id=None)}?path=${file.path}&id=${i}', $('act_${i}'));
</script>
<div id="exp_item_${i}" class="exp"></div>
</div>
<% i += 1 %>
%endfor
</tr>
</table>
</div>
%endif
</div>
53 changes: 27 additions & 26 deletions wombat/templates/derived/show/searchresults.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<%inherit file="/base/index.html"/>
<div class="clr group">
<em>Found ${len(c.found_dirs)} directories and ${len(c.found_files)} files containing "${c.needle}".</em>
<em>Found ${len(c.found_dirs)} directories and ${len(c.found_files)} files containing "${c.needle}".</em>

%if c.found_dirs != []:
<h3>Found Directories</h3>
<h3>Found Directories</h3>
<table border="0" class="group">
<tr>
<% i = 0 %>
Expand All @@ -27,34 +27,35 @@ <h3>Found Directories</h3>
</tr>
</table>
%endif

</div>
<div class="group">
%if c.found_files != []:
<h3>Found Files</h3>
<table border="0" class="group">
<tr>
<h3>Found Files</h3>
<div class="clr set">
<% i = 0 %>
%for file in c.found_files:
<td class="cell" valign="top" width="50%" id="file_li_${i}">
<script type="text/javascript">
lazyLoad('${h.url_for(controller="file", action="file_li", id=None)}?path=${file.path}', $('file_li_${i}'));
</script>
<a href="${h.url_for(controller="file", action="index", id=None)}?path=${file.path}" title="Download ${file.name}">
<img class="fade" src="/images/other.png" border="0" alt="*" />
</a>
&nbsp;
<a href="${h.url_for(controller="file", action="index", id=None)}?path=${file.path}" title="File details: ${file.name}">
${file.name}
</a>
<div>&nbsp;</div>
</td>
<div id="item_${i}" class="lfloat item">
<a href="${h.url_for(controller="file")}?path=${file.path}"
id="act_${i}"
title="View Details for: &ldquo;${file.name}&rdquo;"
type="text/itemDetail"
rel="${h.url_for(controller="file", action="panel")}?path=${file.path}"
class="clr">
<span class="lfloat">
<img class="fade" src="/images/other.png"
height="32" width="32" vspace="1" hspace="1" border="0" alt="" />
</span>
<span class="lfloat">
${h.truncStr(file.name, 20)}<br />
</span>
</a>
<script type="text/javascript">
lazyLoad('${h.url_for(controller="file", action="file_li2", id=None)}?path=${file.path}&id=${i}', $('act_${i}'));
</script>
<div id="exp_item_${i}" class="exp"></div>
</div>
<%i+=1%>
%if i%2 == 0:
</tr>
<tr>
%endif
%endfor
</tr>
</table>
</div>
%endif

</div>

0 comments on commit a8bede5

Please sign in to comment.