当前位置: 首页>>代码示例>>PHP>>正文


PHP Display::return_sortable_grid方法代码示例

本文整理汇总了PHP中Display::return_sortable_grid方法的典型用法代码示例。如果您正苦于以下问题:PHP Display::return_sortable_grid方法的具体用法?PHP Display::return_sortable_grid怎么用?PHP Display::return_sortable_grid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Display的用法示例。


在下文中一共展示了Display::return_sortable_grid方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get_lang

        $social_right_content .= get_lang('YouNeedToHaveFriendsInYourSocialNetwork');
    } else {
        $social_right_content .= get_lang('YouAlreadyInviteAllYourContacts');
    }
    $social_right_content .= '<div>';
    $social_right_content .= '<a href="search.php">' . get_lang('TryAndFindSomeFriends') . '</a>';
    $social_right_content .= '</div>';
}
$form = new FormValidator('invitation', 'post', api_get_self() . '?id=' . $group_id);
$form->addHidden('form_sent', 1);
$form->addHidden('id', $group_id);
$group_members_element = $form->addElement('advmultiselect', 'invitation', get_lang('Friends'), $nosessionUsersList, 'style="width: 280px;"');
$form->addButtonSave(get_lang('InviteUsersToGroup'));
$social_right_content .= $form->returnForm();
// Current group members
$members = $usergroup->get_users_by_group($group_id, false, array(GROUP_USER_PERMISSION_PENDING_INVITATION));
if (is_array($members) && count($members) > 0) {
    foreach ($members as &$member) {
        $image = UserManager::getUserPicture($member['user_id']);
        $member['image'] = '<img src="' . $image . '"  width="50px" height="50px"  />';
    }
    $social_right_content .= '<h3>' . get_lang('UsersAlreadyInvited') . '</h3>';
    $social_right_content .= Display::return_sortable_grid('invitation_profile', array(), $members, array('hide_navigation' => true, 'per_page' => 100), array(), false, array(true, false, true, true));
}
$tpl = \Chamilo\CoreBundle\Framework\Container::getTwig();
SocialManager::setSocialUserBlock($tpl, api_get_user_id(), 'groups', $group_id);
$social_menu_block = SocialManager::show_social_menu('member_list', $group_id);
$tpl->addGlobal('social_menu_block', $social_menu_block);
//$tpl->setHelp('Groups');
$tpl->addGlobal('social_right_content', $social_right_content);
echo $tpl->render('@template_style/social/add_groups.html.twig');
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:31,代码来源:group_invitation.php

示例2: display_message_for_group


//.........这里部分代码省略.........
     // Main message
     $links = '';
     $main_content = '';
     $items_page_nr = null;
     $html = '';
     $delete_button = '';
     if (api_is_platform_admin()) {
         $delete_button = Display::url(Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL), 'group_topics.php?action=delete&id=' . $group_id . '&topic_id=' . $topic_id);
     }
     $html .= Display::page_subheader(Security::remove_XSS($main_message['title'] . $delete_button, STUDENT, true));
     $user_sender_info = api_get_user_info($main_message['user_sender_id']);
     $files_attachments = self::get_links_message_attachment_files($main_message['id']);
     $name = $user_sender_info['complete_name'];
     $topic_page_nr = isset($_GET['topics_page_nr']) ? intval($_GET['topics_page_nr']) : null;
     $links .= '<div id="message-reply-link">';
     if ($my_group_role == GROUP_USER_PERMISSION_ADMIN || $my_group_role == GROUP_USER_PERMISSION_MODERATOR || $main_message['user_sender_id'] == $current_user_id) {
         $urlEdit = api_get_path(WEB_CODE_PATH);
         $urlEdit .= 'social/message_for_group_form.inc.php?';
         $urlEdit .= http_build_query(['user_friend' => $current_user_id, 'group_id' => $group_id, 'message_id' => $main_message['id'], 'action' => 'edit_message_group', 'anchor_topic' => 'topic_' . $main_message['id'], 'topics_page_nr' => $topic_page_nr, 'items_page_nr' => $items_page_nr, 'topic_id' => $main_message['id']]);
         $links .= Display::url(Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL), $urlEdit, ['class' => 'ajax btn btn-default', 'title' => get_lang('Edit'), 'data-title' => get_lang('Edit'), 'data-size' => 'lg']);
     }
     $urlReply = api_get_path(WEB_CODE_PATH);
     $urlReply .= 'social/message_for_group_form.inc.php?';
     $urlReply .= http_build_query(['user_friend' => api_get_user_id(), 'group_id' => $group_id, 'message_id' => $main_message['id'], 'action' => 'reply_message_group', 'anchor_topic' => 'topic_' . $main_message['id'], 'topics_page_nr' => $topic_page_nr, 'topic_id' => $main_message['id']]);
     $links .= Display::url(Display::return_icon('talk.png', get_lang('Reply')), $urlReply, ['class' => 'ajax btn btn-default', 'title' => get_lang('Reply'), 'data-title' => get_lang('Reply'), 'data-size' => 'lg']);
     $links .= '</div>';
     $userPicture = $user_sender_info['avatar'];
     $main_content .= '<div class="message-group-author">
                      <img src="' . $userPicture . '" alt="' . $name . '"  width="32" height="32" title="' . $name . '" /></div>';
     $user_link = '<a href="' . api_get_path(WEB_PATH) . 'main/social/profile.php?u=' . $main_message['user_sender_id'] . '">' . $name . '&nbsp;</a>';
     $date = '';
     if ($main_message['send_date'] != $main_message['update_date']) {
         if (!empty($main_message['update_date']) && $main_message['update_date'] != '0000-00-00 00:00:00') {
             $date = '<div class="message-group-date"> ' . get_lang('LastUpdate') . ' ' . date_to_str_ago($main_message['update_date']) . '</div>';
         }
     } else {
         $date = '<div class="message-group-date"> ' . get_lang('Created') . ' ' . date_to_str_ago($main_message['send_date']) . '</div>';
     }
     $attachment = '<div class="message-attach">' . (!empty($files_attachments) ? implode('<br />', $files_attachments) : '') . '</div>';
     $main_content .= '<div class="message-group-content">' . $links . $user_link . ' ' . $date . $main_message['content'] . $attachment . '</div>';
     $main_content = Security::remove_XSS($main_content, STUDENT, true);
     $html .= Display::div(Display::div(Display::div($main_content, array('class' => 'group_social_sub_item', 'style' => 'background-color:#fff;')), array('class' => 'group_social_item')), array('class' => 'group_social_grid'));
     $topic_id = $main_message['id'];
     if (is_array($rows) && count($rows) > 0) {
         $topics = $rows;
         $array_html_items = array();
         foreach ($topics as $index => $topic) {
             if (empty($topic['id'])) {
                 continue;
             }
             $items_page_nr = isset($_GET['items_' . $topic['id'] . '_page_nr']) ? intval($_GET['items_' . $topic['id'] . '_page_nr']) : null;
             $links = '';
             $html_items = '';
             $user_sender_info = api_get_user_info($topic['user_sender_id']);
             $files_attachments = self::get_links_message_attachment_files($topic['id']);
             $name = $user_sender_info['complete_name'];
             $links .= '<div id="message-reply-link">';
             if ($my_group_role == GROUP_USER_PERMISSION_ADMIN || $my_group_role == GROUP_USER_PERMISSION_MODERATOR || $topic['user_sender_id'] == $current_user_id) {
                 $links .= '<a href="' . api_get_path(WEB_CODE_PATH) . 'social/message_for_group_form.inc.php?height=400&width=800&&user_friend=' . $current_user_id . '&group_id=' . $group_id . '&message_id=' . $topic['id'] . '&action=edit_message_group&anchor_topic=topic_' . $topic_id . '&topics_page_nr=' . $topic_page_nr . '&items_page_nr=' . $items_page_nr . '&topic_id=' . $topic_id . '" class="ajax btn" data-size="lg" data-title="' . get_lang('Edit') . '" title="' . get_lang('Edit') . '">' . Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL) . '</a>';
             }
             $links .= '&nbsp;&nbsp;<a href="' . api_get_path(WEB_CODE_PATH) . 'social/message_for_group_form.inc.php?height=400&width=800&&user_friend=' . api_get_user_id() . '&group_id=' . $group_id . '&message_id=' . $topic['id'] . '&action=reply_message_group&anchor_topic=topic_' . $topic_id . '&topics_page_nr=' . $topic_page_nr . '&items_page_nr=' . $items_page_nr . '&topic_id=' . $topic_id . '" class="ajax btn" data-size="lg" data-title="' . get_lang('Reply') . '" title="' . get_lang('Reply') . '">';
             $links .= Display::return_icon('talk.png', get_lang('Reply')) . '</a>';
             $links .= '</div>';
             $userPicture = $user_sender_info['avatar'];
             $html_items .= '<div class="message-group-author"><img src="' . $userPicture . '" alt="' . $name . '"  width="32" height="32" title="' . $name . '" /></div>';
             $user_link = '<a href="' . api_get_path(WEB_PATH) . 'main/social/profile.php?u=' . $topic['user_sender_id'] . '">' . $name . '&nbsp;</a>';
             $date = '';
             if ($topic['send_date'] != $topic['update_date']) {
                 if (!empty($topic['update_date']) && $topic['update_date'] != '0000-00-00 00:00:00') {
                     $date = '<div class="message-group-date"> ' . get_lang('LastUpdate') . ' ' . date_to_str_ago($topic['update_date']) . '</div>';
                 }
             } else {
                 $date = '<div class="message-group-date"> ' . get_lang('Created') . ' ' . date_to_str_ago($topic['send_date']) . '</div>';
             }
             $attachment = '<div class="message-attach">' . (!empty($files_attachments) ? implode('<br />', $files_attachments) : '') . '</div>';
             $html_items .= '<div class="message-group-content">' . $links . $user_link . ' ' . $date . Security::remove_XSS($topic['content'], STUDENT, true) . $attachment . '</div>';
             $base_padding = 20;
             if ($topic['indent_cnt'] == 0) {
                 $indent = $base_padding;
             } else {
                 $indent = intval($topic['indent_cnt']) * $base_padding + $base_padding;
             }
             $class = 'group_social_sub_item';
             if (isset($message_id) && $message_id == $topic['id']) {
                 $class .= ' group_social_sub_item_highlight';
             }
             $html_items = Display::div($html_items, array('class' => $class, 'id' => 'msg_' . $topic['id']));
             $html_items = Display::div($html_items, array('class' => '', 'style' => 'margin-left:' . $indent . 'px'));
             $array_html_items[] = array($html_items);
         }
         // grids for items with paginations
         $options = array('hide_navigation' => false, 'per_page' => $items_per_page);
         $visibility = array(true, true, true, false);
         $style_class = array('item' => array('class' => 'group_social_item'), 'main' => array('class' => 'group_social_grid'));
         if (!empty($array_html_items)) {
             $html .= Display::return_sortable_grid('items_' . $topic['id'], array(), $array_html_items, $options, $query_vars, null, $visibility, false, $style_class);
         }
     }
     return $html;
 }
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:101,代码来源:message.lib.php

示例3: array

    );
    $picture = UserManager::get_picture_user(
        $user['user_id'],
        $image_path['file'],
        80
    );
    $user['image'] = '<img src="' . $picture['file'] . '"  width="50px" height="50px"  />';

    $new_member_list[] = $user;
}
if (count($new_member_list) > 0) {
    $social_right_content .= Display::return_sortable_grid(
        'list_members',
        array(),
        $new_member_list,
        array('hide_navigation' => true, 'per_page' => 100),
        array(),
        false,
        array(true, false, true, true, false, true, true)
    );
}
$social_right_content .= '</div>';

$tpl = new Template($tool_name);
$tpl->set_help('Groups');
$tpl->assign('social_avatar_block', $social_avatar_block);
$tpl->assign('social_menu_block', $social_menu_block);
$tpl->assign('social_right_content', $social_right_content);

$social_layout = $tpl->get_template('layout/social_layout.tpl');
$tpl->display($social_layout);
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:31,代码来源:group_members.php

示例4: array

    $my_group_content = null;
    if (count($grid_my_groups) > 0) {
        $my_group_content = Display::return_sortable_grid('mygroups', array(), $grid_my_groups, array('hide_navigation' => true, 'per_page' => 2), $query_vars, false, array(true, true, true, false));
    }
    if (api_get_setting('allow_students_to_create_groups_in_social') == 'true') {
        $create_group_item = '<a class="btn btn-default" href="' . api_get_path(WEB_PATH) . 'main/social/group_add.php">' . get_lang('CreateASocialGroup') . '</a>';
    } else {
        if (api_is_allowed_to_edit(null, true)) {
            $create_group_item = '<a class="btn btn-default" href="' . api_get_path(WEB_PATH) . 'main/social/group_add.php">' . get_lang('CreateASocialGroup') . '</a>';
        }
    }
    if (count($grid_newest_groups) > 0) {
        $newest_content = Display::return_sortable_grid('mygroups', array(), $grid_newest_groups, array('hide_navigation' => true, 'per_page' => 100), $query_vars, false, array(true, true, true, false));
    }
    if (count($grid_pop_groups) > 0) {
        $popular_content = Display::return_sortable_grid('mygroups', array(), $grid_pop_groups, array('hide_navigation' => true, 'per_page' => 100), $query_vars, false, array(true, true, true, true, true));
    }
}
if (!empty($create_group_item)) {
    $social_right_content .= Display::page_subheader($create_group_item);
}
$headers = array(get_lang('Newest'), get_lang('Popular'), get_lang('MyGroups'));
$social_right_content .= Display::tabs($headers, array($newest_content, $popular_content, $my_group_content), 'tab_browse');
$show_message = null;
if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'show_message' && isset($_REQUEST['msg']) && $_REQUEST['msg'] == 'topic_deleted') {
    $show_message = Display::return_message(get_lang('Deleted'), 'success');
}
$tpl = new Template(null);
// Block Social Avatar
SocialManager::setSocialUserBlock($tpl, $user_id, $show_menu);
$show_menu = 'browse_groups';
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:31,代码来源:groups.php

示例5: get_lang

            if ($count_users_group == 1) {
                $count_users_group = $count_users_group . ' ' . get_lang('Member');
            } else {
                $count_users_group = $count_users_group . ' ' . get_lang('Members');
            }
            $picture = $usergroup->get_picture_group($group['id'], $group['picture'], 80);
            $tags = $usergroup->get_group_tags($group['id']);
            $group['picture'] = '<img class="social-groups-image" src="' . $picture['file'] . '" hspace="4" height="50" border="2" align="left" width="50" />';
            $item_0 = Display::div($group['picture'], array('class' => 'box_description_group_image'));
            $members = Display::span($count_users_group, array('class' => 'box_description_group_member'));
            $item_1 = Display::div(Display::tag('h3', $url_open . $name . $url_close) . $members, array('class' => 'box_description_group_title'));
            $item_2 = '';
            $item_3 = '';
            if ($group['description'] != '') {
                $item_3 = '<div class="box_description_group_content" >' . Text::cut($group['description'], 100, true) . '</div>';
            } else {
                $item_2 = '<div class="box_description_group_title" ><span class="social-groups-text2"></span></div>';
                $item_3 = '<div class="box_description_group_content" ></div>';
            }
            $item_4 = '<div class="box_description_group_tags" >' . $tags . '</div>';
            $item_5 = '<div class="box_description_group_actions" >' . $url_open . get_lang('SeeMore') . $url_close . '</div>';
            $grid_item_2 = $item_0 . $item_1 . $item_2 . $item_3 . $item_4 . $item_5;
            $grid_groups[] = array('', $grid_item_2);
        }
    }
    $visibility = array(true, true, true, true, true);
    $social_right_content .= Display::return_sortable_grid('mygroups', array(), $grid_groups, array('hide_navigation' => true, 'per_page' => 5), $query_vars, false, $visibility);
}
$app['title'] = $tool_name;
$tpl = $app['template'];
$tpl->assign('content', $social_right_content);
开发者ID:ragebat,项目名称:chamilo-lms,代码行数:31,代码来源:search.php

示例6: get_lang

        <div class="span3">
            <a class="profile_link" href="' . $userInfo['profile_url'] . '">' . $userInfo['complete_name'] . '</a>
            <div>' . $title . ' : ' . $content . '</div>
            <div>' . get_lang('DateSend') . ' : ' . $date . '</div>
            </div>
        </div>';
    }
}
if (count($pending_invitations) > 0) {
    $social_right_content .= Display::page_subheader(get_lang('GroupsWaitingApproval'));
    $new_invitation = array();
    foreach ($pending_invitations as $invitation) {
        $picture = $usergroup->get_picture_group($invitation['id'], $invitation['picture'], 80);
        $img = '<img class="social-groups-image" src="' . $picture['file'] . '" hspace="4" height="50" border="2" align="left" width="50" />';
        $invitation['picture'] = '<a href="groups.php?id=' . $invitation['id'] . '">' . $img . '</a>';
        $invitation['name'] = '<a href="groups.php?id=' . $invitation['id'] . '">' . Text::cut($invitation['name'], 120, true) . '</a>';
        $invitation['join'] = '<a class="btn btn-primary" href="invitations.php?accept=' . $invitation['id'] . '">' . get_lang('AcceptInvitation') . '</a>';
        $invitation['deny'] = '<a class="btn btn-danger" href="invitations.php?deny=' . $invitation['id'] . '">' . get_lang('DenyInvitation') . '</a>';
        $invitation['description'] = Text::cut($invitation['description'], 220, true);
        $new_invitation[] = $invitation;
    }
    $social_right_content .= Display::return_sortable_grid('waiting_user', array(), $new_invitation, array('hide_navigation' => true, 'per_page' => 100), array(), false, array(true, true, true, false, false, true, true, true, true));
}
$social_right_content = Display::div($social_right_content, array('class' => 'span9'));
$tpl = $app['template'];
$tpl->assign('social_left_content', $social_left_content);
$tpl->assign('social_right_content', $social_right_content);
$tpl->assign('message', $show_message);
$tpl->assign('content', $content);
$social_layout = $tpl->get_template('layout/social_layout.tpl');
$tpl->display($social_layout);
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:invitations.php

示例7: array

$results = $usergroup->get_groups_by_popularity(1, false);
$groups_pop = array();
foreach ($results as $result) {
    $result['description'] = Security::remove_XSS($result['description'], STUDENT, true);
    $result['name'] = Security::remove_XSS($result['name'], STUDENT, true);
    $id = $result['id'];
    $group_url = "groups.php?id={$id}";
    if ($result['count'] == 1) {
        $result['count'] = '1 ' . get_lang('Member');
    } else {
        $result['count'] = $result['count'] . ' ' . get_lang('Members');
    }
    $result['name'] = Display::url(api_ucwords(Text::cut($result['name'], 40, true)), $group_url) . Display::span('<br />' . $result['count'], array('class' => 'box_description_group_member'));
    $picture = $usergroup->get_picture_group($id, $result['picture'], 80);
    $result['picture_uri'] = '<img class="social-groups-image" src="' . $picture['file'] . '" hspace="10" height="44" border="2" align="left" width="44" />';
    $group_actions = '<div class="box_description_group_actions" ><a href="groups.php?#tab_browse-3">' . get_lang('SeeMore') . '</a></div>';
    $groups_pop[] = array(Display::url($result['picture_uri'], $group_url), $result['name'], Text::cut($result['description'], 120, true) . $group_actions);
}
if (count($groups_newest) > 0) {
    $social_right_content .= '<div class="social-groups-home-title">' . get_lang('Newest') . '</div>';
    $social_right_content .= Display::return_sortable_grid('home_group', array(), $groups_newest, array('hide_navigation' => true, 'per_page' => 100), array(), false, array(true, true, true, false));
}
if (count($groups_pop) > 0) {
    $social_right_content .= '<div class="social-groups-home-title">' . get_lang('Popular') . '</div>';
    $social_right_content .= Display::return_sortable_grid('home_group', array(), $groups_pop, array('hide_navigation' => true, 'per_page' => 100), array(), false, array(true, true, true, true, true));
}
$social_right_content .= '</div>';
$app['title'] = get_lang('SocialNetwork');
$tpl = $app['template'];
$tpl->assign('content', $social_right_content);
$tpl->display_one_col_template();
开发者ID:ragebat,项目名称:chamilo-lms,代码行数:31,代码来源:home.php

示例8: get_lang

                    <div class="card">
                        <div class="avatar">
                            ' . $group['picture'] . '
                        </div>
                        <div class="content">
                            ' . $item_1 . '
                            <p>' . $group['description'] . '</p>
                            <p>' . $tags . '</p>
                            <p>' . $url_open . get_lang('SeeMore') . $url_close . '</p>
                        </div>
                    </div>
                </div>';
        }
        $social_right_content .= '</ul></div></div>';
    }
    $visibility = array(true, true, true, true, true);
    $social_right_content .= Display::return_sortable_grid('groups', null, $grid_groups, array('hide_navigation' => false, 'per_page' => $itemPerPage), $query_vars, false, $visibility, true, array(), $totalGroups);
}
$tpl = new Template($tool_name);
// Block Social Avatar
SocialManager::setSocialUserBlock($tpl, $user_id, 'search');
$tpl->assign('social_menu_block', $social_menu_block);
$tpl->assign('social_right_content', $social_right_content);
$tpl->assign('search_form', $searchForm);
$formModalTpl = new Template();
$formModalTpl->assign('messageForm', MessageManager::generate_message_form('send_message'));
$formModalTpl->assign('invitationForm', MessageManager::generate_invitation_form('send_invitation'));
$formModals = $formModalTpl->fetch('default/social/form_modals.tpl');
$tpl->assign('formModals', $formModals);
$social_layout = $tpl->get_template('social/search.tpl');
$tpl->display($social_layout);
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:31,代码来源:search.php


注:本文中的Display::return_sortable_grid方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。