dmBridge PHP API
reindex.html.php
00001 <?php
00002 
00003 $tpl_includes = dirname(__FILE__) . "/../../../../templates/admin/templates/includes";
00004 include_once($tpl_includes . "/head.html.php") ?>
00005 
00006 </head>
00007 
00008 <?php include_once($tpl_includes . "/body.html.php") ?>
00009 
00010    <h1>Spatial Objects</h1>
00011 
00012    <div id="content">
00013 
00014       <h2>Index</h2>
00015 
00016       <?php echo $view->getHelper()->getHtmlFormattedFlash() ?>
00017 
00018       <form method="post" action="">
00019 
00020          <p class="help">Indexing is only necessary for spatial searching. Changes
00021             made to object spatial boundaries in CONTENTdm&reg; will not be reflected
00022             in spatial search queries until the index is updated.</p>
00023          <p class="help">The spatial metadata in the chosen spatial coverage
00024             field must be encoded in <a href="http://dublincore.org/documents/dcmi-box/">DCMI
00025             Box</a> or <a href="http://dublincore.org/documents/dcmi-point/">DCMI
00026             Point</a> with <a href="http://dublincore.org/documents/dcmi-box/#sec3">DCSV
00027             syntax</a>, in decimal degrees.</p>
00028 
00029          <fieldset>
00030             <legend>Collections</legend>
00031             <table class="columnar" cellpadding="0" cellspacing="2" border="0">
00032                <tr>
00033                   <th>Collection</th>
00034                   <th>Num Objects</th>
00035                   <th>Indexed Objects</th>
00036                   <th>DCSV DCMI Box/Point coverage field</th>
00037                </tr>
00038                <?php $i = 0; foreach ($view->getVar("collections") as $c): ?>
00039                   <tr <?php echo (!($i & 1)) ? 'class="odd"' : "" ?>>
00040                      <td>
00041                         <label>
00042                            <input type="radio" name="alias"
00043                               value="<?php echo $c->getAlias() ?>"/>
00044                            <?php echo DMString::websafe($c->getName()) ?>
00045                         </label>
00046                      </td>
00047                      <td><?php echo number_format($c->getNumObjects()) ?></td>
00048                      <td><?php echo number_format(UNLVSpatial::getDataStore()->getNumObjectsInCollection($c)) ?></td>
00049                      <td>
00050                         <select name="fields[<?php echo $c->getAlias() ?>]"
00051                               style="width:100%">
00052                            <?php foreach ($c->getFields() as $field): ?>
00053                               <option value="<?php echo $field->getNick() ?>"
00054                                     <?php if ($field->getNick() == "covera"):
00055                                           echo 'selected="selected"';
00056                                     endif; ?>><?php echo $field->getName() ?></option>
00057                            <?php endforeach ?>
00058                         </select>
00059                      </td>
00060                   </tr>
00061                <?php $i++; endforeach ?>
00062             </table>
00063          </fieldset>
00064 
00065          <input type="submit" value="(Re-)Index Selected Collection"/>
00066       
00067          <?php if ($view->getVar("indexer")): ?>
00068             <h3>Results</h3>
00069             <?php echo $view->getHelper()->getHtmlIndexerSummary() ?>
00070          <?php else: ?>
00071             <p class="help">This may take a while for large numbers of objects.</p>
00072          <?php endif ?>
00073 
00074       </form>
00075    </div> <!-- #content -->
00076 
00077    <?php include_once($tpl_includes . "/footer.html.php") ?>
 All Data Structures Functions Variables