Esempio n. 1
0
$dashboardItems = '';
foreach ($__dashboard_items as $i) {
    if ($i->count() > 0) {
        $dashboardItems .= '';
        foreach ($i as $v) {
            $dashboardItems .= $v;
        }
        $dashboardItems .= '';
    }
}
# Dashboard elements
echo '<div id="dashboard-main">';
# Dashboard icons
echo '<div id="icons">';
foreach ($__dashboard_icons as $i) {
    echo '<p><a href="' . $i[1] . '"><img src="' . dc_admin_icon_url($i[2]) . '" alt="" />' . '<br /><span>' . $i[0] . '</span></a></p>';
}
echo '</div>';
if ($core->auth->user_prefs->dashboard->quickentry) {
    if ($core->auth->check('usage,contentadmin', $core->blog->id)) {
        # Getting categories
        $categories_combo = dcAdminCombos::getCategoriesCombo($core->blog->getCategories(array('post_type' => 'post')));
        echo '<div id="quick">' . '<h3>' . __('Quick entry') . sprintf(' &rsaquo; %s', $core->auth->getOption('post_format')) . '</h3>' . '<form id="quick-entry" action="' . $core->adminurl->get('admin.post') . '" method="post" class="fieldset">' . '<h4>' . __('New entry') . '</h4>' . '<p class="col"><label for="post_title" class="required"><abbr title="' . __('Required field') . '">*</abbr> ' . __('Title:') . '</label>' . form::field('post_title', 20, 255, '', 'maximal') . '</p>' . '<p class="area"><label class="required" ' . 'for="post_content"><abbr title="' . __('Required field') . '">*</abbr> ' . __('Content:') . '</label> ' . form::textarea('post_content', 50, 10) . '</p>' . '<p><label for="cat_id" class="classic">' . __('Category:') . '</label> ' . form::combo('cat_id', $categories_combo) . '</p>' . ($core->auth->check('categories', $core->blog->id) ? '<div>' . '<p id="new_cat" class="q-cat">' . __('Add a new category') . '</p>' . '<p class="q-cat"><label for="new_cat_title">' . __('Title:') . '</label> ' . form::field('new_cat_title', 30, 255, '', '') . '</p>' . '<p class="q-cat"><label for="new_cat_parent">' . __('Parent:') . '</label> ' . form::combo('new_cat_parent', $categories_combo, '', '') . '</p>' . '<p class="form-note info clear">' . __('This category will be created when you will save your post.') . '</p>' . '</div>' : '') . '<p><input type="submit" value="' . __('Save') . '" name="save" /> ' . ($core->auth->check('publish', $core->blog->id) ? '<input type="hidden" value="' . __('Save and publish') . '" name="save-publish" />' : '') . $core->formNonce() . form::hidden('post_status', -2) . form::hidden('post_format', $core->auth->getOption('post_format')) . form::hidden('post_excerpt', '') . form::hidden('post_lang', $core->auth->getInfo('user_lang')) . form::hidden('post_notes', '') . '</p>' . '</form>' . '</div>';
    }
}
foreach ($__dashboard_contents as $i) {
    if ($i->count() > 0) {
        $dashboardContents .= '';
        foreach ($i as $v) {
            $dashboardContents .= $v;
        }
Esempio n. 2
0
 protected function itemDef($title, $url, $img, $active, $id = null, $class = null)
 {
     if (is_array($url)) {
         $link = $url[0];
         $ahtml = !empty($url[1]) ? ' ' . $url[1] : '';
     } else {
         $link = $url;
         $ahtml = '';
     }
     $img = dc_admin_icon_url($img);
     return '<li' . ($active || $class ? ' class="' . ($active ? 'active ' : '') . ($class ? $class : '') . '"' : '') . ($id ? ' id="' . $id . '"' : '') . ($img ? ' style="background-image: url(' . $img . ');"' : '') . '>' . '<a href="' . $link . '"' . $ahtml . '>' . $title . '</a></li>' . "\n";
 }
Esempio n. 3
0
        return 0;
    }
    return $a['title'] < $b['title'] ? -1 : 1;
}
uasort($avail_fav, 'cmp');
foreach ($avail_fav as $k => $v) {
    if (in_array($k, $user_fav)) {
        unset($avail_fav[$k]);
    }
}
foreach ($avail_fav as $k => $fav) {
    if ($count == 0) {
        echo '<ul class="fav-list">';
    }
    $count++;
    echo '<li id="fa-' . $k . '">' . '<label for="fak-' . $k . '">' . '<img src="' . dc_admin_icon_url($fav['small-icon']) . '" alt="" /> ' . '<span class="zoom"><img src="' . dc_admin_icon_url($fav['large-icon']) . '" alt="" /></span>' . form::checkbox(array('append[]', 'fak-' . $k), $k) . $fav['title'] . '</label>' . (isset($default_fav_ids[$k]) ? ' <span class="default-fav"><img src="images/selected.png" alt="' . __('(default favorite)') . '" /></span>' : '') . '</li>';
}
if ($count > 0) {
    echo '</ul>';
}
echo '<p>' . $core->formNonce() . '<input type="submit" name="appendaction" value="' . __('Add to my favorites') . '" /></p>';
echo '</div>';
# /available favorites
echo '</form>';
echo '<form action="' . $core->adminurl->get("admin.user.preferences") . '" method="post" id="db-forms" class="two-boxes even">' . '<div class="fieldset">' . '<h4>' . __('Menu') . '</h4>' . '<p><label for="user_ui_nofavmenu" class="classic">' . form::checkbox('user_ui_nofavmenu', 1, !$user_ui_nofavmenu) . ' ' . __('Display favorites at the top of the menu') . '</label></p></div>';
if (count($iconsets_combo) > 1) {
    echo '<div class="fieldset">' . '<h4>' . __('Dashboard icons') . '</h4>' . '<p><label for="user_ui_iconset" class="classic">' . __('Iconset:') . '</label> ' . form::combo('user_ui_iconset', $iconsets_combo, $user_ui_iconset) . '</p>' . '</div>';
} else {
    echo '<p class="hidden">' . form::hidden('user_ui_iconset', '') . '</p>';
}
echo '<div class="fieldset">' . '<h4>' . __('Dashboard modules') . '</h4>' . '<p><label for="user_dm_doclinks" class="classic">' . form::checkbox('user_dm_doclinks', 1, $user_dm_doclinks) . ' ' . __('Display documentation links') . '</label></p>' . '<p><label for="user_dm_dcnews" class="classic">' . form::checkbox('user_dm_dcnews', 1, $user_dm_dcnews) . ' ' . __('Display Dotclear news') . '</label></p>' . '<p><label for="user_dm_quickentry" class="classic">' . form::checkbox('user_dm_quickentry', 1, $user_dm_quickentry) . ' ' . __('Display quick entry form') . '</label><br class="clear" />' . '</p>';