Rev 1137 | Rev 1141 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1137 | Rev 1138 | ||
---|---|---|---|
Line 728... | Line 728... | ||
728 | $out['text'] = str_replace('%%RA_INFO%%', OIDplusPagePublicRaInfo::showRaInfo($obj->getRaMail()), $out['text']); |
728 | $out['text'] = str_replace('%%RA_INFO%%', OIDplusPagePublicRaInfo::showRaInfo($obj->getRaMail()), $out['text']); |
729 | 729 | ||
730 | $alt_ids = $obj->getAltIds(); |
730 | $alt_ids = $obj->getAltIds(); |
731 | if (count($alt_ids) > 0) { |
731 | if (count($alt_ids) > 0) { |
732 | $out['text'] .= '<h2>'._L('Alternative Identifiers').'</h2>'; |
732 | $out['text'] .= '<h2>'._L('Alternative Identifiers').'</h2>'; |
- | 733 | ||
- | 734 | // Sorty by namespace |
|
- | 735 | usort($alt_ids, function(OIDplusAltId $a, OIDplusAltId $b) { |
|
- | 736 | if($a->getNamespace() > $b->getNamespace()) { |
|
- | 737 | return 1; |
|
- | 738 | } |
|
- | 739 | elseif($a->getNamespace() < $b->getNamespace()) { |
|
- | 740 | return -1; |
|
- | 741 | } |
|
- | 742 | else { |
|
- | 743 | return 0; |
|
- | 744 | } |
|
- | 745 | }); |
|
- | 746 | ||
- | 747 | $out['text'] .= '<div class="container box"><div id="suboid_table" class="table-responsive">'; |
|
- | 748 | $out['text'] .= '<table class="table table-bordered table-striped">'; |
|
- | 749 | $out['text'] .= '<thead>'; |
|
- | 750 | $out['text'] .= '<tr><th>'._L('Identifier').'</th><th>'._L('Description').'</th></tr>'; |
|
- | 751 | $out['text'] .= '</thead>'; |
|
- | 752 | $out['text'] .= '<tbody>'; |
|
733 | foreach ($alt_ids as $alt_id) { |
753 | foreach ($alt_ids as $alt_id) { |
734 | $ns = $alt_id->getNamespace(); |
754 | $ns = $alt_id->getNamespace(); |
735 | $aid = $alt_id->getId(); |
755 | $aid = $alt_id->getId(); |
736 | $aiddesc = $alt_id->getDescription(); |
756 | $aiddesc = $alt_id->getDescription(); |
737 | $suffix = $alt_id->getSuffix(); |
757 | $suffix = $alt_id->getSuffix(); |
738 | $out['text'] .= "$aiddesc: <code>$ns:$aid</code>$suffix<br>"; |
758 | $out['text'] .= '<tr><td>'.htmlentities($ns.':'.$aid).($suffix ? '<br/><font size="-1">'.htmlentities($suffix).'</font>' : '').'</td><td>'.htmlentities($aiddesc).'</td></tr>'; |
739 | } |
759 | } |
- | 760 | $out['text'] .= '</tbody>'; |
|
- | 761 | $out['text'] .= '</table>'; |
|
- | 762 | $out['text'] .= '</div></div>'; |
|
740 | } |
763 | } |
741 | 764 | ||
742 | foreach (OIDplus::getAllPlugins() as $plugin) { |
765 | foreach (OIDplus::getAllPlugins() as $plugin) { |
743 | if ($plugin instanceof INTF_OID_1_3_6_1_4_1_37476_2_5_2_3_2) { |
766 | if ($plugin instanceof INTF_OID_1_3_6_1_4_1_37476_2_5_2_3_2) { |
744 | $plugin->modifyContent($obj->nodeId(), $out['title'], $out['icon'], $out['text']); |
767 | $plugin->modifyContent($obj->nodeId(), $out['title'], $out['icon'], $out['text']); |
Line 993... | Line 1016... | ||
993 | 1016 | ||
994 | $enable_weid_presentation = OIDplus::config()->getValue('oid_grid_show_weid'); |
1017 | $enable_weid_presentation = OIDplus::config()->getValue('oid_grid_show_weid'); |
995 | 1018 | ||
996 | $output = '<div class="container box"><div id="suboid_table" class="table-responsive">'; |
1019 | $output = '<div class="container box"><div id="suboid_table" class="table-responsive">'; |
997 | $output .= '<table class="table table-bordered table-striped">'; |
1020 | $output .= '<table class="table table-bordered table-striped">'; |
- | 1021 | $output .= '<thead>'; |
|
998 | $output .= ' <tr>'; |
1022 | $output .= ' <tr>'; |
999 | $output .= ' <th>'._L('ID').(($parentNS == 'gs1') ? ' '._L('(without check digit)') : '').'</th>'; |
1023 | $output .= ' <th>'._L('ID').(($parentNS == 'gs1') ? ' '._L('(without check digit)') : '').'</th>'; |
1000 | if ($enable_weid_presentation && ($parentNS == 'oid') && !$objParent->isRoot()) { |
1024 | if ($enable_weid_presentation && ($parentNS == 'oid') && !$objParent->isRoot()) { |
1001 | $output .= ' <th><abbr title="'._L('Binary-to-text encoding used for WEIDs').'">'._L('Base36').'</abbr></th>'; |
1025 | $output .= ' <th><abbr title="'._L('Binary-to-text encoding used for WEIDs').'">'._L('Base36').'</abbr></th>'; |
1002 | } |
1026 | } |
Line 1012... | Line 1036... | ||
1012 | $output .= ' <th>'._L('Delete').'</th>'; |
1036 | $output .= ' <th>'._L('Delete').'</th>'; |
1013 | } |
1037 | } |
1014 | $output .= ' <th>'._L('Created').'</th>'; |
1038 | $output .= ' <th>'._L('Created').'</th>'; |
1015 | $output .= ' <th>'._L('Updated').'</th>'; |
1039 | $output .= ' <th>'._L('Updated').'</th>'; |
1016 | $output .= ' </tr>'; |
1040 | $output .= ' </tr>'; |
- | 1041 | $output .= '</thead>'; |
|
- | 1042 | $output .= '<tbody>'; |
|
1017 | 1043 | ||
1018 | foreach ($rows as list($obj,$row)) { |
1044 | foreach ($rows as list($obj,$row)) { |
1019 | $items_total++; |
1045 | $items_total++; |
1020 | if (!$obj->userHasReadRights()) { |
1046 | if (!$obj->userHasReadRights()) { |
1021 | $items_hidden++; |
1047 | $items_hidden++; |
Line 1125... | Line 1151... | ||
1125 | $output .= ' <td><button type="button" name="insert" id="insert" class="btn btn-success btn-xs update" onclick="OIDplusPagePublicObjects.crudActionInsert('.js_escape($parent).')">'._L('Insert').'</button></td>'; |
1151 | $output .= ' <td><button type="button" name="insert" id="insert" class="btn btn-success btn-xs update" onclick="OIDplusPagePublicObjects.crudActionInsert('.js_escape($parent).')">'._L('Insert').'</button></td>'; |
1126 | $output .= ' <td></td>'; |
1152 | $output .= ' <td></td>'; |
1127 | $output .= ' <td></td>'; |
1153 | $output .= ' <td></td>'; |
1128 | $output .= ' <td></td>'; |
1154 | $output .= ' <td></td>'; |
1129 | $output .= '</tr>'; |
1155 | $output .= '</tr>'; |
- | 1156 | $output .= '</tbody>'; |
|
1130 | } else { |
1157 | } else { |
- | 1158 | $output .= '</tbody>'; |
|
1131 | if ($items_total-$items_hidden == 0) { |
1159 | if ($items_total-$items_hidden == 0) { |
1132 | $cols = ($parentNS == 'oid') ? 7 : 5; |
1160 | $cols = ($parentNS == 'oid') ? 7 : 5; |
1133 | if ($enable_weid_presentation && ($parentNS == 'oid') && !$objParent->isRoot()) { |
1161 | if ($enable_weid_presentation && ($parentNS == 'oid') && !$objParent->isRoot()) { |
1134 | $cols++; |
1162 | $cols++; |
1135 | } |
1163 | } |
- | 1164 | $output .= '<tfoot>'; |
|
1136 | $output .= '<tr><td colspan="'.$cols.'">'._L('No items available').'</td></tr>'; |
1165 | $output .= '<tr><td colspan="'.$cols.'">'._L('No items available').'</td></tr>'; |
- | 1166 | $output .= '</tfoot>'; |
|
1137 | } |
1167 | } |
1138 | } |
1168 | } |
1139 | 1169 | ||
1140 | $output .= '</table>'; |
1170 | $output .= '</table>'; |
1141 | $output .= '</div></div>'; |
1171 | $output .= '</div></div>'; |