Index: openacs-4/packages/news-aggregator/catalog/news-aggregator.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-aggregator/catalog/news-aggregator.en_US.ISO-8859-1.xml,v diff -u -r1.1 -r1.1.2.1 --- openacs-4/packages/news-aggregator/catalog/news-aggregator.en_US.ISO-8859-1.xml 3 Jun 2004 18:11:12 -0000 1.1 +++ openacs-4/packages/news-aggregator/catalog/news-aggregator.en_US.ISO-8859-1.xml 29 Dec 2005 22:54:18 -0000 1.1.2.1 @@ -10,6 +10,5 @@ <msg key="Post">Post</msg> <msg key="Purges">Purges:</msg> <msg key="raquo">&raquo;</msg> - <msg key="updated_x_time_ago">, - updated %items.diff%</msg> + <msg key="updated_x_time_ago">updated %items.diff%</msg> </message_catalog> Index: openacs-4/packages/news-aggregator/tcl/news-aggregator-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-aggregator/tcl/news-aggregator-procs.tcl,v diff -u -r1.9 -r1.9.2.1 --- openacs-4/packages/news-aggregator/tcl/news-aggregator-procs.tcl 13 Jan 2005 13:58:27 -0000 1.9 +++ openacs-4/packages/news-aggregator/tcl/news-aggregator-procs.tcl 29 Dec 2005 22:54:19 -0000 1.9.2.1 @@ -25,15 +25,22 @@ {-diff:required} } { - Returns the number of hours and minutes since the feed was last updated. + Returns the number of days, hours and minutes since the feed was last updated. @author Simon Carstensen } { if {$diff < 120 && $diff > 60} { set to_return "1 hour and " - } elseif {$diff >= 60} { + } elseif {$diff >= 60 && $diff < 1440} { set to_return "[expr $diff / 60] hours and " + } else { + if {$diff >= 1440 && $diff <2880} { + set to_return "1 day, [expr $diff / 60] hours and " + } else { + set to_return "[expr $diff / 1440] days, [expr [expr $diff % 1440] / 60] hours and " + } } + set mins [expr $diff % 60] if {[string equal 1 $mins]} { append to_return "1 minute ago" Index: openacs-4/packages/news-aggregator/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-aggregator/www/index.adp,v diff -u -r1.12.2.2 -r1.12.2.3 --- openacs-4/packages/news-aggregator/www/index.adp 28 Dec 2005 20:37:37 -0000 1.12.2.2 +++ openacs-4/packages/news-aggregator/www/index.adp 29 Dec 2005 22:54:19 -0000 1.12.2.3 @@ -8,7 +8,7 @@ <!-- MS: would like to lay this out without tables --> <table border="0"> <tr> - <td width="100%"> + <td width="100%" valign="top"> <h2>@aggregator_name@</h2> <if @aggregator_description@ not nil> @aggregator_description@ @@ -24,11 +24,9 @@ </td> <td valign="top" align="right"> <if @num_options@ gt 1> - <nobr><ul class="action-links"> - <li><formtemplate id="aggregators"> - Visit another aggregator <formwidget id=aggregator> - </formtemplate></li> - </ul></nobr> + <formtemplate id="aggregators"> + <formwidget id=aggregator> + </formtemplate> </if> </td> </tr> @@ -40,7 +38,6 @@ <if @allow_aggregator_edit_p@ true> <a href="@url@manage" class="button">Manage @aggregator_name@</a> </if> - <a href="@create_url@" class="button">#news-aggregator.lt_Create_New_Aggregator#</a> <a href="@url@settings" class="button">@instance_name@ Settings</a> </div> <p> @@ -53,47 +50,38 @@ <i>#news-aggregator.No_items#</i> </if> <else> - <table cellspacing=1 cellpadding=0 border=0> - <tr> - <td bgcolor="#c0c0c0"> - <table cellspacing=1 cellpadding=8 border=0 width="100%"> - <multiple name="items"> - <group column="sort_date"> - <tr bgcolor="#eeeeee"> - <td colspan=2> - <b><a href="@items.link@" title="@items.description@">@items.title@</a>#news-aggregator.updated_x_time_ago#</b> - <a href="@items.technorati_url@"><img src="@graphics_url@technorati.png" width ="50" height="14" alt="Technorati Cosmos" border="0"></a> - </td> - </tr> - <group column="source_id"> - <tr bgcolor="#ffffff" id="@items.item_id@"> - <td> - @items.content;noquote@ - <if @items.item_link@ not nil and @items.item_guid_link@ not nil> - <a href="@items.item_guid_link@" title="Permanent URL for this entry">#</a> - </if> - </td> - <td valign="top" width="40" align="left"> - <if @public_p@ false and @write_p@ true> - <if @items.save_url@ not nil> - <a href="@items.save_url@"><img border="0" src="@graphics_url@save.gif" width="16" height="16" alt="Save" /></a> - </if> - <if @items.unsave_url@ not nil> - <a href="@items.unsave_url@"><img border="0" src="@graphics_url@delete.gif" width="16" height="16" alt="Unsave" /></a> - </if> - <a href="@items.item_blog_url@"><img border="0" src="@graphics_url@post.gif" width="16" height="16" alt="Post this item to your Weblog" /></a> - </if> - - <span class="item_pub_date">@items.pub_date@</span> - </td> - </tr> - </group> - </group> - </multiple> - </table> - </td> - </tr> - </table> + <multiple name="items"> + <group column="sort_date"> + <div style="background-color: #eeeeee; padding-top: 10px; padding-bottom: 10px; padding-left: 5px;"> + <span style="font-size: 125%; font-weight: bold;"><a href="@items.link@" title="@items.description@">@items.title@</a></span>#news-aggregator.updated_x_time_ago# + </div> + <group column="source_id"> + <p> + <div style="margin-left: 10px; margin-bottom: 30px;"> + <a name="@items.item_id@"> + <div style="font-size: 115%; font-weight: bold; margin-bottom: 5px;"> + <if @items.item_title@ not nil> + <a href="@items.item_link@">@items.item_title@</a> + </if> + </div> + <div class="item_pub_date" style="margin-bottom: 5px;">Posted: @items.pub_date@</div> + @items.content;noquote@ + <if @items.item_link@ not nil and @items.item_guid_link@ not nil> + <a href="@items.item_guid_link@" title="Permanent URL for this entry">#</a> + </if> + <if @public_p@ false and @write_p@ true> + <if @items.save_url@ not nil> + <a href="@items.save_url@"><img border="0" src="@graphics_url@save.gif" width="16" height="16" alt="Save" /></a> + </if> + <if @items.unsave_url@ not nil> + <a href="@items.unsave_url@"><img border="0" src="@graphics_url@delete.gif" width="16" height="16" alt="Unsave" /></a> + </if> + <a href="@items.item_blog_url@"><img border="0" src="@graphics_url@post.gif" width="16" height="16" alt="Post this item to your Weblog" /></a> + </if> + </div> + </group> + </group> + </multiple> </else> <if @enable_purge_p@ true and @public_p@ false and @purge@ true and @purge_p@ true> Index: openacs-4/packages/news-aggregator/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-aggregator/www/index.tcl,v diff -u -r1.9.2.3 -r1.9.2.4 --- openacs-4/packages/news-aggregator/www/index.tcl 28 Dec 2005 22:45:41 -0000 1.9.2.3 +++ openacs-4/packages/news-aggregator/www/index.tcl 29 Dec 2005 22:54:19 -0000 1.9.2.4 @@ -77,7 +77,7 @@ db_1row aggregator_info {} # Get options for "other aggregators" form widget -set other_aggregators [list [list " --- select --- " "\#"]] +set other_aggregators [list [list "Other News Aggregators" "\#"]] db_foreach other_aggregators {} { if { [permission::permission_p \ -object_id $other_id \ @@ -187,20 +187,20 @@ } if { [exists_and_not_null content_encoded] } { - if { [exists_and_not_null item_title] } { - set content "<a href=\"$item_link\">$item_title</a>. $content_encoded" - } else { +# if { [exists_and_not_null item_title] } { +# set content "<a href=\"$item_link\">$item_title</a>. $content_encoded" +# } else { set content $content_encoded - } +# } } else { set text_only [util_remove_html_tags $item_description] - if { [exists_and_not_null item_title] } { - set content "<a href=\"$item_link\">$item_title</a>. <span class=\"item_author\">$item_author</span> -$item_description" - } else { +# if { [exists_and_not_null item_title] } { +# set content "<a href=\"$item_link\">$item_title</a>. <span class=\"item_author\">$item_author</span> +# $item_description" +# } else { set content $item_description - } +# } } if { $item_permalink_p == "t" } { @@ -217,13 +217,9 @@ set utctime [clock scan $item_pub_date -gmt 1] if { $utctime > [clock scan "1 day ago" -gmt 1] } { set pub_date [clock format $utctime -format "%I:%M %p"] - } elseif { $utctime > [clock scan "1 week ago" -gmt 1] } { - set pub_date [clock format $utctime -format "%a %I:%M %p"] - } elseif { $utctime > [clock scan "2 weeks ago" -gmt 1] } { - set pub_date [clock format $utctime -format "%a %m/%d"] } else { - set pub_date [clock format $utctime -format "%D"] - } + set pub_date [clock format $utctime -format "%d %b %Y %I:%M %p"] + } if { [string equal $write_p "1"] } { if { [lsearch $saved_items $item_id] == -1 } {