Commit 31104585 authored by disappearer's avatar disappearer

Some smaller and bigger enhancements. See changelog.


git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/terfe/trunk@2453 735d13b6-9817-0410-8766-e36946ffe9aa
parent c62f16ca
12.03.2006 Michael Scharkow <michael@underused.org>
* refactoring of pi1, compact lists use a common function now
* added state and last update in compact lists
* zebra table rows for CSS, less classes in table view (check CSS!)
* added sorting by common criteria
* changed links, so that single view is consistently prefixed with /view
05.03.2006 Robert Lemke <robert@typo3.org>
+ File downloads are now passed through a function which sends correct HTTP headers and nicer file names.
......
......@@ -103,7 +103,7 @@
<label index="extension_lastuploaddate">Updated</label>
<label index="extension_files">Files</label>
<label index="extension_filepreview">Preview for file %s</label>
<label index="extension_documentation">Documentation</label>
<label index="extension_documentation">Manual</label>
<label index="extensionfiles_downloadcompressedt3x">Download compressed extension .T3X file</label>
</languageKey>
<languageKey index="dk" type="array">
......@@ -406,4 +406,4 @@
<languageKey index="my" type="array">
</languageKey>
</orig_text>
</T3locallang>
\ No newline at end of file
</T3locallang>
......@@ -375,19 +375,20 @@ class tx_terfe_pi1 extends tslib_pibase {
);
$sorting = $this->piVars['sorting'];
$sortingConditions = array (
'by_title' => '',
'by_extkey' => 'extensionkey ASC,',
'by_state' => 'state DESC,',
'by_update' => 'lastupdate DESC,'
'by_update' => 'lastuploaddate DESC,'
);
$tableRows = array ();
$res = $TYPO3_DB->exec_SELECTquery (
'extensionkey,title,version',
'extensionkey,title,version,state,lastuploaddate',
'tx_terfe_extensions',
'state <> "obsolete" '. $selectConditions[$mode],
'state in ("experimental","alpha","beta","stable") '. $selectConditions[$mode],
'',
$sortingConditions[$sorting].'title ASC',
''
......@@ -420,12 +421,13 @@ class tx_terfe_pi1 extends tslib_pibase {
$content = $introArr[$mode];
$content .= '
<table cellspacing="0" cellpadding="0">
<th class="th-main">&nbsp;</th>
<th class="th-main">'.$this->commonObj->getLL('extension_title','',1).'</th>
<th class="th-main">'.$this->commonObj->getLL('extension_extensionkey','',1).'</th>
<th class="th-main">'.$this->commonObj->getLL('extension_version','',1).'</th>
<th class="th-main">'.$this->commonObj->getLL('extension_documentation','',1).'</th>
<table class="compactlist">
<th>'.$this->pi_linkTP_keepPIvars($this->commonObj->getLL('extension_title','',1),array('sorting'=>'by_title'),1).'</th>
<th>'.$this->pi_linkTP_keepPIvars($this->commonObj->getLL('extension_extensionkey','',1),array('sorting'=>'by_extkey'),1).'</th>
<th>'.$this->commonObj->getLL('extension_version','',1).'</th>
<th>'.$this->commonObj->getLL('extension_documentation','',1).'</th>
<th>'.$this->pi_linkTP_keepPIvars($this->commonObj->getLL('extension_state','',1),array('sorting'=>'by_state'),1).'</th>
<th>'.$this->pi_linkTP_keepPIvars($this->commonObj->getLL('extension_lastuploaddate','',1),array('sorting'=>'by_update'),1).'</th>
'.implode('', $tableRows).'
</table>
';
......@@ -483,12 +485,13 @@ class tx_terfe_pi1 extends tslib_pibase {
break;
// ADDED BY MICHAEL SCHARKOW, just using another class for all the rating stuff!
case 'rating':
/* case 'rating':
require_once('class.tx_terfe_ratings.php');
$rating = new tx_terfe_ratings($extensionRecord,$this);
$subContent = $rating->renderSingleView_rating();
break;
break;
*/
case 'info':
default:
$subContent = $this->renderSingleView_extensionInfo ($extensionRecord);
......@@ -705,9 +708,10 @@ class tx_terfe_pi1 extends tslib_pibase {
$tableRows = '
<tr>
<th class="th-main-left">
'.$this->commonObj->getIcon_extension ($extensionRecord['extensionkey'], $extensionRecord['version']).'
'.$this->pi_linkTP(t3lib_div::fixed_lgd_cs($extensionRecord['title'],45), array('tx_terfe_pi1[view]' => 'search', 'tx_terfe_pi1[showExt]' => $extensionRecord['extensionkey'], 'tx_terfe_pi1[version]' => $extensionRecord['version']),1).'
</th>
'.$this->commonObj->getIcon_extension ($extensionRecord['extensionkey'], $extensionRecord['version']).
$this->pi_linkTP_keepPIvars(t3lib_div::fixed_lgd_cs($extensionRecord['title'],45), array('view'=>'view','showExt' => $extensionRecord['extensionkey'], 'version' => $extensionRecord['version']),1,1)
// '.$this->pi_linkTP(t3lib_div::fixed_lgd_cs($extensionRecord['title'],45), array('tx_terfe_pi1[view]' => 'search', 'tx_terfe_pi1[showExt]' => $extensionRecord['extensionkey'], 'tx_terfe_pi1[version]' => $extensionRecord['version']),1).'
.'</th>
<th class="th-main-right">'.$this->commonObj->getIcon_state($extensionRecord['state_raw']).'</th>
</tr>
<tr>
......@@ -752,14 +756,16 @@ class tx_terfe_pi1 extends tslib_pibase {
}
$extensionRecord = $this->commonObj->db_prepareExtensionRecordForOutput ($extensionRecord);
$rowClass = $this->oddRow ? 'class="even"' : '';
$this->oddRow = 1-$this->oddRow;
$tableRows = '
<tr>
<td class="td-sub">'.$this->commonObj->getIcon_extension ($extensionRecord['extensionkey'], $extensionRecord['version']).'</td>
<td class="td-sub">'.$this->pi_linkTP_keepPIvars($extensionRecord['title'], array('showExt' => $extensionRecord['extensionkey'], 'version' => $extensionRecord['version']),1).'</td>
<td class="td-sub">'.$extensionRecord['extensionkey'].'</td>
<td class="td-sub">'.$extensionRecord['version'].'</td>
<td class="td-sub">'.$documentationLink.'</td>
<tr '.$rowClass.'>
<td>'.$this->pi_linkTP_keepPIvars($extensionRecord['title'], array('view'=>'view','showExt' => $extensionRecord['extensionkey'], 'version' => $extensionRecord['version']),1,1).'</td>
<td>'.$extensionRecord['extensionkey'].'</td>
<td>'.$extensionRecord['version'].'</td>
<td>'.$documentationLink.'</td>
<td class="'.strtolower($extensionRecord['state']).'">'.$extensionRecord['state'].'</td>
<td>'.$extensionRecord['lastuploaddate'].'</td>
</tr>
';
......
......@@ -14,7 +14,8 @@
<label index="views_popular"></label>
<label index="views_search"></label>
<label index="views_fulllist"></label>
<label index="views_unsupported"></label>
<label index="views_reviewed"></label>
<label index="views_unreviewed"></label>
<label index="listview_new_introduction"></label>
<label index="listview_popular_introduction"></label>
<label index="listview_fulllist_introduction"></label>
......@@ -51,8 +52,8 @@
<label index="views_popular">Popular</label>
<label index="views_search">Search</label>
<label index="views_fulllist">Full list</label>
<label index="views_unsupported">Unreviewed</label>
<label index="views_reviewed">Reviewed</label>
<label index="views_unreviewed">Unreviewed</label>
<label index="listview_new_introduction">These extensions have been added or updated during the last %s days:</label>
<label index="listview_popular_introduction">This list shows the 10 most popular extensions measured by all time download numbers.</label>
<label index="listview_fulllist_introduction">This is a list of all available extensions:</label>
......@@ -378,4 +379,4 @@
<languageKey index="my" type="array">
</languageKey>
</orig_text>
</T3locallang>
\ No newline at end of file
</T3locallang>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment