예제 #1
0
 // General actions for this item.
 $action_output = $delete_link->icon_link('delete') . $edit_link->icon_link();
 // Ensure we have something to display.
 $val['title'] ? $title = $val['title'] : ($title = '<span class="fixme">Untitled</span>');
 // How big should the sort input fields be?
 if ($start_sort_order + $pages_per_view < 100) {
     $field_size = 4;
 } elseif ($start_sort_order + $pages_per_view < 1000) {
     $field_size = 5;
 } elseif ($start_sort_order + $pages_per_view < 10000) {
     $field_size = 6;
 } else {
     $field_size = 7;
 }
 // Build the sort_order field.
 $form->input_number('sort_order[' . $val['id'] . ']');
 $form->value(intval($val['sort_order']));
 $form->name('sort_order[' . $val['id'] . ']');
 $form->size($field_size);
 $order = $form->paint();
 // Build the selection checkbox.
 $select = '<input type="checkbox" name="sel[' . $val['id'] . ']" value="' . $val['id'] . '"/>' . "\n";
 // Keep track of the original order values so we can
 // compare against the artist’s entries. If they’re
 // different we know they want to rearrange comic pages.
 $form->input_hidden('orig_sort_order[' . $val['id'] . ']');
 $form->value(intval($val['sort_order']));
 $form->name('orig_sort_order[' . $val['id'] . ']');
 $orig_output .= $form->paint();
 // Got a marker? Oh boy.
 if ($val['marker_id'] && $val['marker_id'] > 0) {