Exemplo n.º 1
0
        echo elgg_echo("questions:workflow:none");
    }
    ?>
    </div>

    <div class="overview-element">
      <?php 
    if ($currentPhase = $question->getCurrentWorkflowPhase()) {
        echo $currentPhase->name;
    } else {
        if ($question->totalAnswerTimes) {
            echo end(questions_get_phases())->name;
        } else {
            echo elgg_echo("questions:workflow:none");
        }
    }
    ?>
    </div>

    <div class="overview-element">
      <?php 
    if ($question->isWorkflowOpen()) {
        echo questions_get_friendly_timespan($question->getWorkflowLatestTotalTime());
    } else {
        echo "-";
    }
    ?>
    </div>     
  </div>
<?php 
}
Exemplo n.º 2
0
 */
$intanswer = $vars['entity'];
$image = elgg_view_entity_icon(get_entity($intanswer->owner_guid), 'small');
// create subtitle
$owner = $intanswer->getOwnerEntity();
$owner_link = elgg_view("output/url", array("text" => $owner->name, "href" => $owner->getURL(), "is_trusted" => true));
$friendly_time = elgg_view_friendly_time($intanswer->time_created);
$subtitle = $owner_link . " " . $friendly_time;
if (isset($intanswer->phase_guid)) {
    $subtitle .= ", " . $intanswer->getPhase()->name;
}
if (isset($intanswer->email)) {
    $subtitle .= ", " . elgg_echo("questions:workflow:email:notification:sent");
}
if (isset($intanswer->timeWorked)) {
    $subtitle .= ", " . questions_get_friendly_timespan($intanswer->timeWorked);
}
if (isset($intanswer->answerGuid)) {
    $subtitle .= ", " . elgg_echo("questions:workflow:publishedFront");
}
if (isset($intanswer->workflowCloseCycle)) {
    $subtitle .= ", " . elgg_echo("questions:workflow:closed");
}
// build entity menu
$entity_menu = elgg_view_menu('entity', array('entity' => $vars['entity'], 'handler' => 'intanswers', 'sort_by' => 'priority', 'class' => 'elgg-menu-hz'));
$body = elgg_view('output/longtext', array('value' => $intanswer->description));
// add comments
$comment_count = $intanswer->countComments();
if ($comment_count) {
    $comment_options = array('guid' => $intanswer->getGUID(), 'annotation_name' => 'generic_comment', 'limit' => false);
    $comments = elgg_get_annotations($comment_options);