예제 #1
0
파일: Views.php 프로젝트: saden1/Neatline
/**
 * Returns a link to a Neatline exhibit.
 *
 * @param NeatlineExhibit|null $exhibit The exhibit record.
 * @param string $action The action for the link.
 * @param string $text The link text.
 * @param array $props Array of properties for the element.
 * @return string The HTML link.
 */
function nl_getExhibitLink($exhibit, $action, $text, $props = array(), $public = true)
{
    // Get exhibit and link text.
    $exhibit = $exhibit ? $exhibit : nl_getExhibit();
    $text = $text ? $text : nl_getExhibitField('title');
    // Get the exhibit identifier (`id` or `slug`).
    if (in_array($action, array('show', 'fullscreen'))) {
        $identifier = $exhibit->slug;
    } else {
        $identifier = $exhibit->id;
    }
    // Construct the exhibit route.
    $route = 'neatline/' . $action . '/' . $identifier;
    $props['href'] = $public ? public_url($route) : url($route);
    // Return the anchor tag.
    return '<a ' . tag_attributes($props) . '>' . $text . '</a>';
}
예제 #2
0
<?php

/**
 * @package     omeka
 * @subpackage  neatline
 * @copyright   2014 Rector and Board of Visitors, University of Virginia
 * @license     http://www.apache.org/licenses/LICENSE-2.0.html
 */
?>

<?php 
echo head(array('title' => nl_getExhibitField('title'), 'bodyclass' => 'neatline fullscreen'));
?>

<?php 
echo nl_getExhibitMarkup();
?>

<?php 
echo foot();
예제 #3
0
?>

<?php 
echo head(array('title' => nl_getExhibitField('title'), 'bodyclass' => 'neatline macbeth'));
?>

<!-- Exhibit. -->
<div class="exhibit"><?php 
echo nl_getExhibitMarkup();
?>
</div>

<!-- Narrative. -->
<div id="neatline-narrative" class="narrative">
  <?php 
echo nl_getExhibitField('narrative');
?>
  <p class="instructions">(Click words to auto-zoom.)</p>
</div>

<div id="navigation">

  <!-- Back to exhibits browse. -->
  <a href="<?php 
echo url('neatline');
?>
">
    <span class="arrow">&larr;</span> View All
  </a> ~

  <!-- Link to blog post. -->
예제 #4
0
파일: edit.php 프로젝트: saden1/Neatline
<?php

/**
 * @package     omeka
 * @subpackage  neatline
 * @copyright   2014 Rector and Board of Visitors, University of Virginia
 * @license     http://www.apache.org/licenses/LICENSE-2.0.html
 */
?>

<?php 
echo head(array('title' => __('Neatline | Edit "%s"', nl_getExhibitField('title'))));
?>

<div id="primary">
  <?php 
echo flash();
?>
  <?php 
echo $form;
?>
</div>

<?php 
echo foot();
예제 #5
0
<?php 
echo head(array('title' => nl_getExhibitField('title'), 'bodyclass' => 'neatline show'));
?>
 
<!-- Exhibit title: -->
<h1><?php 
echo nl_getExhibitField('title');
?>
</h1>
 
<!-- "View Fullscreen" link: -->
<?php 
echo nl_getExhibitLink(null, 'fullscreen', __('View Fullscreen'), array('class' => 'nl-fullscreen'));
?>
 
<!-- Exhibit and description : -->
<?php 
echo nl_getExhibitMarkup();
echo nl_getNarrativeMarkup();
?>

<!-- <div id="faceting">
      <div class="AdditionalCareers">Additional Careers</div>
  	  <div class="AntiSemiticRhetoric">Anti-Semitic Rhetoric</div>
  	  <div class="Bartering">Bartering</div>
  	  <div class="BusinessPractices">Business Practices</div>
  	  <div class="ConflictViolenceCommunal">Conflict/Violence -- Communal</div>
  	  <div class="ConflictViolencePersonal">Conflict/Violence -- Personal</div>
  	  <div class="ContextualResource">Contextual Resource</div>
  	  <div class="CulturalExchange">Cultural Exchange</div>
예제 #6
0
 /**
  * SHOW should load the exhibit by slug.
  */
 public function testLoadExhibit()
 {
     $exhibit = $this->_exhibit('slug');
     $this->dispatch('neatline/show/slug');
     $this->assertEquals($exhibit->id, nl_getExhibitField('id'));
 }
예제 #7
0
    <div class="pagination"><?php 
    echo pagination_links();
    ?>
</div>

      <?php 
    foreach (loop('NeatlineExhibit') as $e) {
        ?>
          <h2 style="font-weight:300;">
          <?php 
        echo nl_getExhibitLink($e, 'fullscreen', nl_getExhibitField('title'), array('class' => 'neatline'), true);
        ?>
        </h2>
        <h3 style="font-weight:300;">
          <?php 
        $description = truncateText(nl_getExhibitField('narrative'), 100);
        ?>
          <?php 
        echo $description;
        ?>
        </h3>
      <?php 
    }
    ?>

    <div class="pagination"><?php 
    echo pagination_links();
    ?>
</div>

  <?php 
예제 #8
0
<?php

/* vim: set linebreak wrap nolist tabstop=2 shiftwidth=2 softtabstop=2: */
/**
 * @package     omeka
 * @subpackage  neatline-NeatLight
 * @copyright   2014 Rector and Board of Visitors, University of Virginia
 * @license     http://www.apache.org/licenses/LICENSE-2.0.html
 */
?>

<?php 
echo head(array('title' => nl_getExhibitField('title'), 'bodyclass' => 'neatline declaration'));
?>

<!-- Transcription. -->
<div id="neatline-narrative" class="narrative">

  <header class="credits">
    <?php 
include 'credits.php';
?>
    <div id="tutorial-button"></div>
  </header>

  <hr />

  <?php 
include 'declaration.php';
?>
  <?php 
예제 #9
0
<?php

/**
 * @package     omeka
 * @subpackage  neatline-NeatLight
 * @copyright   2014 Rector and Board of Visitors, University of Virginia
 * @license     http://www.apache.org/licenses/LICENSE-2.0.html
 */
?>

<?php 
echo head(array('title' => nl_getExhibitField('title'), 'bodyclass' => 'neatline sf-hoods'));
?>

<!-- Exhibit. -->
<div class="exhibit"><?php 
echo nl_getExhibitMarkup();
?>
</div>

<div id="navigation">

  <h1>Neighborhoods of San Francisco</h1>

  <!-- Back to exhibits browse. -->
  <a href="<?php 
echo url('neatline');
?>
">
    <span class="arrow">&larr;</span> View All Exhibits
  </a>
예제 #10
0
파일: browse.php 프로젝트: saden1/Neatline
  <?php 
if (nl_exhibitsHaveBeenCreated()) {
    ?>

    <div class="pagination"><?php 
    echo pagination_links();
    ?>
</div>

      <?php 
    foreach (loop('NeatlineExhibit') as $e) {
        ?>
        <h2>
          <?php 
        echo nl_getExhibitLink($e, 'show', nl_getExhibitField('title'), array('class' => 'neatline'), true);
        ?>
        </h2>
      <?php 
    }
    ?>

    <div class="pagination"><?php 
    echo pagination_links();
    ?>
</div>

  <?php 
}
?>
예제 #11
0
<?php

/* vim: set tabstop=2 shiftwidth=2 softtabstop=2: */
/**
 * @package     omeka
 * @subpackage  neatline-NeatLight
 * @copyright   2014 Rector and Board of Visitors, University of Virginia
 * @license     http://www.apache.org/licenses/LICENSE-2.0.html
 */
?>

<!-- Header. -->
<?php 
echo head(array('title' => nl_getExhibitField('title'), 'bodyclass' => 'neatline polyphemus'));
?>

<!-- Exhibit. -->
<div class="exhibit">
  <?php 
echo nl_getExhibitMarkup();
?>
</div>

<!-- Transcription. -->
<div id="neatline-narrative" class="narrative">
  <?php 
include 'poem.php';
?>
</div>

<!-- Spinner. -->
예제 #12
0
 /**
  * EDITOR should load exhibits by id.
  */
 public function testLoadExhibit()
 {
     $exhibit = $this->_exhibit();
     $this->dispatch('neatline/editor/' . $exhibit->id);
     $this->assertEquals($exhibit->id, nl_getExhibitField('id'));
 }
예제 #13
0
    <div class="pagination"><?php 
    echo pagination_links();
    ?>
</div>

      <?php 
    foreach (loop('NeatlineExhibit') as $e) {
        ?>
        <h2>
          <?php 
        echo nl_getExhibitLink($e, 'show', nl_getExhibitField('title'), array('class' => 'neatline'), true);
        ?>
        </h2>
        <?php 
        if ($description = snippet_by_word_count(nl_getExhibitField('narrative'), 20)) {
            ?>
        <div class="neatline-exhibit-description"><?php 
            echo $description . nl_getExhibitLink($e, 'show', 'Read more.', array('class' => 'neatline'), true);
            ?>
</div>
        <?php 
        }
        ?>
      <?php 
    }
    ?>

    <div class="pagination"><?php 
    echo pagination_links();
    ?>
예제 #14
0
파일: browse.php 프로젝트: saden1/Neatline
            <?php 
        echo format_date(nl_getExhibitField('added'));
        ?>
          </td>

          <!-- # Items. -->
          <td>
            <?php 
        echo nl_getExhibitRecordCount();
        ?>
          </td>

          <!-- Public. -->
          <td>
            <?php 
        echo nl_getExhibitField('public') ? __('Yes') : __('No');
        ?>
          </td>

        </tr>
      <?php 
    }
    ?>

    </tbody>

  </table>

  <!-- Bottom pagination. -->
  <div class="pagination"><?php 
    echo pagination_links();