$link-> title = 'Add a marker';
$link-> url = 'marker.create.php';
$link-> tap = 'Do something about that';

if ( !$book-> markerList && $book-> pageList ) {
	$alert_output .= $message->info_dialog('Hmm, no chapters here. '.$link-> paint().'.');
}
elseif ( !$book-> markerList && !$book-> pageList ) {
	$alert_output .= $message->info_dialog('Hmm, no chapters here. No pages either. <a href="marker.create.php">Do something about that</a>.');
}
*/
if (!$book->pageList) {
    $link->title('Add a set of pages');
    $link->url('book.pages-create.php');
    $link->tap('Do something about that');
    $alert_output .= $message->info_dialog('Hmm, no pages here. ' . $link->text_link() . '.');
}
///// Display the list
if ($book->pageList) {
    $edit_link = new GrlxLinkStyle();
    $edit_link->url('book.page-edit.php');
    $edit_link->title('Edit page info.');
    $edit_link->reveal(false);
    $edit_link->action('edit');
    $delete_link = new GrlxLinkStyle();
    $delete_link->url('book.view.php');
    $delete_link->title('Delete page.');
    $delete_link->reveal(false);
    $delete_link->action('edit');
    $marker_link = new GrlxLinkStyle();
    $marker_link->url('book.view.php');
\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>
EOL;
    }
    $page_list_output .= '</ul>' . "\n";
}
$view->page_title('Static pages');
$view->tooltype('sttc');
$view->headline('Static pages');
$link->url('site.nav.php');
$link->tap('Edit order and URLs');
$action_output = $link->text_link('menu');
$link->url('sttc.xml-new.php');
$link->tap('New page');
$action_output .= $link->button_secondary('new');
$view->action($action_output);
/*****
 * Display
 */
$output = $view->open_view();
$output .= $view->view_header();
$output .= $modal->modal_container();
$output .= $alert_output;
print $output;
?>
	<section class="sttc">
<?php 
    $form_output .= $form->close_form();
} else {
    $form_output = <<<EOL
\t<div class="panel">
\t\t<h3>No tone options</h3>
\t\t<p>This theme does not contain panel-editable options. You’ll have to edit the CSS directly.</p>
\t</div>
EOL;
}
$view->page_title("Theme: {$theme_info['title']}");
$view->tooltype('tone');
$view->prepend_stylesheet('spectrum.css');
$view->headline("Theme <span>{$theme_info['title']}</span>");
$link->url('site.theme-manager.php');
$link->tap('Back to list');
$action_output = $link->text_link('back');
$view->action($action_output);
$view->meta_css('theme');
$view->meta_preview('<img src="http://placehold.it/500x100/ccc/000.png&text=preview_image" />');
$view->meta_info_list($meta_list);
$meta_output = $view->format_meta() . '<hr />';
/*****
 * Display
 */
$output = $view->open_view();
$output .= $view->view_header();
$output .= $alert_output;
$output .= $modal->modal_container();
$output .= $meta_output;
$output .= $form_output;
print $output;
$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();
}
// Get default book id
$book = new GrlxComicBook();
$book_id = $book->bookID;
$book_title = $book->info['title'];
// Get static home page id
$result = $db->where('title', 'Home')->getOne('static_page', 'id');
$static_id = $result['id'];
// Get current home reference
$cols = array('id,rel_type,rel_id');
$home = $db->where('url', '/')->getOne('path', $cols);
$current_home = $home['rel_type'] . '-' . $home['rel_id'];
if ($home['rel_type'] == 'static') {
    $link->url('sttc.xml-edit.php?page_id=' . $static_id);
    $link->tap('Edit home page');
    $edit_home = $link->text_link('editmeta');
}
// Site homepage settings
if ($home && $book_id && $static_id) {
    $home_instruction = 'Your site’s home can display the latest comic or a static page.';
    $home_list[] = array('id' => 'book-' . $book_id, 'title' => 'Latest page of “' . $book_title . '”');
    $home_list[] = array('id' => 'static-' . $static_id, 'title' => 'Static home page');
    $sl->setName('homepage');
    $sl->setList($home_list);
    $sl->setCurrent($current_home);
    $sl->setValueID('id');
    $sl->setValueTitle('title');
    $home_options = $sl->buildSelect();
    $home_output = '<div class="row form config">';
    $home_output .= '<div><label for="home-id">Homepage</label></div>';
    $home_output .= '<div>' . $home_options . '</div>';
示例#6
0
            $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');
$view->headline('Main menu');
$link->url('sttc.xml-new.php');
$link->tap('New page');
$action_output = $link->text_link('static');
$link->url('site.nav-edit.ajax.php');
$link->reveal(true);
$link->query('edit_id=new');
$link->title = 'External links go to other websites — like those you enjoy reading soooo much you just have to share it with your readers.';
$link->tap('New external link');
$action_output .= $link->button_secondary('new');
$view->action($action_output);
$heading_list[] = array('value' => 'Title', 'class' => null);
$heading_list[] = array('value' => 'URL', 'class' => null);
$heading_list[] = array('value' => 'In menu', 'class' => null);
$heading_list[] = array('value' => 'Actions', 'class' => null);
$list->headings($heading_list);
$list->content($list_items);
$display_output = $list->format_headings();
$display_output .= $list->format_content();