Browse Source

Make a little closed to convertQDC.xsl

pull/126/head
Adam Vessey 13 years ago committed by Adam Vessey
parent
commit
2d9c55fc5d
  1. 39
      ObjectHelper.inc
  2. 3
      plugins/tagging_form.inc

39
ObjectHelper.inc

@ -426,16 +426,35 @@ class ObjectHelper {
$rows = array();
foreach ($simplexml->getNamespaces(TRUE) as $ns) {
foreach ($simplexml->children($ns) as $child) {
$rows[] = array(
array(
'data' => $child->getName(),
'class' => 'dc-tag-name',
),
array(
'data' => (string)$child,
'class' => 'dc-content',
),
);
$data = array();
$rendered_data = '';
if ($grand_children = $child->children()) {
foreach($grand_children as $grand_child) {
$data[] = $grand_child->tagName() . ' = ' . (string)$grand_child;
}
}
else {
$rendered_data = (string)$child;
}
if ($data) {
$rendered_data = theme('item_list', $data);
}
if ($rendered_data) {
$rows[] = array(
array(
'data' => $child->getName(),
'class' => 'dc-tag-name',
),
array(
'data' => $rendered_data,
'class' => 'dc-content',
),
);
}
}
}

3
plugins/tagging_form.inc

@ -61,10 +61,11 @@ function fedora_repository_image_tagging_form($form_state, $pid) {
$tagset = new TagSet($obj);
$tags = array();
foreach ($tagset->tags as $tag) {
$form_tag =& $form['tags-wrapper']['tags'][$tag['name']] = array(
$form['tags-wrapper']['tags'][$tag['name']] = array(
'#prefix' => '<li>',
'#suffix' => '</li>',
);
$form_tag =& $form['tags-wrapper']['tags'][$tag['name']];
$tag_title_text = t('Added by @creator.', array(
'@creator' => $tag['creator'],

Loading…
Cancel
Save