예제 #1
0
function link_to_login($name, $uri = null)
{
    use_helper('Javascript');
    if ($uri && sfContext::getInstance()->getUser()->isAuthenticated()) {
        return link_to($name, $uri);
    } else {
        return link_to_function($name, visual_effect('blind_down', 'login', array('duration' => 0.5)));
    }
}
예제 #2
0
function link_to_publish($event)
{
    if ($event->getPublished()) {
        $publish = "Published";
    } else {
        $publish = "Publish";
    }
    return link_to_remote($publish, array('url' => 'event/publish?id=' . $event->getId(), 'update' => array('success' => 'publish'), 'loading' => "Element.show('published_indicator')", 'complete' => "Element.hide('published_indicator');" . visual_effect('highlight', 'publish_button')));
}
예제 #3
0
function link_to_user_interested($user, $question)
{
    if ($user->isAuthenticated()) {
        $interested = InterestPeer::retrieveByPk($question->getId(), $user->getSubscriberId());
        if ($interested) {
            // already interested
            return __('interested!');
        } else {
            // didn't declare interest yet
            return link_to_remote(__('interested?'), array('url' => 'user/interested?id=' . $question->getId(), 'update' => array('success' => 'block_' . $question->getId()), 'loading' => "Element.show('indicator')", 'complete' => "Element.hide('indicator');" . visual_effect('pulsate', 'mark_' . $question->getId())));
        }
    } else {
        return link_to_login(__('interested?'));
    }
}
예제 #4
0
function sf_simple_cms_slot($page, $slot, $default_text = null, $default_type = 'Text')
{
    $context = sfContext::getInstance();
    $request = $context->getRequest();
    $culture = $request->getAttribute('culture');
    $slot_object = $page->getSlot($slot, constant(sfConfig::get('app_sfSimpleCMS_escaping_strategy', 'ESC_RAW')));
    if (!$slot_object) {
        $slot_object = new sfSimpleCMSSlot();
        $slot_object->setType($default_type);
        $slot_object->setCulture($culture);
    }
    $slot_value = $slot_object->getValue();
    $slot_type_name = $slot_object->getType();
    $slot_type_class = 'sfSimpleCMSSlot' . $slot_type_name;
    $slot_type = new $slot_type_class();
    if ($request->getParameter('edit') == 'true' && !$request->getParameter('preview')) {
        echo '<div class="editable_slot" title="' . __('Double-click to edit') . '" id="slot_' . $slot . '" onDblClick="Element.show(\'edit_' . $slot . '\');Element.hide(\'slot_' . $slot . '\');">';
        if ($slot_value) {
            // Get slot value from the slot type object
            echo $slot_type->getSlotValue($slot_object);
        } else {
            // default text
            echo $default_text ? $default_text : sfConfig::get('app_sfSimpleCMS_default_text', __('[add text here]'));
        }
        echo '</div>';
        echo form_remote_tag(array('url' => 'sfSimpleCMS/updateSlot', 'script' => 'true', 'update' => 'slot_' . $slot, 'success' => 'Element.show(\'slot_' . $slot . '\');
                        Element.hide(\'edit_' . $slot . '\');
                       ' . visual_effect('highlight', 'slot_' . $slot)), array('class' => 'edit_slot', 'id' => 'edit_' . $slot, 'style' => 'display:none'));
        echo input_hidden_tag('slug', $page->getSlug(), 'id=edit_path' . $slot);
        echo input_hidden_tag('slot', $slot);
        if (sfConfig::get('app_sfSimpleCMS_use_l10n', false)) {
            echo input_hidden_tag('sf_culture', $slot_object->getCulture());
        }
        // Get slot editor from the slot type object
        echo $slot_type->getSlotEditor($slot_object);
        echo label_for('slot_type', __('Type: '));
        echo select_tag('slot_type', options_for_select(sfConfig::get('app_sfSimpleCMS_slot_types', array('Text' => __('Simple Text'), 'RichText' => __('Rich text'), 'Php' => __('PHP code'), 'Image' => __('Image'), 'Modular' => __('List of partials/components'))), $slot_type_name));
        if ($rich = sfConfig::get('app_sfSimpleCMS_rich_editing', false)) {
            // activate rich text if global rich_editing is true and is the current slot is RichText
            $rich = $slot_type_name == 'RichText';
        }
        echo submit_tag('update', array('onclick' => $rich ? 'tinymceDeactivate()' . ';submitForm(\'edit_' . $slot . '\'); return false' : '', 'class' => 'submit_tag'));
        echo button_to_function('cancel', 'Element.hide(\'edit_' . $slot . '\');Element.show(\'slot_' . $slot . '\');', 'class=submit_tag');
        echo '</form>';
    } else {
        echo $slot_type->getSlotValue($slot_object);
    }
}
예제 #5
0
function link_to_report_answer($answer, $user)
{
    use_helper('Javascript');
    $text = '[' . __('report to moderator') . ']';
    if ($user->isAuthenticated()) {
        $has_already_reported_answer = ReportAnswerPeer::retrieveByPk($answer->getId(), $user->getSubscriberId());
        if ($has_already_reported_answer) {
            // already spam for this user
            return '[' . __('reported as spam') . ']';
        } else {
            return link_to_remote($text, array('url' => '@user_report_answer?id=' . $answer->getId(), 'update' => array('success' => 'report_answer_' . $answer->getId()), 'loading' => "Element.show('indicator')", 'complete' => "Element.hide('indicator');" . visual_effect('highlight', 'report_answer_' . $answer->getId())));
        }
    } else {
        return link_to_login($text);
    }
}
/**
 * Return the HTML code for an unordered list showing opinions that can be voted
 * If the user has already voted, then a message appears
 * 
 * @param  BaseObject  $object   Propel object instance to vote
 * @param  string      $domid    unique css identifier for the block (div) containing the voter tool
 * @param  string      $message  a message string to be displayed in the voting-message block
 * @param  array       $options  Array of HTML options to apply on the HTML list
 * @return string
 **/
function depp_voter($object, $domid = 'depp-voter-block', $message = '', $options = array())
{
    if (is_null($object)) {
        sfLogger::getInstance()->debug('A NULL object cannot be voted');
        return '';
    }
    $user_id = deppPropelActAsVotableBehaviorToolkit::getUserId();
    // anonymous votes
    if ((is_null($user_id) || $user_id == '') && !$object->allowsAnonymousVoting()) {
        return __('Anonymous voting is not allowed') . ", " . __('please') . " " . link_to('login', '/login');
    }
    try {
        $voting_range = $object->getVotingRange();
        $options = _parse_attributes($options);
        if (!isset($options['id'])) {
            $options = array_merge($options, array('id' => 'voting-items'));
        }
        if ($object instanceof sfOutputEscaperObjectDecorator) {
            $object_class = get_class($object->getRawValue());
        } else {
            $object_class = get_class($object);
        }
        $object_id = $object->getReferenceKey();
        $token = deppPropelActAsVotableBehaviorToolkit::addTokenToSession($object_class, $object_id);
        // already voted
        if ($object->hasBeenVotedByUser($user_id)) {
            $message .= "&nbsp;" . link_to_remote(__('Take your vote back'), array('url' => sprintf('deppVoting/unvote?domid=%s&token=%s', $domid, $token), 'update' => $domid, 'script' => true, 'complete' => visual_effect('appear', $domid) . visual_effect('highlight', $domid)));
        }
        $list_content = '';
        for ($i = -1 * $voting_range; $i <= $voting_range; $i++) {
            if ($i == 0 && !$object->allowsNeutralPosition()) {
                continue;
            }
            $text = sprintf("[%d]", $i);
            $label = sprintf(__('Vote %d!'), $i);
            if ($object->hasBeenVotedByUser($user_id) && $object->getUserVoting($user_id) == $i) {
                $list_content .= content_tag('li', $text);
            } else {
                $list_content .= '  <li>' . link_to_remote($text, array('url' => sprintf('deppVoting/vote?domid=%s&token=%s&voting=%d', $domid, $token, $i), 'update' => $domid, 'script' => true, 'complete' => visual_effect('appear', $domid) . visual_effect('highlight', $domid)), array('title' => $label)) . '</li>';
            }
        }
        $results = get_component('deppVoting', 'votingDetails', array('object' => $object));
        return content_tag('ul', $list_content, $options) . content_tag('div', $message, array('id' => 'voting-message')) . content_tag('div', $results, array('id' => 'voting-results'));
    } catch (Exception $e) {
        sfLogger::getInstance()->err('Exception catched from sf_rater helper: ' . $e->getMessage());
    }
}
/**
 * Return the HTML code for a unordered list showing rating stars
 * 
 * @param  BaseObject  $object  Propel object instance
 * @param  array       $options        Array of HTML options to apply on the HTML list
 * @throws sfPropelActAsRatableException
 * @return string
 **/
function sf_rater($object, $options = array())
{
    if (is_null($object)) {
        sfLogger::getInstance()->debug('A NULL object cannot be rated');
    }
    if (!isset($options['star-width'])) {
        $star_width = sfConfig::get('app_rating_star_width', 25);
    } else {
        $star_width = $options['star-width'];
        unset($options['star-width']);
    }
    try {
        $max_rating = $object->getMaxRating();
        $actual_rating = $object->getRating();
        $bar_width = $actual_rating * $star_width;
        $options = _parse_attributes($options);
        if (!isset($options['class'])) {
            $options = array_merge($options, array('class' => 'star-rating'));
        }
        if (!isset($options['style']) or !preg_match('/width:/i', $options['style'])) {
            $full_bar_width = $max_rating * $star_width;
            $options = array_merge($options, array('style' => 'width:' . $full_bar_width . 'px'));
        }
        if ($object instanceof sfOutputEscaperObjectDecorator) {
            $object_class = get_class($object->getRawValue());
        } else {
            $object_class = get_class($object);
        }
        $object_id = $object->getReferenceKey();
        $token = sfPropelActAsRatableBehaviorToolkit::addTokenToSession($object_class, $object_id);
        $msg_domid = sprintf('rating_message_%s', $token);
        $bar_domid = sprintf('current_rating_%s', $token);
        $list_content = '  <li class="current-rating" id="' . $bar_domid . '" style="width:' . $bar_width . 'px;">';
        $list_content .= sprintf(__('Currently rated %d star(s) on %d'), $object->getRating(), $max_rating);
        $list_content .= '  </li>';
        for ($i = 1; $i <= $max_rating; $i++) {
            $label = sprintf(__('Rate it %d stars'), $i);
            $list_content .= '  <li>' . link_to_remote($label, array('url' => sprintf('sfRating/rate?token=%s&rating=%d&star_width=%d', $token, $i, $star_width), 'update' => $msg_domid, 'script' => true, 'complete' => visual_effect('appear', $msg_domid) . visual_effect('highlight', $msg_domid)), array('class' => 'r' . $i . 'stars', 'title' => $label)) . '</li>';
        }
        return content_tag('ul', $list_content, $options) . content_tag('div', null, array('id' => $msg_domid));
    } catch (Exception $e) {
        sfLogger::getInstance()->err('Exception catched from sf_rater helper: ' . $e->getMessage());
    }
}
예제 #8
0
echo input_tag('nickname');
?>
      <label for="password"><?php 
echo __('password:'******'password');
?>
      <?php 
echo input_hidden_tag('referer', $sf_params->get('referer') ? $sf_params->get('referer') : $sf_request->getUri());
?>
      <?php 
echo submit_tag(__('login'));
?>
      <?php 
echo link_to_function(__('cancel'), visual_effect('blind_up', 'login', array('duration' => 0.5)));
?>
    </form>
  </div>

  <div id="content">
    <div id="content_main">
      <?php 
echo $content;
?>
      <div class="verticalalign"></div>
    </div>

    <div id="content_bar">
      <div class="topbar"></div>
      <?php 
예제 #9
0
        $answers = $sf_poll->getsfPollAnswers();
        ?>

    <ul id="answers">
    <?php 
        foreach ($answers as $answer) {
            ?>
      <?php 
            include_partial('sfPollsAdmin/li_answer', array('answer' => $answer, 'edit_links' => $count_user_answers == 0));
            ?>
    <?php 
        }
        ?>
    </ul>
    <?php 
        if (count($answers) == 0) {
            ?>
      <p>No answer for this poll yet.</p>
    <?php 
        }
        ?>
    <?php 
        echo button_to_remote('Add a possible answer to this poll', array('url' => 'sfPollsAdmin/addAnswer?poll_id=' . $sf_poll->getId(), 'with' => "'answer_text=' + escape(prompt('Enter answer text'))", 'update' => 'answers', 'position' => 'bottom', 'complete' => visual_effect('highlight', 'answers')));
        ?>
  <?php 
    }
} else {
    ?>
  <p>Please save your poll first</p>
<?php 
}
예제 #10
0
 form-error<?php 
}
?>
">
  <?php 
if ($sf_request->hasError('tarea{es_evento}')) {
    ?>
    <?php 
    echo form_error('tarea{es_evento}', array('class' => 'form-error-msg'));
    ?>
  <?php 
}
?>
  
  <?php 
$value = object_checkbox_tag($tarea, 'getEsEvento', array('control_name' => 'tarea[es_evento]', 'onchange' => visual_effect('toggle_appear', 'capa_evento') . "; Element.toggle('capa_tarea')"));
echo $value ? $value : "&nbsp;";
?>
  </div>
</div>




<div class="form-row">
  <?php 
echo label_for('tarea[resumen]', __($labels['tarea{resumen}']) . ":", '');
?>
  <div class="content<?php 
if ($sf_request->hasError('tarea{resumen}')) {
    ?>
예제 #11
0
    $i = 0;
    foreach ($pager->getResults() as $student) {
        ?>
				<tr class="list<?php 
        ++$i;
        if ($i % 2 == 0) {
            echo ' even';
        }
        ?>
">
					<td><?php 
        echo $i + ($pager->getPage() - 1) * $pager->getMaxPerPage();
        ?>
</td>
					<td class='first'><?php 
        echo link_to_function(strlen($student->getCode()) > 0 ? $student->getCode() : 'n/a', visual_effect('toggle_appear', 'row_' . $student->getId(), array('onclick' => 'this.blur()')));
        ?>
					<p id="row_<?php 
        echo $student->getId();
        ?>
" style="display: none;">.
					<?php 
        echo link_to_remote(__('detail'), array('url' => 'subject_plan/showStudent?id=' . $student->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'green', 'style' => 'font-size:10px;'));
        ?>
					<br>
					. <?php 
        echo link_to_remote(__('student course'), array('url' => 'student_course/list?student_id=' . $student->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'white', 'style' => 'font-size:10px;'));
        ?>
					</p>
					</td>
					<td><?php 
예제 #12
0
<?php

use_helper('Date', 'I18N', 'Number', 'Javascript', 'Global');
?>

<div id="edit-tasks-holder">
    <?php 
if ($collapsable) {
    ?>
      <?php 
    echo link_to_function('Project Tasks', visual_effect('toggle_blind', 'project-tasks', array('duration' => 0.5)), array('class' => 'titlebar-clickable project-titlebar'));
    ?>
    <?php 
} else {
    ?>
      <div class="project-titlebar">
        <?php 
    echo ucwords(__('project tasks'));
    ?>
      </div>
    <?php 
}
?>
  <div id="project-tasks" <?php 
if ($collapsable) {
    echo 'style="display:true;"';
}
?>
 >
    <?php 
if ($project->getTasks() != null) {
예제 #13
0
 echo input_hidden_tag('current_path', $current_path);
 ?>
     <?php 
 echo input_hidden_tag('name', $name);
 ?>
     <?php 
 echo input_hidden_tag('type', $type);
 ?>
     <?php 
 echo input_hidden_tag('count', $count);
 ?>
     <?php 
 echo input_tag('new_name', $name);
 ?>
     <?php 
 echo submit_to_remote('rename', __('Rename', array(), 'sfMediaLibrary'), array('url' => 'sfMediaLibrary/rename', 'update' => 'block_' . $count, 'script' => true, 'before' => visual_effect('opacity', 'block_' . $count, array('duration' => '0.5', 'from' => '1.0', 'to' => '0.3')), 'complete' => visual_effect('opacity', 'block_' . $count, array('duration' => '0.5', 'from' => '0.3', 'to' => '1.0'))), 'class=sf_asset_action_rename');
 ?>
       <?php 
 echo button_to_function(__('Cancel', array(), 'sfMediaLibrary'), "Element.hide('edit_" . $count . "');Element.show('view_" . $count . "')");
 ?>
   </form>
 </div>
 <?php 
 echo javascript_tag("Element.hide('edit_" . $count . "');");
 ?>
 <div style="text-align:right">
   <?php 
 echo $size;
 ?>
   <?php 
 echo link_to(image_tag('/sfMediaLibraryPlugin/images/delete.png', array('alt' => __('Delete', array(), 'sfMediaLibrary'), 'title' => __('Delete', array(), 'sfMediaLibrary'), 'align' => 'absmiddle')), 'sfMediaLibrary/' . $delete . '?name=' . $name . '&current_path=' . $current_path, array('confirm' => __('Are you sure to want to delete this ' . $type . '?', array(), 'sfMediaLibrary')));
예제 #14
0
    $i = 0;
    foreach ($pager->getResults() as $ng_reg_period) {
        ?>
                            <tr class="list<?php 
        ++$i;
        if ($i % 2 == 0) {
            echo ' even';
        }
        ?>
">
                                <td><?php 
        echo $i + ($pager->getPage() - 1) * $pager->getMaxPerPage();
        ?>
</td>
                                <td class='first'><?php 
        echo link_to_function(strlen($ng_reg_period->getAcademicCalendarId()) > 0 ? $ng_reg_period->getAcademicCalendar()->toString() : 'n/a', visual_effect('toggle_appear', 'row_' . $ng_reg_period->getId(), array('onclick' => 'this.blur()')));
        ?>
                                    <p id="row_<?php 
        echo $ng_reg_period->getId();
        ?>
" style="display:none;">.
                                        <?php 
        echo link_to_remote(__('detail'), array('url' => 'ng_reg_period/show?id=' . $ng_reg_period->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'green'));
        ?>
                                        <?php 
        if ($can_edit) {
            echo link_to_remote(__('edit'), array('url' => 'ng_reg_period/edit?id=' . $ng_reg_period->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'blue'));
        }
        ?>
                                        <?php 
        if ($can_remove) {
예제 #15
0
          </form>
          <div style="height:20px">
            <p id="indicator-<?php 
echo $task->getUuid();
?>
" style="display:none">
            	<?php 
echo image_tag('indicator.gif');
?>
 Assigning users...
            </p>
          </div>
          
          <div id="task-status-holder">
          <?php 
echo form_remote_tag(array('update' => 'task-' . $task->getUuid() . '-holder', 'url' => 'project/ajaxSetTaskStatus', 'loading' => "Element.show('indicator-" . $task->getUuid() . "-status')", 'complete' => "Element.hide('indicator-" . $task->getUuid() . "-status');" . visual_effect('highlight', 'task-' . $task->getUuid())));
?>
          		<?php 
echo input_hidden_tag('task', $task->getUuid(), array());
?>
          		<?php 
echo select_tag('task-status', options_for_select(array('2' => 'Pending/In Planning', '1' => 'In Progress', '0' => 'Complete'), $task->getStatus()));
?>
          		<?php 
echo submit_tag('go', array());
?>
          	</form>
          </div>
          <div style="height:20px">
            <p id="indicator-<?php 
echo $task->getUuid();
예제 #16
0
    foreach ($pager->getResults() as $employee_childs) {
        ?>
                                            <tr class="list<?php 
        ++$i;
        if ($i % 2 == 0) {
            echo ' even';
        }
        ?>
">
                                                    <td><?php 
        echo $i + ($pager->getPage() - 1) * $pager->getMaxPerPage();
        ?>
</td>
                                                    <td class='first'>
                                                            <?php 
        echo link_to_function(strlen($employee_childs->getName()) > 0 ? $employee_childs->getName() : 'n/a', visual_effect('toggle_appear', 'row_' . $employee_childs->getId(), array('onclick' => 'this.blur()')));
        ?>
                                                            <p id="row_<?php 
        echo $employee_childs->getId();
        ?>
" style="display:none;">.
                                                                    <?php 
        echo link_to_remote(__('detail'), array('url' => 'user_profile_l/showChilds?id=' . $employee_childs->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'green'));
        ?>
                                                                    <?php 
        if ($can_edit) {
            echo link_to_remote(__('edit'), array('url' => 'user_profile_l/editChilds?id=' . $employee_childs->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'blue'));
        }
        ?>
                                                                    <?php 
        if ($can_remove) {
예제 #17
0
$panel['class'] = 'panel-holder panel-size-1 float-right clear-both';
echo output_panel($panel);
include_component('messages', 'recentMessages');
?>

<div style="width:60%;">
  <h2 style="border-bottom: 2px solid #D4D4D4;">News     <?php 
echo link_to(icon_tag('rss'), 'feeds/latest?feed=' . $profile->getUuid());
?>
</h2>
  <?php 
foreach ($sf_user->getProfile()->getHistory(8) as $event) {
    ?>
  <div class="news-feed-entry">
    <h3><?php 
    echo link_to_function(icon_tag('add') . ' ' . $event->getTitle(), visual_effect('toggle_blind', 'entry_' . $event->getUuid(), array('duration' => '0.25')));
    ?>
</h3>
    <span><?php 
    echo __('By <strong>%user%</strong> of the %department% dept. on %time%', array('%user%' => $event->getSfGuardUser()->getProfile(), '%department%' => $event->getSfGuardUser()->getProfile()->getDepartment(), '%time%' => format_date($event->getCreatedAt('U'))));
    ?>
</span>
    <div id="entry_<?php 
    echo $event->getUuid();
    ?>
" style="padding: 5px 0px;display:none;"><?php 
    echo $event->getText();
    ?>
</div>
  </div>
  <?php 
예제 #18
0
    foreach ($pager->getResults() as $student_leave) {
        ?>
					<tr class="list<?php 
        ++$i;
        if ($i % 2 == 0) {
            echo ' even';
        }
        ?>
">
						<td><?php 
        echo $i + ($pager->getPage() - 1) * $pager->getMaxPerPage();
        ?>
</td>
						<td class='first'>
							<?php 
        echo link_to_function(strlen($student_leave->getStudent()->toString()) > 0 ? $student_leave->getStudent()->toString() : 'n/a', visual_effect('toggle_appear', 'row_' . $student_leave->getId(), array('duration' => 0.5, 'onclick' => 'this.blur()')));
        ?>
							<p id="row_<?php 
        echo $student_leave->getId();
        ?>
" style="display:none;">.
								<?php 
        echo link_to_remote(__('detail'), array('url' => 'student_leave/show?id=' . $student_leave->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'green'));
        ?>
								<?php 
        if ($can_edit) {
            echo link_to_remote(__('edit'), array('url' => 'student_leave/edit?id=' . $student_leave->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'blue'));
        }
        ?>
								<?php 
        if ($can_remove) {
예제 #19
0
<?php 
$tab = $sf_params->get('tab');
if (!isset($tab)) {
    ?>
  <?php 
    $tab = 'mostrecent';
}
?>
	<?php 
echo nav_tabs('features', $tab);
?>

<?php 
if ($sf_user->isAuthenticated()) {
    echo link_to_function('Hide Suggestion Form', visual_effect('toggle_blind', 'new_feature', array("duration" => 0.5)));
    $new_feature = new SuggestedFeature();
    ?>
<div id="new_feature">
  <div class="blue-shadow"><div class="blue-title blue-content">Tell us what's up!</div></div>
  <div class="blue-shadow">
    <div class="blue-content">
      <?php 
    echo form_tag('features/saveNew');
    ?>
      
      <?php 
    echo label_for('type', __('What do you want us to know about?'), array('style' => 'display:block;')), select_tag('type', options_for_select(array(sfConfig::get('app_feature_type_bug') => __('A Bug Report'), sfConfig::get('app_feature_type_feature') => __('A Feature Request'))));
    ?>

  <?php 
예제 #20
0
								</p>
							</td>
						<?php 
        } else {
            ?>
							<td class='first'>
								<?php 
            $payer = null;
            if ($payment_journal->getPayerType() == PaymentJournal::PAYER_TYPE_APPLICANT) {
                $payer = TestApplicantPeer::retrieveByPK($payment_journal->getPayer());
            } elseif ($payment_journal->getPayerType() == PaymentJournal::PAYER_TYPE_STUDENT) {
                $payer = StudentPeer::retrieveByPK($payment_journal->getPayer());
            }
            ?>
								<?php 
            echo link_to_function(strlen($payment_journal->getPayer() && $payer != null) > 0 ? $payer->tostring() : 'n/a', visual_effect('toggle_appear', 'row_' . $payment_journal->getId(), array('onclick' => 'this.blur()')));
            ?>
								<p id="row_<?php 
            echo $payment_journal->getId();
            ?>
" style="display:none;">.
									<?php 
            echo link_to_remote(__('detail'), array('url' => ' payment_journal_s/show?id=' . $payment_journal->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'green'));
            ?>
									<?php 
            if ($can_edit) {
                echo link_to_remote(__('edit'), array('url' => ' payment_journal_s/edit?id=' . $payment_journal->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'blue'));
            }
            ?>
									<?php 
            if ($can_remove) {
예제 #21
0
            foreach ($sub_comps as $sub_comp) {
                ?>
                                                                             <tr class="list<?php 
                ++$j;
                if ($j % 2 == 0) {
                    echo ' even';
                }
                ?>
">
                                                                                 <td></td>
                                                                                 <td><?php 
                echo $j;
                ?>
</td>
                                                                                 <td class='first'><?php 
                echo link_to_function($sub_comp->getDetail() ? $sub_comp->getDetail() : 'n/a', visual_effect('toggle_appear', 'row_' . $sub_comp->getId(), array('duration' => 0.5, 'onclick' => 'this.blur()')));
                ?>
                                                                                     <p id="row_<?php 
                echo $sub_comp->getId();
                ?>
" style="display:none;">.
                                                                                         <?php 
                echo link_to_remote(__('edit'), array('url' => 'subject_competency/editCompetency?subject_grading_id=' . $subject_grading->getId() . '&id=' . $sub_comp->getId(), 'update' => 'subject_list', 'script' => 'true', 'before' => "this.blur();showIndicator('subject_list', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'blue'));
                ?>
                                                                                         <?php 
                echo link_to_remote(__('delete'), array('url' => 'subject_competency/deleteCompetency?subject_grading_id=' . $subject_grading->getId() . '&id=' . $sub_comp->getId(), 'confirm' => __('Are you sure?'), 'update' => 'subject_list', 'script' => 'true', 'before' => "this.blur();showIndicator('subject_list', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'red', 'style' => 'font-size:10px;'));
                ?>
                                                                                     </p>
                                                                                 </td>
                                                                             </tr> 
                                                                         <?php 
예제 #22
0
<?php

// auto-generated by sfPropelCrud
// date: 2008/04/04 15:24:10
use_helper('I18N', 'Javascript', 'Form', 'Object');
?>

<div id="member-search" style="padding-bottom: 10px;">
  <div class="blue-shadow"><div class="blue-title blue-content">Search for a member</div></div>
  <div class="blue-shadow">
    <div class="blue-content">
      <?php 
echo form_remote_tag(array('update' => 'pager-holder', 'url' => 'user/ajaxUserPager', 'loading' => "Element.show('form-search-indicator')", 'complete' => "Element.hide('form-search-indicator');" . visual_effect('highlight', 'pager-holder')));
?>
        <fieldset id='ajax_filter_fieldset' style="border: medium none;">
            <span>
              <?php 
echo label_for('user_name', 'Name'), input_auto_complete_tag('user_name', '', 'user/autoMessageComplete?field=name', 'autocomplete=false', 'use_style=true');
?>
            </span>
            <?php 
/*
            <span>
            <label for="campus">campus: <?php echo select_tag('user_campus', objects_for_select(CampusPeer::doSelect(new Criteria()), 'getId', 'getName', '', array('include_blank'=>true)), array('class'=>'xxx')) ?></label>
            <label for="department">department: <?php echo select_tag('user_department', objects_for_select(DepartmentPeer::doSelect(new Criteria()), 'getId', 'getName', '', array('include_blank'=>true)), array('class'=>'xxx')) ?></label>
            </span>
*/
?>
            <span id="update_button">
              <?php 
echo submit_tag('Search', array());
예제 #23
0
    $i = 0;
    foreach ($pager->getResults() as $subject_curr) {
        ?>
					<tr class="list<?php 
        ++$i;
        if ($i % 2 == 0) {
            echo ' even';
        }
        ?>
">
						<td><?php 
        echo $i + ($pager->getPage() - 1) * $pager->getMaxPerPage();
        ?>
</td>
						<td class='first'><?php 
        echo link_to_function($subject_curr->getSubject() && strlen($subject_curr->getSubject()->getCode()) > 0 ? $subject_curr->getSubject()->getCode() : 'n/a', visual_effect('toggle_appear', 'row_' . $subject_curr->getId(), array('duration' => 0.5, 'onclick' => 'this.blur()')));
        ?>
							<p id="row_<?php 
        echo $subject_curr->getId();
        ?>
" style="display:none;">.
								<?php 
        echo link_to_remote(__('detail'), array('url' => 'subject/show?id=' . $subject_curr->getSubject()->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'green'));
        ?>
								<?php 
        if ($can_edit) {
            echo link_to_remote(__('edit'), array('url' => 'subject_curr/edit?id=' . $subject_curr->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'blue'));
        }
        ?>
								<?php 
        if ($can_remove) {
예제 #24
0
    foreach ($pager->getResults() as $test_applicant) {
        ?>
					<tr class="list<?php 
        ++$i;
        if ($i % 2 == 0) {
            echo ' even';
        }
        ?>
">
						<td><?php 
        echo $i + ($pager->getPage() - 1) * $pager->getMaxPerPage();
        ?>
</td>
						<td class='first' nowrap>
						<?php 
        echo link_to_function($test_applicant->getCode(), visual_effect('toggle_appear', 'row_' . $test_applicant->getId(), array('duration' => 0.5, 'onclick' => 'this.blur()')));
        ?>
						
                        <p id="row_<?php 
        echo $test_applicant->getId();
        ?>
" style="display:none;">.
							<?php 
        echo link_to_remote(__('detail'), array('url' => 'applicant/show?id=' . $test_applicant->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'green', 'style' => 'font-size:10px;'));
        ?>
							
                        </p>
						</td>
						<td><?php 
        echo $test_applicant->getName() ? $test_applicant->getName() : '-';
        ?>
예제 #25
0
    $i = 0;
    foreach ($pager->getResults() as $ng_reg_test_period) {
        ?>
                            <tr class="list<?php 
        ++$i;
        if ($i % 2 == 0) {
            echo ' even';
        }
        ?>
">
                                <td><?php 
        echo $i + ($pager->getPage() - 1) * $pager->getMaxPerPage();
        ?>
</td>
                                    <td class='first'><?php 
        echo link_to_function(strlen($ng_reg_test_period->getName()) > 0 ? $ng_reg_test_period->getName() : 'n/a', visual_effect('toggle_appear', 'row_' . $ng_reg_period->getId(), array('onclick' => 'this.blur()')));
        ?>
                                        <p id="row_<?php 
        echo $ng_reg_period->getId();
        ?>
" style="display:none;">.
                                            <?php 
        if ($can_edit) {
            echo link_to_remote(__('edit'), array('url' => 'ng_reg_detail/editOther?id=' . $ng_reg_test_period->getId() . '&ng_reg_period_id=' . $ng_reg_period->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'blue'));
        }
        ?>
                                            <?php 
        if ($can_remove) {
            echo link_to_remote(__('delete'), array('url' => 'ng_reg_detail/deleteOther?id=' . $ng_reg_test_period->getId() . '&ng_reg_period_id=' . $ng_reg_period->getId(), 'confirm' => __('Are you sure? Other Data Related will be deleted'), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'red'));
        }
        ?>
예제 #26
0
        ?>
					<tr class="list<?php 
        ++$i;
        if ($i % 2 == 0) {
            echo ' even';
        }
        ?>
">
                                                                                                                <td style="vertical-align: middle;"><?php 
        echo $i + ($pager->getPage() - 1) * $pager->getMaxPerPage();
        ?>
</td>

						<td class='first' style="vertical-align: middle;">
						<?php 
        echo link_to_function($course_schedule->getAcademicCalendar() ? $course_schedule->getAcademicCalendar()->getName() : 'n/a', visual_effect('toggle_appear', 'row_' . $course_schedule->getId(), array('duration' => 0.5, 'onclick' => 'this.blur()')));
        ?>
								<p id="row_<?php 
        echo $course_schedule->getId();
        ?>
" style="display:none;">.
									<?php 
        echo link_to_remote(__('detail'), array('url' => 'course_sched/showTK?id=' . $course_schedule->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'green', 'style' => 'font-size:10px;'));
        ?>
									<?php 
        if ($can_edit) {
            echo link_to_remote(__('edit'), array('url' => 'course_sched/editTK?id=' . $course_schedule->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'blue', 'style' => 'font-size:10px;'));
        }
        ?>
									<?php 
        if ($can_remove) {
예제 #27
0
            $j = 0;
            foreach ($locates as $locate) {
                ?>
                    <tr class="list<?php 
                ++$j;
                if ($j % 2 == 0) {
                    echo ' even';
                }
                ?>
">
            			<td style="text-align:center;"><?php 
                echo $j + ($pager2->getPage() - 1) * $pager2->getMaxPerPage();
                ?>
</td>
                		<td class='first'><?php 
                echo link_to_function(strlen($locate->getCode()) > 0 ? $locate->getCode() : 'n/a', visual_effect('toggle_appear', 'row_' . $locate->getId(), array('duration' => 0.5, 'onclick' => 'this.blur()')));
                ?>
							<p id="row_<?php 
                echo $locate->getId();
                ?>
" style="display:none;">.
								<?php 
                echo link_to_remote(__('detail'), array('url' => 'location/show?id=' . $locate->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'green', 'style' => 'font-size:10px;'));
                ?>
								<?php 
                if ($can_edit) {
                    echo link_to_remote(__('edit'), array('url' => 'location/edit?id=' . $locate->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'blue', 'style' => 'font-size:10px;'));
                }
                ?>
								<?php 
                if ($can_remove) {
예제 #28
0
foreach ($rows as $row) {
    ?>
				<tr class="list<?php 
    ++$i;
    if ($i % 2 == 0) {
        echo ' even';
    }
    ?>
">
					<td style="text-align: center;"><?php 
    echo $i;
    ?>
</td>
					<td class='first'>
                                                                                                <?php 
    echo link_to_function($row->getStaffTypeId() ? $row->getStaffType()->toString() : __('ALL'), visual_effect('toggle_appear', 'row_' . $row->getId(), array('onclick' => 'this.blur()')));
    ?>
                                                                                                <p id="row_<?php 
    echo $row->getId();
    ?>
" style="display:none;">.
                                                                                                        <?php 
    echo link_to_remote(__('detail'), array('url' => 'employee_regulation/show?id=' . $row->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'green'));
    ?>
                                                                                                        <?php 
    echo link_to_remote(__('edit'), array('url' => 'employee_regulation/edit?id=' . $row->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'blue'));
    ?>
                                                                                                        <?php 
    echo link_to_remote(__('delete'), array('url' => 'employee_regulation/delete?id=' . $row->getId(), 'confirm' => __('Are you sure?'), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'red'));
    ?>
                                                                                                </p>
예제 #29
0
    $i = 0;
    foreach ($pager->getResults() as $student_absence) {
        ?>
					<tr class="list<?php 
        ++$i;
        if ($i % 2 == 0) {
            echo ' even';
        }
        ?>
">
						<td><?php 
        echo $i + ($pager->getPage() - 1) * $pager->getMaxPerPage();
        ?>
</td>
						<td class='first'><?php 
        echo link_to_function($student_absence->getStudent() ? $student_absence->getStudent()->getCode() : 'n/a', visual_effect('toggle_appear', 'row_' . $student_absence->getId(), array('onclick' => 'this.blur()')));
        ?>
							<p id="row_<?php 
        echo $student_absence->getId();
        ?>
" style="display:none;">.
								<?php 
        echo link_to_remote(__('detail'), array('url' => 'absence/show?id=' . $student_absence->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'green', 'style' => 'font-size:10px;'));
        ?>
								<?php 
        if ($can_edit) {
            echo link_to_remote(__('edit'), array('url' => 'absence/edit?id=' . $student_absence->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'blue', 'style' => 'font-size:10px;'));
        }
        ?>
								<?php 
        if ($can_remove) {
예제 #30
0
    $i = 0;
    foreach ($pager->getResults() as $ng_achievement_level) {
        ?>
                            <tr class="list<?php 
        ++$i;
        if ($i % 2 == 0) {
            echo ' even';
        }
        ?>
">
                                <td><?php 
        echo $i + ($pager->getPage() - 1) * $pager->getMaxPerPage();
        ?>
</td>
                                <td class='first'><?php 
        echo link_to_function(strlen($ng_achievement_level->getCode()) > 0 ? $ng_achievement_level->getCode() : 'n/a', visual_effect('toggle_appear', 'row_' . $ng_achievement_level->getId(), array('onclick' => 'this.blur()')));
        ?>
                                    <p id="row_<?php 
        echo $ng_achievement_level->getId();
        ?>
" style="display:none;">.
                                        <?php 
        echo link_to_remote(__('detail'), array('url' => 'ng_achievement_level/show?id=' . $ng_achievement_level->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'green'));
        ?>
                                        <?php 
        if ($can_edit) {
            echo link_to_remote(__('edit'), array('url' => 'ng_achievement_level/edit?id=' . $ng_achievement_level->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'blue'));
        }
        ?>
                                        <?php 
        if ($can_remove) {