Ignore:
Timestamp:
Sep 15, 2014 9:44:27 PM (10 years ago)
Author:
anonymous
Message:

Beginning the process of adapting codebase to foundation styles.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/services/templates/versions_diff.ihtml

    r457 r497  
    1 <div class="commandbox">
    2 <?php if (!getFormData('current', false)) { ?>
    3     <span class="sc-nowrap commanditem"><a href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . '?op=restore', array('version_id', 'version_title')); ?>"><?php echo _("Restore this saved version"); ?></a></span>
    4 <?php } else { ?>
    5     <span class="sc-nowrap commanditem">&nbsp;</span>
    6 <?php } ?>
    7 </div>
     1<header class="row">
     2    <div class="large-12 columns">
     3        <h1><?php echo $nav->get('title'); ?></h1>
     4    </div>
     5</header>
     6<main role="main">
     7    <div class="row">
     8        <div class="large-12 columns">
     9            <?php
     10            if (is_array($data) && !empty($data)) {
     11                ?>
     12                <table class="list">
     13                    <thead>
     14                        <tr>
     15                            <th class="sc-padleft"><?php echo _("Field"); ?></th>
     16                            <th class="sc-padleft"><?php echo _("Saved version"); ?></th>
     17                            <th class="sc-padleft"><?php echo _("Current record"); ?></th>
     18                        </tr>
     19                    </thead>
     20                    <tbody>
     21                        <?php
     22                        foreach ($current as $k=>$v_c) {
     23                            if (isset($data[$k])) {
     24                                $v_d =  $data[$k];
     25                                $td_style = '';
     26                            } else {
     27                                $v_d = '(Unavailable)';
     28                                $td_style = 'color: #e00;';
     29                            }
     30                            $tr_style = $v_d != $v_c ? 'font-weight:bold;' : '';
     31                            ?>
     32                            <tr style="<?php echo $tr_style; ?>">
     33                                <td class="sc-nowrap"><label><?php echo oTxt($k); ?></label></td>
     34                                <td style="<?php echo $td_style; ?>"><?php echo oTxt($v_d); ?></td>
     35                                <td style="<?php echo $td_style; ?>"><?php echo oTxt($v_c); ?></td>
     36                            </tr>
     37                        <?php } ?>
     38                    </tbody>
     39                </table>
     40                <p class="sc-help"><?php echo _("Emboldened lines indicate something changed between the saved version and the current record."); ?></p>
     41            <?php
     42            }
    843
    9 <?php if (is_array($data) && !empty($data) && is_array($current) && !empty($current)) { ?>
    10 <table class="list">
    11     <tr>
    12         <th class="sc-padleft"><?php echo _("Field"); ?></th>
    13         <th class="sc-padleft"><?php echo _("Saved version"); ?></th>
    14         <th class="sc-padleft"><?php echo _("Current record"); ?></th>
    15     </tr>
    16 <?php
    17 foreach ($current as $k=>$v_c) {
    18     $v_d = isset($data[$k]) ? $data[$k] : '<span style="color: #e00;">Unavailable</span>';
    19     $style = $v_d != $v_c ? ' style="font-weight: bold;"' : '';
    20     ?>
    21     <tr>
    22         <td class="sc-padleft sc-nowrap"<?php echo $style; ?>><label><?php echo $k; ?></label></td>
    23         <td class="sc-padleft"><?php echo $v_d; ?></td>
    24         <td class="sc-padleft"><?php echo $v_c; ?></td>
    25     </tr>
    26 <?php } ?>
    27 </table>
    28 <?php } ?>
     44            // Buttons.
     45            $action_links = array();
     46            if (!getFormData('current', false)) {
     47                $action_links[] = array('href' => $app->oHREF($_SERVER['PHP_SELF'] . '?op=restore', array('version_id', 'version_title')), 'value' => _("Restore this saved version"), 'class' => 'small button alert', 'accesskey' => 'r');
     48            }
     49            $action_links[] = array('href' => $app->ohref(oTxt($_SERVER['PHP_SELF'])), 'value' => _("Cancel"), 'class' => 'small button secondary', 'accesskey' => 'b');
     50            HTML::printButtons($action_links);
     51            ?>
     52        </div>
     53    </div>
     54</main>
Note: See TracChangeset for help on using the changeset viewer.