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/versions.php

    r468 r497  
    3232require_once 'codebase/lib/Version.inc.php';
    3333require_once 'codebase/lib/Lock.inc.php';
     34require_once 'codebase/lib/HTML.inc.php';
    3435
    3536/******************************************************************************
     
    3940// Since we're using the singleton pattern we can instantiate a Version object earlier with custom parameters.
    4041$version =& Version::getInstance($auth);
     42$version->setParam(array(
     43    // If true, makes an exact comparison of saved vs. live table schemas. If false, just checks that the saved columns are available.
     44    'db_schema_strict' => false,
     45));
    4146
    4247// Query arguments to retain their values between page requests.
     
    8085    $data = $version->getData($version_id);
    8186    $versionrecord = $version->getVerson($version_id);
    82     $nav->add(sprintf(_("View <em>%s</em> version %s (%s)"), $versionrecord['version_title'], $version_id, $versionrecord['version_datetime']));
     87    $nav->add(sprintf(_("%s <small>Version %s (%s)</small>"), $versionrecord['version_title'], $version_id, date(sprintf('%s %s', $app->getParam('date_format'), $app->getParam('time_format')), strtotime($versionrecord['version_datetime']))));
    8388    $main_template = 'versions_view.ihtml';
    8489    break;
     
    8994    $current = $version->getCurrent($record_table, $record_key, $record_val);
    9095    if (serialize($data) == serialize($current)) {
    91         $app->raiseMsg(sprintf(_("Version <em>%s</em> is identical to the current record"), $version_id), MSG_NOTICE, __FILE__, __LINE__);
     96        $app->raiseMsg(sprintf(_("Version %s is identical to the current record"), $version_id), MSG_NOTICE, __FILE__, __LINE__);
    9297    }
    93     $nav->add(sprintf(_("Difference between version %s (%s) and current record."), $version_id, $versionrecord['version_datetime']));
     98    $nav->add(sprintf(_("%s <small>Version %s (%s)</small>"), $versionrecord['version_title'], $version_id, date(sprintf('%s %s', $app->getParam('date_format'), $app->getParam('time_format')), strtotime($versionrecord['version_datetime']))));
    9499    $main_template = 'versions_diff.ihtml';
    95100    break;
     
    119124    if (is_array($versions) && !empty($versions)) {
    120125        $_POST['version_title'] = $versions[0]['version_title'];
    121         $nav->add(sprintf(_("%s versions of record <em>%s</em>"), sizeof($versions), $versions[0]['version_title']));
     126        $nav->add(sprintf(_("%s versions of <em>%s</em>"), sizeof($versions), $versions[0]['version_title']));
    122127        $main_template = 'versions_list.ihtml';
    123128    } else {
    124         $app->raiseMsg(sprintf(_("No saved versions available for this record"), null), MSG_NOTICE, __FILE__, __LINE__);
     129        $app->raiseMsg(sprintf(_("No saved versions available"), null), MSG_NOTICE, __FILE__, __LINE__);
    125130        $app->dieBoomerangURL('versions');
    126131    }
Note: See TracChangeset for help on using the changeset viewer.