diff --git a/class.groups.plugin.php b/class.groups.plugin.php index bbe0cf6..d882dc7 100644 --- a/class.groups.plugin.php +++ b/class.groups.plugin.php @@ -16,8 +16,8 @@ class GroupsPlugin extends Gdn_Plugin { const GROUPS_ROUTE = '/groups'; const ROUTE_MY_GROUPS = '/groups/mine'; - const ROUTE_CHALLENGE_GROUPS = '/groups?filter=challenge'; //'/groups/challenges'; - const ROUTE_REGULAR_GROUPS = '/groups?filter=regular'; //'/groups/regulars'; + const ROUTE_CHALLENGE_GROUPS = '/groups/mine?filter=challenge'; //'/groups/challenges'; + const ROUTE_REGULAR_GROUPS = '/groups/mine?filter=regular'; //'/groups/regulars'; const GROUP_ROUTE = '/group/'; const GROUPS_GROUP_ADD_PERMISSION = 'Groups.Group.Add'; const GROUPS_GROUP_ARCHIVE_PERMISSION = 'Groups.Group.Archive'; @@ -39,7 +39,7 @@ class GroupsPlugin extends Gdn_Plugin { 'CreateGroupTitle' => 'Create Challenge', 'EditGroupTitle' => 'Edit Challenge', 'TypeName' => 'challenge'], - 'regular' => ['BreadcrumbLevel1Title' => 'Groups', + 'regular' => ['BreadcrumbLevel1Title' => 'Group Discussions', 'BreadcrumbLevel1Url' => self::ROUTE_REGULAR_GROUPS, 'CreateGroupTitle' => 'Create Group', 'EditGroupTitle' => 'Edit Group', @@ -820,7 +820,7 @@ private function addGroupLinkToMenu($sender) { if(Gdn::session()->isValid()) { echo '
  • '. anchor('Challenge Discussions', GroupsPlugin::ROUTE_CHALLENGE_GROUPS).'
  • '; - // echo '
  • '. anchor('Groups', GroupsPlugin::ROUTE_REGULAR_GROUPS).'
  • '; + // echo '
  • '. anchor('Group Discussions', GroupsPlugin::ROUTE_REGULAR_GROUPS).'
  • '; // echo '
  • '. anchor('My Challenges & Groups', GroupsPlugin::ROUTE_MY_GROUPS).'
  • '; } } diff --git a/controllers/class.groupcontroller.php b/controllers/class.groupcontroller.php index 6144524..dd47944 100644 --- a/controllers/class.groupcontroller.php +++ b/controllers/class.groupcontroller.php @@ -49,7 +49,7 @@ public function initialize() { } // Add modules - $this->addModule('NewDiscussionModule'); + //$this->addModule('NewDiscussionModule'); $this->addModule('DiscussionFilterModule'); //$this->addModule('CategoriesModule'); $this->addModule('BookmarkedModule'); @@ -566,7 +566,7 @@ public function discussions($GroupID='',$Page = false) { // $this->View = 'index'; break; } - Gdn_Theme::section('Group'); + //Gdn_Theme::section('Group'); // Remove score sort DiscussionModel::removeSort('top'); diff --git a/controllers/class.groupscontroller.php b/controllers/class.groupscontroller.php index 62b5fba..984c754 100644 --- a/controllers/class.groupscontroller.php +++ b/controllers/class.groupscontroller.php @@ -48,13 +48,13 @@ public function setFilterPageData($filter) { if($filter == 'challenge') { $this->View = 'index'; $this->title('Challenge Discussions'); - $this->setData('Title', 'My Challenges'); + $this->setData('Title', 'Challenge Discussions'); $this->setData('ShowAddButton', false); $this->setData('AddButtonTitle', 'Challenge'); $this->setData('AddButtonLink', '/group/add?type=challenge'); $this->setData('AvailableGroupTitle', 'Available Challenges'); - $this->setData('MyGroupButtonTitle', 'All My Challenges'); - $this->setData('AllGroupButtonTitle', 'All Available Challenges'); + $this->setData('MyGroupButtonTitle', 'All Challenge Discussions'); + $this->setData('AllGroupButtonTitle', 'All Available Challenge Discussions'); $this->SetData('MyGroupButtonLink', '/groups/mine/?filter=challenge'); $this->setData('AllGroupButtonLink', '/groups/all/?filter=challenge'); $this->setData('NoGroups', 'No challenges were found.'); @@ -67,9 +67,9 @@ public function setFilterPageData($filter) { $this->setData('ShowAddButton', true); $this->setData('AddButtonTitle', 'Group'); $this->setData('AddButtonLink', '/group/add?type=regular'); - $this->setData('MyGroupButtonTitle', 'All My Groups'); - $this->setData('AllGroupButtonTitle', 'All Available Groups'); - $this->setData('AvailableGroupTitle', 'Available Groups'); + $this->setData('MyGroupButtonTitle', 'All Group Discussions'); + $this->setData('AllGroupButtonTitle', 'All Available Group Discussions'); + $this->setData('AvailableGroupTitle', 'Available Group Discussions'); $this->SetData('MyGroupButtonLink', '/groups/mine/?filter=regular'); $this->setData('AllGroupButtonLink', '/groups/all/?filter=regular'); $this->setData('NoGroups','No groups were found.'); @@ -81,7 +81,7 @@ public function setFilterPageData($filter) { public function index($Page=false, $filter) { DashboardNavModule::getDashboardNav()->setHighlightRoute('groups/challenges'); $this->Menu->highlightRoute('groups/challenges'); - Gdn_Theme::section('GroupList'); + // Gdn_Theme::section('GroupList'); $GroupModel = new GroupModel(); $GroupModel->setFilters(Gdn::request()->get()); @@ -100,13 +100,13 @@ public function index($Page=false, $filter) { $defaultSort = $GroupModel::getAllowedSorts()['new']['orderBy']; $GroupData = $GroupModel->getMyGroups($where, $defaultSort, $Limit, $Offset); $countOfGroups = $GroupModel->countMyGroups($where); - $AvailableGroupData = $GroupModel->getAvailableGroups($where, $defaultSort, $Limit, $Offset); + //$AvailableGroupData = $GroupModel->getAvailableGroups($where, $defaultSort, $Limit, $Offset); $this->setData('CurrentUserGroups', $GroupModel->memberOf(Gdn::session()->UserID)); $this->setData('Groups', $GroupData); $this->setData('CountOfGroups', $countOfGroups); - $this->setData('AvailableGroups', $AvailableGroupData); + //$this->setData('AvailableGroups', $AvailableGroupData); $this->render(); } @@ -190,16 +190,16 @@ private function mygroups($Page = false, $filter = '') { $this->setData('_Limit', $Limit); if($filter == 'regular') { - $title = 'My Groups'; - $noDataText = 'No groups were found.'; + $title = 'Group Discussions'; + $noDataText = 'No Group discussions were found.'; $this->setData('Breadcrumbs', [ - ['Name' => 'Groups', 'Url' => '/groups/'.$queryString], + //['Name' => 'Group Discussions', 'Url' => '/groups/'.$queryString], ['Name' => $title, 'Url' => '/groups/mine/'.$queryString]]); } else if($filter == 'challenge'){ - $title = 'My Challenges'; - $noDataText = 'No challenges were found.'; + $title = 'Challenge Discussions'; + $noDataText = 'No Challenge discussions were found.'; $this->setData('Breadcrumbs', [ - ['Name' => 'Challenges', 'Url' => '/groups/'.$queryString], + //['Name' => 'Challenge Discussions', 'Url' => '/groups/'.$queryString], ['Name' => $title, 'Url' => '/groups/mine/'.$queryString]]); } diff --git a/design/groups.css b/design/groups.css index b5eb44e..a6c078d 100644 --- a/design/groups.css +++ b/design/groups.css @@ -521,10 +521,6 @@ li.ui-timepicker-selected .ui-timepicker-duration, clear: both } -.Groups .DataList .ItemContent { - padding-left: 48px -} - .Groups .Item .OptionsMenu, .Groups .Item .ButtonGroup { display: inline-block; @@ -589,19 +585,7 @@ li.ui-timepicker-selected .ui-timepicker-duration, margin-bottom: 20px } -.Group-Header:after { - content: ""; - display: table; - clear: both -} -.Group-Header .MItem { - display: inline-block -} - -.Group-Header .Meta { - font-size: 12px -} .Group-Header .OptionsMenu { display: block; @@ -679,21 +663,10 @@ li.ui-timepicker-selected .ui-timepicker-duration, margin-left: 0 } -.Group-Title { - margin-bottom: 10px; - font-size: 36px; - line-height: 1 -} - .NoBanner .Group-Title { padding-top: 5px } -.Group-Description { - line-height: 1.4; - padding: 5px 0 -} - .Group-Banner { height: 200px; width: 100%; diff --git a/views/group/discussions.php b/views/group/discussions.php index 9310a96..5488ef6 100644 --- a/views/group/discussions.php +++ b/views/group/discussions.php @@ -19,14 +19,14 @@
    Discussions'; echo '
    '; - echo '

    Discussions

    '; $PagerOptions = ['Wrapper' => ' 
    %2$s
    ', 'RecordCount' => $CountDiscussions, 'CurrentRecords' => $Discussions->numRows()]; if ($this->data('_PagerUrl')) { $PagerOptions['Url'] = $this->data('_PagerUrl'); } PagerModule::write($PagerOptions); - echo Gdn_Theme::module('NewDiscussionModule', $this->data('_NewDiscussionProperties', ['CssClass' => 'Button Action Primary'])); + // echo Gdn_Theme::module('NewDiscussionModule', $this->data('_NewDiscussionProperties', ['CssClass' => 'Button Action Primary'])); // Avoid displaying in a category's list of discussions. if ($this->data('EnableFollowingFilter')) { // echo discussionFilters(); diff --git a/views/group/edit.php b/views/group/edit.php index 932b60e..f6328ea 100644 --- a/views/group/edit.php +++ b/views/group/edit.php @@ -52,8 +52,8 @@ echo '
    '; echo '
    '; - echo anchor(t('Cancel'), $CancelUrl, 'Button'); echo $this->Form->button( 'Save', ['class' => 'Button Primary']); + echo anchor(t('Cancel'), $CancelUrl, 'Button'); // echo ' '.anchor(t('Edit'), '#', 'Button WriteButton Hidden')."\n"; echo '
    '; diff --git a/views/group/helper_functions.php b/views/group/helper_functions.php index b418ace..bd31aff 100644 --- a/views/group/helper_functions.php +++ b/views/group/helper_functions.php @@ -195,42 +195,52 @@ function writeGroupHeader($group, $showDetails = false, $owner = null, $leaders $bannerCssClass = $group->Banner ? 'HasBanner':'NoBanner'; ?>
    +
    + +
    +

    Name; ?>

    Icon) { ?>
    -
    - -
    -
    -

    Name, groupUrl($group)); ?>

    -
    Description; ?>
    -
    +
    +
    Description; ?>
    +
    ChallengeUrl) { ?> - - Challenge: - Name, $group->ChallengeUrl);?> - +
    +
    Challenge
    +
    Name, $group->ChallengeUrl);?>
    +
    - - Owner: - - - - Leaders: - +
    +
    Owner
    +
    +
    +
    +
    Leaders
    +
    - - - - Created on DateInserted; ?> - Privacy: Privacy; ?> +
    +
    +
    +
    Member(s)
    +
    +
    + +
    +
    Created on
    +
    DateInserted; ?>
    +
    +
    +
    Privacy
    +
    Privacy; ?>
    +
    -
    +
    +

    Announcements

    -

    Announcements

    +

    Discussions

    -

    Discussions

    canAddDiscussion($Group)) { @@ -76,7 +76,7 @@
    -

    Members

    +

    Members

    0 ) { ?>
    diff --git a/views/group/members.php b/views/group/members.php index 3612764..52af4e8 100644 --- a/views/group/members.php +++ b/views/group/members.php @@ -9,10 +9,8 @@ ?> +

    Leaders

    -
    -

    Leaders

    -
    0 ) {?>
      @@ -21,9 +19,9 @@ echo '
      There are no leaders.
      '; }?>
    +

    Members

    -

    Members

    ' 
    %2$s
    ', 'RecordCount' => $this->data('CountMembers'), 'CurrentRecords' => $Members]; if ($this->data('_PagerUrl')) { diff --git a/views/groups/helper_functions.php b/views/groups/helper_functions.php index c3a1343..54c4c4e 100644 --- a/views/groups/helper_functions.php +++ b/views/groups/helper_functions.php @@ -76,35 +76,24 @@ function writeGroup($group, $sender, $session) { ?>
  • CanEditGroups = val('PermsDiscussionsEdit', CategoryModel::categories($discussion->CategoryID)) && c('Vanilla.AdminCheckboxes.Use'); } ?> - -
    - Privacy == GroupModel::PRIVACY_PUBLIC && hasJoinedGroup($group->GroupID) == null) { - echo anchor('Join', '/group/join/' . $group->GroupID, 'Button Popup', ''); - } - - if(hasJoinedGroup($group->GroupID) === GroupModel::ROLE_LEADER) { - echo anchor('Invite', '/group/invite/' . $group->GroupID, 'Button Popup', ''); - } - ?> -
    - -
    -
    -
    - +
    + +
    + +
    +
    -
    +
  • '; - echo '
    '; - echo '

    '.$sectionTitle.'

    '; - echo '
    '; - - if ($Groups->numRows() > 0 ) { - ?> -
      - -
    -
    - -
    - '; - } -} - if(!function_exists('buildGroupPagerOptions')) { function buildGroupPagerOptions($Groups, $Pager){ $pagerOptions = ['Wrapper' => ' 
    %2$s
    ', 'RecordCount' => $Pager->TotalRecords, @@ -148,11 +113,6 @@ function buildGroupPagerOptions($Groups, $Pager){ if(!function_exists('writeGroupSection')) { function writeGroupSection($Groups, $Pager = null, $sectionTitle, $noDataText, $moreDataText, $moreDataLink, $sender){ - echo '
    '; - echo '
    '; - echo '

    '.$sectionTitle.'

    '; - echo '
    '; - if($Pager) { $PagerOptions = buildGroupPagerOptions($Groups, $Pager); PagerModule::current($Pager); @@ -166,7 +126,7 @@ function writeGroupSection($Groups, $Pager = null, $sectionTitle, $noDataText, $ echo '
    '; } ?> -
      +
    '; } } \ No newline at end of file diff --git a/views/groups/index.php b/views/groups/index.php index 31ed225..31b6d3b 100644 --- a/views/groups/index.php +++ b/views/groups/index.php @@ -12,6 +12,8 @@ echo ''; } +echo '

    '.$this->data('Title').'

    '; +echo '
    '; echo writeGroupSection($this->data('Groups'), $this->data('GroupsPager') , $this->data('Title'), $this->data('NoGroups'),$this->data('MyGroupButtonTitle'), $this->data('MyGroupButtonLink'),$this); - -echo writeGroupSection($this->data('AvailableGroups'), null, $this->data('AvailableGroupTitle'), $this->data('NoGroups'),$this->data('AllGroupButtonTitle'), $this->data('AllGroupButtonLink'),$this); +echo '
    '; +//echo writeGroupSection($this->data('AvailableGroups'), null, $this->data('AvailableGroupTitle'), $this->data('NoGroups'),$this->data('AllGroupButtonTitle'), $this->data('AllGroupButtonLink'),$this); diff --git a/views/groups/list.php b/views/groups/list.php index 3f14efa..f74e948 100644 --- a/views/groups/list.php +++ b/views/groups/list.php @@ -3,11 +3,8 @@ include_once $this->fetchViewLocation('helper_functions'); + echo '

    '.$this->data('Title').'

    '; -echo '
    '; - echo '
    '; - echo '

    '.$this->data('Title').'

    '; - echo '
    '; $PagerOptions = ['Wrapper' => ' 
    %2$s
    ', 'RecordCount' => $this->data('CountGroups'), 'CurrentRecords' => $this->data('Groups')->numRows()]; if ($this->data('_PagerUrl')) { @@ -19,7 +16,7 @@ if ($this->data('Groups')->numRows() > 0 ) { ?> -
      +
        fetchViewLocation('groups')); ?>
      data('NoDataText'); ?>
    '; \ No newline at end of file diff --git a/views/groups/mine.php b/views/groups/mine.php index dc47879..d2ae398 100644 --- a/views/groups/mine.php +++ b/views/groups/mine.php @@ -3,15 +3,11 @@ include_once $this->fetchViewLocation('helper_functions'); - -echo '
    '; -echo '
    '; -echo '

    My Challenges

    '; -echo '
    '; - +echo '

    Challenge Discussions

    '; if ($this->data('ChallengeGroups')) { + ?> -
      +
        data('ChallengeGroups'), $this); ?> @@ -19,26 +15,23 @@ data('CountOfChallengeGroups') > 0) { ?> -
        data('CountOfChallengeGroups').')', '/groups/mine?filter=challenge', 'MoreWrap');?>
        +
        data('CountOfChallengeGroups').')', '/groups/mine?filter=challenge', 'MoreWrap');?>
        -
        +
        '; - -echo '
        '; -echo '
        '; -echo '

        My Groups

        '; -echo '
        '; +echo '

        Group Discussions

        '; if ($this->data('RegularGroups')) { + + echo '
        '; ?> -
          +
            data('RegularGroups'), $this); ?> @@ -46,11 +39,11 @@ data('CountOfRegularGroups') > 0) { ?> -
            data('CountOfRegularGroups').')', '/groups/mine/?filter=regular', 'MoreWrap');?>
            +
            data('CountOfRegularGroups').')', '/groups/mine/?filter=regular', 'MoreWrap');?>
            -
            +