first import
[projectpier.git] / application / views / comment / add_comment.php
blob00e4e1428bd0b290625eaf54570b92ac7a6aab0d
1 <?php
3 set_page_title($comment->isNew() ? lang('add comment') : lang('edit comment'));
4 project_tabbed_navigation(PROJECT_TAB_OVERVIEW);
5 project_crumbs(array(
6 $comment->isNew() ? lang('add comment') : lang('edit comment')
7 )); // project_crumbs
9 ?>
10 <?php if($comment->isNew()) { ?>
11 <form action="<?php echo Comment::getAddUrl($comment_form_object) ?>" method="post">
12 <?php } else { ?>
13 <form action="<?php echo $comment->getEditUrl() ?>" method="post">
14 <?php } // if ?>
16 <?php tpl_display(get_template_path('form_errors')) ?>
18 <?php if($comment_form_object->columnExists('comments_enabled') && !$comment_form_object->getCommentsEnabled() && logged_user()->isAdministrator()) { ?>
19 <p class="error"><?php echo lang('admins can post comments on locked objects desc') ?></p>
20 <?php } // if ?>
22 <div class="formAddCommentText">
23 <?php echo label_tag(lang('text'), 'addCommentText', true) ?>
24 <?php echo textarea_field("comment[text]", array_var($comment_data, 'text'), array('class' => 'comment', 'id' => 'addCommentText')) ?>
25 </div>
27 <?php if(logged_user()->isMemberOfOwnerCompany()) { ?>
28 <fieldset>
29 <legend><?php echo lang('options') ?></legend>
31 <div class="objectOption">
32 <div class="optionLabel"><label><?php echo lang('private comment') ?>:</label></div>
33 <div class="optionControl"><?php echo yes_no_widget('comment[is_private]', 'addCommentIsPrivate', array_var($comment_data, 'is_private'), lang('yes'), lang('no')) ?></div>
34 <div class="optionDesc"><?php echo lang('private comment desc') ?></div>
35 </div>
36 </fieldset>
37 <?php } // if ?>
39 <?php if($comment->columnExists('comments_enabled') && !$comment->getCommentsEnabled() && logged_user()->isAdministrator()) { ?>
40 <p class="error"><?php echo lang('admins can post comments on locked objects desc') ?></p>
41 <?php } // if ?>
43 <?php echo submit_button($comment->isNew() ? lang('add comment') : lang('edit comment')) ?>
44 </form>