Ejemplo n.º 1
0
        ?>
</td>
			<td><?php 
        echo $post->depth_of_water_max;
        ?>
</td>
			<td><?php 
        echo $post->dive_time;
        ?>
 min</td>
			<td><?php 
        echo Model_Lookup::item('post_weather', $post->weather);
        ?>
</td>
			<td><?php 
        echo Model_Lookup::item('post_status', $post->status);
        ?>
</td>
			<td>
				<?php 
        echo Html::anchor('admin/posts/view/' . $post->id, 'View');
        ?>
 |
				<?php 
        echo Html::anchor('admin/posts/edit/' . $post->id, 'Edit');
        ?>
 |
				<?php 
        echo Html::anchor('admin/posts/delete/' . $post->id, 'Delete', array('onclick' => "return confirm('Are you sure?')"));
        ?>
Ejemplo n.º 2
0
 protected function _fieldset()
 {
     $zentohan = function ($fieldset) {
         return mb_convert_kana($fieldset, 'a');
     };
     $fieldset = ViewForm\Fieldset::forge();
     $fieldset->add_text('serial_dive_no', __('serial_dive_no'), array('value' => Model_Post::get_last_serial_dive_no($this->current_user->id)))->add_rule($zentohan)->add_rule('valid_string', 'numeric')->add_rule('max_length', 255);
     $fieldset->add_text('date', __('date'))->add_rule('required')->add_rule($zentohan)->add_rule('max_length', 10);
     $fieldset->add_text('location', __('location'))->add_rule($zentohan)->add_rule('max_length', 255);
     $fieldset->add_text('point', __('point'))->add_rule($zentohan)->add_rule('max_length', 255);
     $fieldset->add_select('point_type', __('point_type'), Model_Lookup::items('post_point_type'))->add_rule('max_length', 8);
     $fieldset->add_text('diving_shop', __('diving_shop'))->add_rule($zentohan)->add_rule('max_length', 255);
     $fieldset->add_text('entry', __('entry'))->add_rule($zentohan)->add_rule('match_pattern', '/^(0[0-9]{1}|1{1}[0-9]{1}|2{1}[0-3]{1}):(0[0-9]{1}|[1-5]{1}[0-9]{1})$/')->add_rule('max_length', 5);
     $fieldset->add_text('pressure_start', __('entry'))->add_rule($zentohan)->add_rule('valid_string', 'numeric')->add_rule('max_length', 8);
     $fieldset->add_text('exit', __('exit'))->add_rule($zentohan)->add_rule('match_pattern', '/^(0[0-9]{1}|1{1}[0-9]{1}|2{1}[0-3]{1}):(0[0-9]{1}|[1-5]{1}[0-9]{1})$/')->add_rule('max_length', 5);
     $fieldset->add_text('pressure_end', __('exit'))->add_rule($zentohan)->add_rule('valid_string', 'numeric')->add_rule('max_length', 8);
     $fieldset->add_text('depth_of_water_ave', __('depth_of_water_ave'))->add_rule($zentohan)->add_rule('valid_string', 'float')->add_rule('max_length', 8);
     $fieldset->add_text('depth_of_water_max', __('depth_of_water_max'))->add_rule($zentohan)->add_rule('valid_string', 'float')->add_rule('max_length', 8);
     $fieldset->add_text('water_temp_bottom', __('water_temp_bottom'))->add_rule($zentohan)->add_rule('valid_string', 'float')->add_rule('max_length', 8);
     $fieldset->add_text('air_temp', __('air_temp'))->add_rule($zentohan)->add_rule('valid_string', 'float')->add_rule('max_length', 8);
     $fieldset->add_select('weather', __('weather'), Model_Lookup::items('post_weather'))->add_rule('max_length', 8);
     $fieldset->add_select('suit', __('suit'), Model_Lookup::items('post_suit'))->add_rule('max_length', 8);
     $fieldset->add_text('suit_thickness', __('suit'))->add_rule($zentohan)->add_rule('valid_string', 'numeric')->add_rule('max_length', 8);
     $fieldset->add_text('weight', __('weight'))->add_rule($zentohan)->add_rule('valid_string', 'float')->add_rule('max_length', 8);
     $fieldset->add_select('tank', __('tank'), Model_Lookup::items('post_tank'))->add_rule('max_length', 8);
     $fieldset->add_text('tank_cap', __('tank_cap'))->add_rule($zentohan)->add_rule('valid_string', 'numeric')->add_rule('max_length', 8);
     $fieldset->add_text('visibility', __('visibility'))->add_rule($zentohan)->add_rule('max_length', 255);
     /*
                 $fieldset->add_text('buddy', 'Buddy')
                 ->add_rule('max_length', 255);
     
                 $fieldset->add_text('instructor_and_guide', 'Instructor And Guide')
                 ->add_rule('max_length', 255);
     */
     $fieldset->add_textarea('report', __('report'))->add_rule($zentohan)->add_rule('max_length', 9999);
     $fieldset->add_textarea('comment', __('comment'))->add_rule($zentohan)->add_rule('strip_tags')->add_rule('max_length', 9999);
     $fieldset->add_select('status', __('status'), Model_Lookup::items('post_status', false))->add_rule('max_length', 8);
     return $fieldset;
 }
Ejemplo n.º 3
0
            <?php 
}
?>

            <?php 
$key = 'tank';
?>
            <?php 
if ($post->{$key}) {
    ?>
            <li class="span2">
            <span class="label"><?php 
    echo __($key);
    ?>
</span><p><?php 
    echo Model_Lookup::item('post_tank', $post->{$key});
    ?>
            <?php 
    if ($post->tank_cap) {
        echo $post->tank_cap;
        ?>
 L<?php 
    }
    ?>
            </p>
            </li>
            <?php 
}
?>

            <?php 
Ejemplo n.º 4
0
<div class="control-group">
    <?php 
echo Form::label('Comment', 'comment', array('class' => 'control-label'));
?>

    <div class="controls">
        <?php 
echo Form::textarea('comment', Input::post('comment', isset($post) ? $post->comment : ''), array('class' => 'span8', 'rows' => 8));
?>

    </div>
</div>
<div class="control-group">
    <?php 
echo Form::label('Status', 'status', array('class' => 'control-label'));
?>

    <div class="controls">
        <?php 
echo Form::select('status', Input::post('status', isset($post) ? $post->status : ''), Model_Lookup::items('post_status', false), array('class' => 'span4'));
?>
    </div>
</div>
<div class="form-actions">
    <?php 
echo Form::submit('submit', 'Save', array('class' => 'btn btn-primary'));
?>

</div>
<?php 
echo Form::close();