コード例 #1
0
$delete_link->action('delete');
$edit_link = new GrlxLinkStyle();
$edit_link->url('site.link-edit.ajax.php');
$edit_link->reveal(true);
$edit_link->action('edit');
// Fetch the link list
$cols = array('title', 'url', 'sort_order', 'img_path', 'id');
$result = $db->orderBy('sort_order', 'ASC')->get('link_list', NULL, $cols);
if ($db->count > 0) {
    foreach ($result as $item) {
        if ($item['img_path']) {
            $icon = '<img src="' . $item['img_path'] . '" alt="icon" />';
        } else {
            $icon = '';
        }
        $delete_link->id("id-{$item['id']}");
        $action_output = $delete_link->icon_link();
        $edit_link->query("edit_id={$item['id']}");
        $action_output .= $edit_link->icon_link();
        $list_items[$item['id']] = array($icon . ' ' . $item['title'], $item['url'], $action_output);
    }
}
$alert_output .= $fileops->check_or_make_dir('..' . $image_path);
$view->page_title('Link list');
$view->tooltype('link');
$view->headline('Link list');
if ($list_items) {
    $list->headings(array('Title', 'URL', 'Actions'));
    $list->content($list_items);
    $links_output = $list->format_headings();
    $links_output .= $list->format_content();
コード例 #2
0
            $link->query('start_sort_order=' . $i);
            $pagination[] = $link->paint();
        }
    }
    $pagination_output = '<br/><p>Jump to ' . implode(', ', $pagination) . '</p>' . "\n";
    $pagination_output .= '<input type="hidden" name="start_sort_order" value="' . $start_sort_order . '"/>';
}
/*****
 * Display
 */
$view->page_title('Book: ' . $book->info['title']);
$view->tooltype('book');
$view->headline('Book <span>' . $book->info['title'] . '</span>');
$link->url('book.edit.php?book_id=' . $book_id);
$link->tap('Edit comic info');
$link->id('edit-comic-info');
$action_output = $link->text_link('editmeta');
/*
$link->url('marker.create.php');
$link->tap('Add pages');
$link->reveal(false);
$action_output .= $link->button_secondary('new');
*/
$view->action($action_output);
/*
$view->group_h2('New pages');
$view->group_instruction('INSTRUCTIONS GO HERE');
$view->group_contents($new_pages_output);
$content_output .= $view->format_group().'<hr/>';
*/
/*
コード例 #3
0
}
if ($page_list) {
    $page_list_output = '<ul class="small-block-grid-2 medium-block-grid-3 large-block-grid-4">' . "\n";
    foreach ($page_list as $key => $val) {
        if ($val['edit_path'] == 1) {
            $title = urlencode($val['title']);
            $delete_link = new GrlxLinkStyle();
            $delete_link->url('sttc.page-delete.ajax.php');
            $delete_link->title('Delete this page.');
            $delete_link->reveal(true);
            $delete_link->query("id={$val['id']}&amp;title={$title}");
            $this_action = $delete_link->icon_link('delete');
        } else {
            $delete_link = new GrlxLinkStyle();
            $delete_link->i_only(true);
            $delete_link->id();
            $this_action = $delete_link->icon_link('locked');
        }
        $page_list_output .= <<<EOL
\t\t<li id="page-{$val['id']}">
\t\t<div class="page sttc">
\t\t\t<a href="sttc.xml-edit.php?page_id={$val['id']}">
\t\t\t\t<h3>{$val['title']}</h3>
\t\t\t\t<p>{$val['preview']}</p>
\t\t\t</a>
\t\t\t{$this_action}
\t\t\t<a class="edit" href="sttc.xml-edit.php?page_id={$val['id']}">
\t\t\t\t<i class="edit"></i>
\t\t\t</a>
\t\t</div>
\t\t</li>
コード例 #4
0
$edit_form_output .= '<form accept-charset="UTF-8" action="marker.edit.php" method="post">' . "\n";
$edit_form_output .= '	<p><label for="new_title">Title</label>' . "\n";
$edit_form_output .= '	<input type="text" id="new_title" name="new_title" size="12" style="width:12rem" value="' . $marker->markerInfo['title'] . '"/></p>' . "\n";
$edit_form_output .= '	<label for="edit_marker_type">Type</label>' . "\n";
$edit_form_output .= $select_options . "\n";
$edit_form_output .= '	<button class="btn primary save" name="submit" type="submit" value="save"><i></i>Save</button>' . "\n";
$edit_form_output .= '	<input type="hidden" name="marker_id" value="' . $marker_id . '"/>' . "\n";
$edit_form_output .= '</form>' . "\n";
// ! Build the overall view
$view->page_title('Marker: ' . $marker->markerInfo['title']);
$view->tooltype('chap');
$view->headline('Marker <span>' . $marker->markerInfo['title'] . '</span>');
$view->group_h2('General info');
$view->group_instruction('Change this marker’s name and type.');
$view->group_contents($edit_form_output);
$content_output .= $view->format_group();
// Let artists jump to the marker type manager
// from here because it’s contextual.
$link1->url('marker-type.list.php');
$link1->tap('Edit marker types');
$link1->id('edit-types');
$action_output = $link1->text_link('editmeta');
$view->action($action_output);
// ! Display
$output = $view->open_view();
$output .= $view->view_header();
$output .= $alert_output;
$output .= $content_output;
$output .= $view->close_view();
print $output;
print $view->close_view();
コード例 #5
0
    $list->row_class('menu');
    $list->sort_by('menu');
    $list->draggable(true);
    $form->title('Show/hide this item in the site menu.');
    $vis_link = new GrlxLinkStyle();
    $vis_link->i_only(true);
    $edit_link = new GrlxLinkStyle();
    $edit_link->url('site.nav-edit.ajax.php');
    $edit_link->title('Change this item’s tappable text or destination URL.');
    $edit_link->reveal(true);
    $edit_link->action('edit');
    foreach ($nav_item as $item) {
        $edit_link->query("edit_id={$item['id']}");
        if ($item['rel_type'] == 'external') {
            $vis_link->action('delete');
            $vis_link->id("delete-{$item['id']}");
            $vis_link->title('Delete this link from your site’s menu.');
            $vis_output = $vis_link->icon_link();
        } else {
            $form->id("id-{$item['id']}");
            $vis_output = $form->checkbox_switch($item['in_menu']);
        }
        //		$action_output = $edit_link->icon_link();
        if (isset($dupes) && in_array($item['url'], $dupes)) {
            $item['url'] = '<span class="fixme">' . $item['url'] . '</span>';
        }
        $list_items[$item['id'] . '||' . $item['in_menu']] = array($item['title'], $item['url'], $vis_output, $edit_link->icon_link());
    }
}
$view->page_title('Main menu');
$view->tooltype('menu');
コード例 #6
0
 /*
 	$heading_list[] = array(
 		'value' => 'Select',
 		'class' => null
 	);
 */
 $heading_list[] = array('value' => ' ', 'class' => null);
 $heading_list[] = array('value' => 'Title', 'class' => null);
 $heading_list[] = array('value' => 'Page number', 'class' => null);
 $heading_list[] = array('value' => 'Date', 'class' => null);
 $heading_list[] = array('value' => 'Actions', 'class' => null);
 $list->headings($heading_list);
 $pages_displayed = 0;
 foreach ($marker->pageList as $key => $val) {
     $page = new GrlxComicPage($val['id']);
     $delete_link->id("id-{$key}");
     $edit_link->query("page_id={$key}");
     $actions = $delete_link->icon_link('delete') . $edit_link->icon_link();
     /*
     		$link->url('book.page-edit.php');
     		$link->query('page_id='.$key);
     		$link->tap(qty('page',$val['page_count']));
     		$pg_label = $link->arrow_link();
     */
     $link_output = $link->icon_link('edit');
     $val['title'] ? $title = $val['title'] : ($title = '<span class="error">Untitled</span>');
     $select = '<input type="checkbox" name="sel[' . $key . ']" value="' . $key . '"/>' . "\n";
     $list_items[$key] = array('select' => '&nbsp;', 'title' => $title, 'sort_order' => '<input type="number" name="new_sort_order[' . $key . ']" value="' . intval($val['sort_order']) . '" style="width:3rem"/>', 'date' => format_date($val['date_publish']), 'action' => $actions);
     $orig_output .= '<input type="hidden" name="orig_sort_order[' . $key . ']" value="' . $val['sort_order'] . '"/>' . "\n";
     $pages_displayed++;
 }