?>
<p class='controlled-vocab-explanation'>A URI that identifies the vocabular.</p>
</div>

<div class="input">


<?php 
echo text(array('name' => 'api_url', 'value' => $controlledvocab_vocab->api_url), $controlledvocab_vocab->api_url, 'API URL');
?>
<p class='controlled-vocab-explanation'>A URL of a service that provides a web service onto the vocabulary.</p>
</div>

<div class="input">
<?php 
echo select_collection(array('name' => 'collection_ids', 'multiple' => 'true'), unserialize($controlledvocab_vocab->collection_ids), 'Collections');
?>
<p class='controlled-vocab-explanation'>The collections to which the vocabulary applies.</p>
</div>

<?php 
echo submit(array('class' => 'submit'));
?>
</form>
<p id="delete_item_link">
	<a class="delete" href="<?php 
echo uri('controlled-vocab/vocabs/delete/delete/') . $controlledvocab_vocab->id;
?>
">Delete This Item</a>       
</p>
</fieldset>
<div class="input">


<?php 
echo text(array('name' => 'uri', 'value' => $controlledvocab_vocab->uri), '', 'Uri');
?>
</div>

<div class="input">


<?php 
echo text(array('name' => 'api_url', 'value' => $controlledvocab_vocab->uri), '', 'API URL');
?>
</div>

<div class="input">
<?php 
echo select_collection(array('name' => 'collection_ids', 'multiple' => 'true'), '', 'Collections');
?>
</div>

<?php 
echo submit(array('class' => 'submit'));
?>
</form>

</fieldset>

<?php 
foot();
Esempio n. 3
0
$db = get_db();
$basics = "<div class='feed-importer-field'><label>Feed URL</label>" . text(array('name' => 'feed_url', 'value' => $feedimporter_feed->feed_url), $feedimporter_feed->feed_url) . "</div>";
$basics .= "<div class='feed-importer-field'><label>Feed Title</label>" . text(array('name' => 'feed_title', 'value' => $feedimporter_feed->feed_title), $feedimporter_feed->feed_title) . "</div>";
$basics .= "<div class='feed-importer-field'><label>Feed Description</label>" . textarea(array('name' => 'feed_description', 'value' => $feedimporter_feed->feed_description, 'rows' => '5', 'cols' => '50'), $feedimporter_feed->feed_description) . "</div>";
//$basics .= "</div>";
$tabs['Basics'] = $basics;
//feed settings sets up start and end dates for importing from feed, and frequency with which to check the feed
$feedSettings = "<div class='feed-importer-field'><label>Import Start Date</label><input id='import-start-date' class='date' type='text' /></div>";
//jquery a date popup
$feedSettings .= "<div class='feed-importer-field'><label>Import End Date</label><input id='import-end-date' class='date'  type='text' /></div>";
//jquery a date popup
$updateFreqVals = array('0' => "Manual Updates Only", '1800' => 'Half hour', '3600' => 'Hour', '86400' => 'Daily', '604800' => 'Weekly');
$feedSettings .= "<div class='feed-importer-field'><label>Update Frequency</label>" . select(array('name' => 'update_frequency'), $updateFreqVals, $feedimporter_feed->update_frequency) . "</div>";
$tabs['Feed Settings'] = $feedSettings;
$collectionSettings = "<div class='feed-importer-field'><label>Collect by</label>" . select(array('name' => 'collect_by'), array('feed' => 'Feed', 'tag' => 'Tags', 'author' => 'Authors'), $feedimporter_feed->collect_by) . "</div>";
$collectionSettings .= "<div class='feed-importer-field'><label>Collection for items in feed</label>" . select_collection(array('name' => 'collection_id', 'value' => $feedimporter_feed->collection_id), $feedimporter_feed->collection_id);
$collectionSettings .= "<p>Or create new collection from feed info " . checkbox(array('name' => 'new_collection'));
$collectionSettings .= ajax_create_dialog(array('type' => 'Collection', 'target' => '#collection_id'));
$tabs['Collection Handling'] = $collectionSettings;
//itemTypeHandling tells what Item Type to use for imported items, and what Element to use if content is imported
//TODO: ajax to return the right options for element based on choice of item type
$itemTypeTable = $db->getTable('ItemType');
$itemTypesArray = $itemTypeTable->findPairsForSelectForm();
//Dig up all the elements for each item type and make into <option>s for javascript to switch around when user selects an item type
//put them into an object, then serialize it to JSON
$itemTypeElementsObj = new stdClass();
foreach ($itemTypesArray as $id => $name) {
    $optionsHTML = "";
    $itemType = $itemTypeTable->find($id);
    foreach ($itemType->Elements as $element) {
        $optionsHTML .= "<option value='{$element->id}' label='{$element->name}' >{$element->name}</option";
Esempio n. 4
0
	<td><?php 
    echo $tag->original_name;
    ?>
</td>
	
	<td>
		<?php 
    echo checkbox(array('name' => "tc[{$tag->id}][skip]"), $tag->skip);
    ?>
	</td>
	<td><?php 
    echo text(array('name' => "tc[{$tag->id}][pref_name]", 'size' => '10'), $tag->getName());
    ?>
</td>
	<td><?php 
    echo select_collection(array('class' => 'feed-importer-collection', 'name' => "tc[{$tag->id}][collection_id]"), $tag->collection_id);
    echo select(array('name' => "tc[{$tag->id}][collection_id_priority]"), $priorityArray, $tag->collection_id_priority, "Priority");
    ?>

	</td>
	<td>
	<?php 
    echo select_item_type(array('class' => 'feed-importer-item-type', 'name' => "tc[{$tag->id}][item_type_id]"));
    echo select(array('name' => "tc[{$tag->id}][item_type_id_priority]"), $priorityArray, $tag->item_type_id_priority, "Priority");
    ?>
	
	</td>
	<td>
		<?php 
    echo select(array('class' => 'feed-importer-tag', 'multiple' => 'true', 'size' => '5', 'name' => "tc[{$tag->id}][tags_map]"), $tagPairs, unserialize($tag->tags_map));
    ?>