Skip to content

Commit 5343d9b

Browse files
authored
Merge pull request #56 from topcoder-platform/issues-384
Issues-377: design tweaks
2 parents dbc09b8 + d68f367 commit 5343d9b

13 files changed

+91
-160
lines changed

class.groups.plugin.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
class GroupsPlugin extends Gdn_Plugin {
1717
const GROUPS_ROUTE = '/groups';
1818
const ROUTE_MY_GROUPS = '/groups/mine';
19-
const ROUTE_CHALLENGE_GROUPS = '/groups?filter=challenge'; //'/groups/challenges';
20-
const ROUTE_REGULAR_GROUPS = '/groups?filter=regular'; //'/groups/regulars';
19+
const ROUTE_CHALLENGE_GROUPS = '/groups/mine?filter=challenge'; //'/groups/challenges';
20+
const ROUTE_REGULAR_GROUPS = '/groups/mine?filter=regular'; //'/groups/regulars';
2121
const GROUP_ROUTE = '/group/';
2222
const GROUPS_GROUP_ADD_PERMISSION = 'Groups.Group.Add';
2323
const GROUPS_GROUP_ARCHIVE_PERMISSION = 'Groups.Group.Archive';
@@ -39,7 +39,7 @@ class GroupsPlugin extends Gdn_Plugin {
3939
'CreateGroupTitle' => 'Create Challenge',
4040
'EditGroupTitle' => 'Edit Challenge',
4141
'TypeName' => 'challenge'],
42-
'regular' => ['BreadcrumbLevel1Title' => 'Groups',
42+
'regular' => ['BreadcrumbLevel1Title' => 'Group Discussions',
4343
'BreadcrumbLevel1Url' => self::ROUTE_REGULAR_GROUPS,
4444
'CreateGroupTitle' => 'Create Group',
4545
'EditGroupTitle' => 'Edit Group',
@@ -820,7 +820,7 @@ private function addGroupLinkToMenu($sender) {
820820
if(Gdn::session()->isValid()) {
821821

822822
echo '<li class="'.$this->getMenuItemCssClassFromQuery($sender, 'challenge').'">'. anchor('Challenge Discussions', GroupsPlugin::ROUTE_CHALLENGE_GROUPS).'</li>';
823-
// echo '<li class="'.$this->getMenuItemCssClassFromQuery($sender, 'regular').'">'. anchor('Groups', GroupsPlugin::ROUTE_REGULAR_GROUPS).'</li>';
823+
// echo '<li class="'.$this->getMenuItemCssClassFromQuery($sender, 'regular').'">'. anchor('Group Discussions', GroupsPlugin::ROUTE_REGULAR_GROUPS).'</li>';
824824
// echo '<li class="'.$this->getMenuItemCssClassFromRequestMethod($sender, 'mine').'">'. anchor('My Challenges & Groups', GroupsPlugin::ROUTE_MY_GROUPS).'</li>';
825825
}
826826
}

controllers/class.groupcontroller.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function initialize() {
4949
}
5050

5151
// Add modules
52-
$this->addModule('NewDiscussionModule');
52+
//$this->addModule('NewDiscussionModule');
5353
$this->addModule('DiscussionFilterModule');
5454
//$this->addModule('CategoriesModule');
5555
$this->addModule('BookmarkedModule');
@@ -566,7 +566,7 @@ public function discussions($GroupID='',$Page = false) {
566566
// $this->View = 'index';
567567
break;
568568
}
569-
Gdn_Theme::section('Group');
569+
//Gdn_Theme::section('Group');
570570

571571
// Remove score sort
572572
DiscussionModel::removeSort('top');

controllers/class.groupscontroller.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ public function setFilterPageData($filter) {
4848
if($filter == 'challenge') {
4949
$this->View = 'index';
5050
$this->title('Challenge Discussions');
51-
$this->setData('Title', 'My Challenges');
51+
$this->setData('Title', 'Challenge Discussions');
5252
$this->setData('ShowAddButton', false);
5353
$this->setData('AddButtonTitle', 'Challenge');
5454
$this->setData('AddButtonLink', '/group/add?type=challenge');
5555
$this->setData('AvailableGroupTitle', 'Available Challenges');
56-
$this->setData('MyGroupButtonTitle', 'All My Challenges');
57-
$this->setData('AllGroupButtonTitle', 'All Available Challenges');
56+
$this->setData('MyGroupButtonTitle', 'All Challenge Discussions');
57+
$this->setData('AllGroupButtonTitle', 'All Available Challenge Discussions');
5858
$this->SetData('MyGroupButtonLink', '/groups/mine/?filter=challenge');
5959
$this->setData('AllGroupButtonLink', '/groups/all/?filter=challenge');
6060
$this->setData('NoGroups', 'No challenges were found.');
@@ -67,9 +67,9 @@ public function setFilterPageData($filter) {
6767
$this->setData('ShowAddButton', true);
6868
$this->setData('AddButtonTitle', 'Group');
6969
$this->setData('AddButtonLink', '/group/add?type=regular');
70-
$this->setData('MyGroupButtonTitle', 'All My Groups');
71-
$this->setData('AllGroupButtonTitle', 'All Available Groups');
72-
$this->setData('AvailableGroupTitle', 'Available Groups');
70+
$this->setData('MyGroupButtonTitle', 'All Group Discussions');
71+
$this->setData('AllGroupButtonTitle', 'All Available Group Discussions');
72+
$this->setData('AvailableGroupTitle', 'Available Group Discussions');
7373
$this->SetData('MyGroupButtonLink', '/groups/mine/?filter=regular');
7474
$this->setData('AllGroupButtonLink', '/groups/all/?filter=regular');
7575
$this->setData('NoGroups','No groups were found.');
@@ -81,7 +81,7 @@ public function setFilterPageData($filter) {
8181
public function index($Page=false, $filter) {
8282
DashboardNavModule::getDashboardNav()->setHighlightRoute('groups/challenges');
8383
$this->Menu->highlightRoute('groups/challenges');
84-
Gdn_Theme::section('GroupList');
84+
// Gdn_Theme::section('GroupList');
8585

8686
$GroupModel = new GroupModel();
8787
$GroupModel->setFilters(Gdn::request()->get());
@@ -100,13 +100,13 @@ public function index($Page=false, $filter) {
100100
$defaultSort = $GroupModel::getAllowedSorts()['new']['orderBy'];
101101
$GroupData = $GroupModel->getMyGroups($where, $defaultSort, $Limit, $Offset);
102102
$countOfGroups = $GroupModel->countMyGroups($where);
103-
$AvailableGroupData = $GroupModel->getAvailableGroups($where, $defaultSort, $Limit, $Offset);
103+
//$AvailableGroupData = $GroupModel->getAvailableGroups($where, $defaultSort, $Limit, $Offset);
104104

105105
$this->setData('CurrentUserGroups', $GroupModel->memberOf(Gdn::session()->UserID));
106106
$this->setData('Groups', $GroupData);
107107

108108
$this->setData('CountOfGroups', $countOfGroups);
109-
$this->setData('AvailableGroups', $AvailableGroupData);
109+
//$this->setData('AvailableGroups', $AvailableGroupData);
110110
$this->render();
111111
}
112112

@@ -190,16 +190,16 @@ private function mygroups($Page = false, $filter = '') {
190190
$this->setData('_Limit', $Limit);
191191

192192
if($filter == 'regular') {
193-
$title = 'My Groups';
194-
$noDataText = 'No groups were found.';
193+
$title = 'Group Discussions';
194+
$noDataText = 'No Group discussions were found.';
195195
$this->setData('Breadcrumbs', [
196-
['Name' => 'Groups', 'Url' => '/groups/'.$queryString],
196+
//['Name' => 'Group Discussions', 'Url' => '/groups/'.$queryString],
197197
['Name' => $title, 'Url' => '/groups/mine/'.$queryString]]);
198198
} else if($filter == 'challenge'){
199-
$title = 'My Challenges';
200-
$noDataText = 'No challenges were found.';
199+
$title = 'Challenge Discussions';
200+
$noDataText = 'No Challenge discussions were found.';
201201
$this->setData('Breadcrumbs', [
202-
['Name' => 'Challenges', 'Url' => '/groups/'.$queryString],
202+
//['Name' => 'Challenge Discussions', 'Url' => '/groups/'.$queryString],
203203
['Name' => $title, 'Url' => '/groups/mine/'.$queryString]]);
204204

205205
}

design/groups.css

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -521,10 +521,6 @@ li.ui-timepicker-selected .ui-timepicker-duration,
521521
clear: both
522522
}
523523

524-
.Groups .DataList .ItemContent {
525-
padding-left: 48px
526-
}
527-
528524
.Groups .Item .OptionsMenu,
529525
.Groups .Item .ButtonGroup {
530526
display: inline-block;
@@ -589,19 +585,7 @@ li.ui-timepicker-selected .ui-timepicker-duration,
589585
margin-bottom: 20px
590586
}
591587

592-
.Group-Header:after {
593-
content: "";
594-
display: table;
595-
clear: both
596-
}
597588

598-
.Group-Header .MItem {
599-
display: inline-block
600-
}
601-
602-
.Group-Header .Meta {
603-
font-size: 12px
604-
}
605589

606590
.Group-Header .OptionsMenu {
607591
display: block;
@@ -679,21 +663,10 @@ li.ui-timepicker-selected .ui-timepicker-duration,
679663
margin-left: 0
680664
}
681665

682-
.Group-Title {
683-
margin-bottom: 10px;
684-
font-size: 36px;
685-
line-height: 1
686-
}
687-
688666
.NoBanner .Group-Title {
689667
padding-top: 5px
690668
}
691669

692-
.Group-Description {
693-
line-height: 1.4;
694-
padding: 5px 0
695-
}
696-
697670
.Group-Banner {
698671
height: 200px;
699672
width: 100%;

views/group/discussions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919
<div class="Group-Content">
2020
<div class="Group-Box Group-Discussions Section-DiscussionList">
2121
<?php
22+
echo ' <h1 class="H clearfix">Discussions</h1>';
2223
echo '<div class="PageControls">';
23-
echo ' <h2 class="H media-list-heading">Discussions</h2>';
2424
$PagerOptions = ['Wrapper' => '<span class="PagerNub">&#160;</span><div %1$s>%2$s</div>', 'RecordCount' => $CountDiscussions, 'CurrentRecords' => $Discussions->numRows()];
2525
if ($this->data('_PagerUrl')) {
2626
$PagerOptions['Url'] = $this->data('_PagerUrl');
2727
}
2828
PagerModule::write($PagerOptions);
29-
echo Gdn_Theme::module('NewDiscussionModule', $this->data('_NewDiscussionProperties', ['CssClass' => 'Button Action Primary']));
29+
// echo Gdn_Theme::module('NewDiscussionModule', $this->data('_NewDiscussionProperties', ['CssClass' => 'Button Action Primary']));
3030
// Avoid displaying in a category's list of discussions.
3131
if ($this->data('EnableFollowingFilter')) {
3232
// echo discussionFilters();

views/group/edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
echo '</div>';
5353

5454
echo '<div class="Buttons">';
55-
echo anchor(t('Cancel'), $CancelUrl, 'Button');
5655
echo $this->Form->button( 'Save', ['class' => 'Button Primary']);
56+
echo anchor(t('Cancel'), $CancelUrl, 'Button');
5757
// echo ' '.anchor(t('Edit'), '#', 'Button WriteButton Hidden')."\n";
5858
echo '</div>';
5959

views/group/helper_functions.php

Lines changed: 34 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -195,42 +195,52 @@ function writeGroupHeader($group, $showDetails = false, $owner = null, $leaders
195195
$bannerCssClass = $group->Banner ? 'HasBanner':'NoBanner';
196196
?>
197197
<div class="Group-Header <?php echo $bannerCssClass; ?>">
198+
<div class="GroupOptions OptionsMenu ButtonGroup">
199+
<?php echo getGroupOptionsDropdown();?>
200+
</div>
201+
<h1 class="Group-Title"><?php echo $group->Name; ?></h1>
198202
<?php echo writeGroupBanner($group);?>
199203
<?php if($group->Icon) { ?>
200204
<div class="Photo PhotoWrap PhotoWrapLarge Group-Icon-Big-Wrap">
201205
<?php echo writeGroupIcon($group, '', 'Group-Icon Group-Icon-Big');?>
202206
</div>
203207
<?php }?>
204-
<div class="GroupOptions OptionsMenu ButtonGroup">
205-
<?php echo getGroupOptionsDropdown();?>
206-
</div>
207-
<div class="Group-Header-Info">
208-
<h1 class="Group-Title"><?php echo anchor($group->Name, groupUrl($group)); ?></h1>
209208
<?php if($showDetails) { ?>
210-
<div class="Group-Description userContent"><?php echo $group->Description; ?></div>
211-
<div class="Meta Group-Meta Group-Info">
209+
<div class="Group-Info">
210+
<div class="Group-Description"><?php echo $group->Description; ?></div>
211+
<div class="Meta Group-Meta Table">
212212
<?php if($group->ChallengeUrl) { ?>
213-
<span class="MItem ">
214-
<span class="label">Challenge: </span>
215-
<span class="value"><?php echo anchor($group->Name, $group->ChallengeUrl);?></span>
216-
</span>
213+
<div class="MItem TableRow">
214+
<div class="TableCell Cell1">Challenge</div>
215+
<div class="TableCell Cell2"><?php echo anchor($group->Name, $group->ChallengeUrl);?></div>
216+
</div>
217217
<?php } ?>
218-
<span class="MItem ">
219-
<span class="label">Owner: </span>
220-
<span class="value"><?php echo userAnchor($owner, 'Username');?></span>
221-
</span>
222-
<span class="MItem ">
223-
<span class="label">Leaders: </span>
224-
<span class="value">
218+
<div class="MItem TableRow">
219+
<div class="TableCell Cell1">Owner</div>
220+
<div class="TableCell Cell2"><?php echo userAnchor($owner, 'Username');?></div>
221+
</div>
222+
<div class="MItem TableRow">
223+
<div class="TableCell Cell1">Leaders</div>
224+
<div class="TableCell Cell2">
225225
<?php echo writeGroupMembers($leaders, ','); ?>
226-
</span>
227-
</span>
228-
<span class="MItem "><span class="label"><?php echo $totalMembers.' member(s)'; ?></span></span>
229-
<span class="MItem "><span class="label">Created on <?php echo $group->DateInserted; ?></span></span>
230-
<span class="MItem "><span class="label">Privacy: </span><span class="value"><?php echo $group->Privacy; ?></span></span>
226+
</div>
227+
</div>
228+
<div class="MItem TableRow">
229+
<div class="TableCell Cell1">Member(s)</div>
230+
<div class="TableCell Cell2"><?php echo $totalMembers; ?></div>
231+
</div>
232+
233+
<div class="MItem TableRow">
234+
<div class="TableCell Cell1">Created on</div>
235+
<div class="TableCell Cell2"><?php echo $group->DateInserted; ?></div>
236+
</div>
237+
<div class="MItem TableRow Last">
238+
<div class="TableCell Cell1">Privacy</div>
239+
<div class="TableCell Cell2"><?php echo $group->Privacy; ?></div>
240+
</div>
231241
</div>
232-
<?php }?>
233242
</div>
243+
<?php }?>
234244
</div>
235245

236246
<?php

views/group/index.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424

2525
<div class="Group-Content">
2626
<div class="Group-Box Group-Announcements Section-DiscussionList">
27+
<h1 class="H">Announcements</h1>
2728
<div class="PageControls">
28-
<h2 class="H">Announcements</h2>
2929
<div class="Button-Controls">
3030
<?php
3131

@@ -48,8 +48,8 @@
4848
<?php } ?>
4949
</div>
5050
<div class="Group-Box Group-Discussions Section-DiscussionList">
51+
<h1 class="H">Discussions</h1>
5152
<div class="PageControls">
52-
<h2 class="H">Discussions</h2>
5353
<div class="Button-Controls">
5454
<?php
5555
if($groupModel->canAddDiscussion($Group)) {
@@ -76,7 +76,7 @@
7676
<div class="Group-Info ClearFix clearfix">
7777
<div class="Group-Box Group-MembersPreview">
7878
<div class="PageControls">
79-
<h2 class="Groups H">Members</h2>
79+
<h1 class="Groups H">Members</h1>
8080
</div>
8181
<?php if(count($Members) > 0 ) { ?>
8282
<div class="PhotoGrid PhotoGridSmall">

views/group/members.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@
99

1010
?>
1111
<?php echo writeGroupHeader($Group);?>
12+
<h1 class="H">Leaders</h1>
1213
<div class="media-list-container Group-Box MemberList">
13-
<div class="PageControls">
14-
<h2 class="H media-list-heading">Leaders</h2>
15-
</div>
1614
<?php if(count($Leaders) > 0 ) {?>
1715
<ul class="media-list DataList">
1816
<?php echo writeGroupMembersWithDetails($Leaders, $Group); ?>
@@ -21,9 +19,9 @@
2119
echo '<div class="EmptyMessage">There are no leaders.</div>';
2220
}?>
2321
</div>
22+
<h1 class="H">Members</h1>
2423
<div class="media-list-container Group-Box MemberList">
2524
<div class="PageControls">
26-
<h2 class="H media-list-heading">Members</h2>
2725
<?php
2826
$PagerOptions = ['Wrapper' => '<span class="PagerNub">&#160;</span><div %1$s>%2$s</div>', 'RecordCount' => $this->data('CountMembers'), 'CurrentRecords' => $Members];
2927
if ($this->data('_PagerUrl')) {

0 commit comments

Comments
 (0)