Skip to content

Commit

Permalink
[TASK] get limit for latest topics view from flexform
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Flesch committed May 18, 2016
1 parent 81696bd commit 5c6a7c0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Classes/Controller/TopicController.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ public function listAction() {
$partial = 'Topic/List';
break;
case '3':
$dataset = $this->topicRepository->findQuestions(6);
$dataset = $this->topicRepository->findQuestions(intval($this->settings['maxTopicItems']));
$partial = 'Topic/QuestionBox';
break;
case '4':
$dataset = $this->topicRepository->findPopularTopics(intval($this->settings['popularTopicTimeDiff']),6);
$dataset = $this->topicRepository->findPopularTopics(intval($this->settings['popularTopicTimeDiff']), intval($this->settings['maxTopicItems']));
$partial = 'Topic/ListBox';
break;
default:
Expand Down
13 changes: 12 additions & 1 deletion Configuration/FlexForms/Pi1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,18 @@
</config>
<displayCond>FIELD:switchableControllerActions:=:Topic->list</displayCond>
</TCEforms>
</settings.listTopics>
</settings.listTopics>
<settings.maxTopicItems>
<TCEforms>
<label>LLL:EXT:typo3_forum/Resources/Private/Language/locallang_flexforms.xml:Display_MaxTopicItems</label>
<config>
<type>input</type>
<size>6</size>
<eval>int,required</eval>
</config>
<displayCond>FIELD:switchableControllerActions:=:Topic->list</displayCond>
</TCEforms>
</settings.maxTopicItems>
<settings.listUsers>
<TCEforms>
<label>LLL:EXT:typo3_forum/Resources/Private/Language/locallang_flexforms.xml:Display</label>
Expand Down
1 change: 1 addition & 0 deletions Resources/Private/Language/locallang_flexforms.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<label index="Behaviour_Action_Topics_List">Topics List</label>
<label index="Display">Display View</label>
<label index="Display_Latest_Box">Latest Posts Box</label>
<label index="Display_MaxTopicItems">Maximum items to display</label>
<label index="Display_Default">Default</label>
<label index="Display_Active_User_Widget">Active User</label>
<label index="Display_Helpful_User_Widget">Helpful User</label>
Expand Down

0 comments on commit 5c6a7c0

Please sign in to comment.