예제 #1
0
 function test_named_cycles()
 {
     $this->assertEqual('odd', TextHelper::cycle(array('odd', 'even', 'name' => '1st')));
     $this->assertEqual('red', TextHelper::cycle('red', 'black'));
     $this->assertEqual('even', TextHelper::cycle(array('odd', 'even', 'name' => '1st')));
     $this->assertEqual('black', TextHelper::cycle('red', 'black'));
 }
예제 #2
0
파일: test.php 프로젝트: ratbird/hope
  </tr>
  <tr class="<?php 
echo TextHelper::cycle('table_row_even', 'table_row_odd');
?>
">
  <td><?php 
echo _('Methode');
?>
</td>
  <td><input type="text" name="test_method" size="50" required value="<?php 
echo htmlReady(Request::get("test_method"));
?>
"></td>
  </tr>
  <tr class="<?php 
echo TextHelper::cycle('table_row_even', 'table_row_odd');
?>
">
  <td><?php 
echo _('IP Adresse');
?>
</td>
  <td><input type="text" name="test_ip" size="50" required value="<?php 
echo htmlReady(Request::get("test_ip"));
?>
"></td>
  </tr>
  <tr>
  <td style="text-align:center" colspan="2">
  <?php 
echo Button::createAccept(_('Abschicken'), 'ok', array('title' => _('Test starten')));
예제 #3
0
 function reset_cycle($name)
 {
     TextHelper::cycle(array('reset' => $name));
 }
예제 #4
0
echo TextHelper::cycle('hover_odd', 'hover_even');
?>
">
            <td><?php 
echo _("Auf der Profilseite und in Adressbüchern sichtbar");
?>
:</td>
            <td><input type="checkbox" name="visible" value="1" <?php 
echo $institute['visible'] ? 'checked' : '';
?>
></td>
        </tr>
<? if (count($datafields) > 0) : ?>
    <? foreach ($datafields as $entry) : ?>
        <tr class="<?php 
echo TextHelper::cycle('hover_odd', 'hover_even');
?>
">
            <td>
                <?php 
echo htmlReady($entry->getName());
?>
:
            </td>
            <td>
            <? if ($entry->isEditable()) : ?>
                <?php 
echo $entry->getHTML("datafields");
?>
            <? else : ?>
                <?php 
예제 #5
0
</th>
            <th><?php 
echo _('Kontakt');
?>
</th>
            <th><?php 
echo _('Kommerziell');
?>
</th>
            <th>&nbsp;</th>
        </tr>
    </thead>
    <tbody>
<? foreach ($consumers as $consumer): ?>
        <tr class="<?php 
echo TextHelper::cycle('cycle_even', 'cycle_odd');
?>
">
            <td>
                <a href="<?php 
echo $controller->url_for('admin/toggle', $consumer['consumer_key'], $consumer['enabled'] ? 'off' : 'on');
?>
">
                    <?php 
echo Assets::img('icons/16/blue/checkbox-' . ($consumer['enabled'] ? '' : 'un') . 'checked');
?>
                </a>
            </td>
            <td>
            <? if ($consumer['application_uri']): ?>
                <a href="<?php 
예제 #6
0
?>
</p>
<? else: ?>
<table class="oauth-apps default">
    <thead>
        <tr>
            <th><?php 
echo _('Name');
?>
</th>
            <th>&nbsp;</th>
    </thead>
    <tbody>
    <? foreach ($consumers as $consumer): ?>
        <tr class="<?php 
echo $class = TextHelper::cycle('cycle_even', 'cycle_odd');
?>
">
            <td>
                <h2>
                <? if ($consumer['application_uri']): ?>
                    <a href="<?php 
echo $consumer['application_uri'];
?>
" target="_blank">
                        <?php 
echo htmlReady($consumer['application_title']);
?>
                    </a>
                <? else: ?>
                    <?php