예제 #1
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 
}
예제 #2
0
<?php

use_helper('Javascript');
?>

<?php 
if ($sf_user->isAuthenticated()) {
    $choice = $sf_request->getParameter('module') . '/' . $sf_request->getParameter('action');
    if ($choice == 'sfLucene/search') {
        echo button_to_remote(__('Save as feed'), array('url' => 'user/addFeed?q=' . $sf_params->get('query'), 'update' => 'msg-container', 'complete' => "window.alert(\$('msg-container').innerHTML);"));
    } else {
        if ($choice == 'tag/show') {
            echo button_to_remote(__('Save as feed'), array('url' => 'user/addFeed?q=tag: ' . $sf_params->get('tag'), 'update' => 'msg-container', 'complete' => "window.alert(\$('msg-container').innerHTML);"));
        } else {
            if ($choice == 'language/show') {
                echo button_to_remote(__('Save as feed'), array('url' => 'user/addFeed?q=languages:' . $sf_params->get('language'), 'update' => 'msg-container', 'complete' => "window.alert(\$('msg-container').innerHTML);"));
            }
        }
    }
}
?>

<?php 
echo label_for('search_size', __('Display') . ' ');
echo select_tag('search_size', options_for_select(array('10' => '10', '20' => '20', '30' => '30', '40' => '40', '50' => '50'), $sf_user->getPreference('search_size')), array('onchange' => remote_function(array('url' => "@set_preference?pname=search_size", 'with' => "&quot;pvalue=&quot; + value", 'success' => 'window.location.reload();'))));
예제 #3
0
</td></tr>

<tr><th colspan="2"><?php 
echo __('Information for Developer');
?>
</th></tr>
<tr><th>Consumer key</th><td><?php 
echo $application->getConsumerKey();
?>
</td></tr>
<tr><th>Consumer secret</th><td>

<div id="oauth_consumer_secret"></div>
<?php 
if ($application->getConsumerSecret()) {
    echo button_to_remote(__('Show consumer secret'), array('update' => 'oauth_consumer_secret', 'url' => '@op_opensocial_show_consumer_secret?id=' . $application->getId(), 'method' => 'get'));
    ?>
<br />
<?php 
    echo button_to(__('Reset consumer secret'), '@op_opensocial_update_consumer_secret?id=' . $application->getId());
    ?>
<br />
<?php 
    echo button_to(__('Delete consumer secret'), '@op_opensocial_delete_consumer_secret?id=' . $application->getId());
} else {
    echo button_to(__('Generate consumer secret'), '@op_opensocial_update_consumer_secret?id=' . $application->getId());
}
?>

</td></tr>
<tr><th>Signature method</th><td>HMAC-SHA1</td></tr>
    echo __('If you modify the profile item, you must update this file.');
    ?>
</li>
</ul>
</p>
<h3>Backend key</h3>
<table>
<tr><th>Backend Consumer Key</th><td><?php 
    echo $consumerKey;
    ?>
</td></tr>
<tr><th>Backend Consumer Secret</th><td>
<div id="oauth_consumer_secret"></div>
<?php 
    if ($consumerSecret) {
        echo button_to_remote(__('Show consumer secret'), array('update' => 'oauth_consumer_secret', 'url' => '@op_opensocial_show_backend_secret', 'method' => 'get'));
        ?>
<br />
<?php 
        echo button_to(__('Reset consumer secret'), '@op_opensocial_update_backend_secret');
        ?>
<br />
<?php 
        echo button_to(__('Delete consumer secret'), '@op_opensocial_delete_backend_secret');
    } else {
        echo button_to(__('Generate consumer secret'), '@op_opensocial_update_backend_secret');
    }
    ?>
</td></tr>
</table>
</div>
예제 #5
0
)
                </div>
            </div>
        </div>
        <div id="bar-wrapper">
        	<div id="bar">
        	    <div class="right-aligned">
        	        <?php 
$arr = array();
if (!$sf_user->isAuthenticated()) {
    $arr = array('disabled' => 'disabled');
}
?>
        	        <div id="msg-container" style="display: none;"></div>
	                <?php 
echo button_to_remote(__('Save Preferences'), array('url' => 'user/savePreferences', 'update' => 'msg-container', 'complete' => "window.alert(\$('msg-container').innerHTML);"), $arr);
?>
	            </div>
	            <div>
	                <?php 
echo form_tag('sfLucene/search', array('method' => 'get'));
?>
	                	<?php 
if ($sf_params->get('query')) {
    ?>
	                    	<?php 
    echo input_tag('query', $sf_params->get('query'), array('class' => 'search'));
    ?>
 <?php 
    echo submit_tag(__('Search'));
    ?>
예제 #6
0
<span id="entity<?php 
echo $position;
?>
_link"></span>
<input type="button" id="entity<?php 
echo $position;
?>
_clear" class="tiny-button" value="x" style="display: none;" onclick="clearEntity(<?php 
echo $position;
?>
);" />
<input type="text" id="entity<?php 
echo $position;
?>
_input" name="entity<?php 
echo $position;
?>
_input" size="20" onkeypress="return enterKey(event,'entity<?php 
echo $position;
?>
_submit');" />
<div id="entity<?php 
echo $position;
?>
_results" style="min-width: 300px; display: none; position: absolute; padding: 0.5em; background-color: #fff; border: 1px solid #ddd;"></div>
<?php 
include_partial('relationship/toolbarCreateForm', array('position' => $position));
echo button_to_remote('Search', array('update' => 'entity' . $position . '_results', 'url' => 'http://littlesis.org/relationship/toolbarSearch', 'method' => 'post', 'with' => "'page=1&position=" . $position . "&q=' + \$F('entity" . $position . "_input')", 'complete' => 'showSearchResults(' . $position . ')'), array('class' => 'button_small', 'id' => 'entity' . $position . '_submit'));
?>

    </td>