Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: twitterbootstr…
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 206 lines (198 sloc) 10.608 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206
<?php
$module = get_module();
$action = get_action();
$breadcrumbs = shnBreadcrumbs::getBreadcrumbs();

$title = "";
$title_pre = "";
if ($module == "events") {
    global $event;
    if ($event) {
        $title = htmlspecialchars($event->event_title);
        $title_pre = _t('EVENT_TITLE');
    }
    switch ($action) {
        case 'new_event':
            $breadcrumbs->pushCrumb(array('name' => _t('NEW_EVENT'), 'mod' => 'events', 'act' => 'new_event'), 1);
            break;
        case 'get_event':
            $breadcrumbs->pushCrumb(array('name' => _t('VIEW_EVENT'), 'mod' => 'events', 'act' => 'get_event'), 1);
            break;
        case 'vp_list':
            $breadcrumbs->pushCrumb(array('name' => _t('VIEW_EVENT'), 'mod' => 'events', 'act' => 'get_event'), 1);
            $breadcrumbs->pushCrumb(array('name' => _t('VICTIMS_AND_PERPETRATORS'), 'mod' => 'events', 'act' => 'vp_list'), 2);
            break;
        case 'src_list':
            $breadcrumbs->pushCrumb(array('name' => _t('VIEW_EVENT'), 'mod' => 'events', 'act' => 'get_event'), 1);
            $breadcrumbs->pushCrumb(array('name' => _t('SOURCES'), 'mod' => 'events', 'act' => 'src_list'), 2);
            break;
        case 'intv_list':
            $breadcrumbs->pushCrumb(array('name' => _t('VIEW_EVENT'), 'mod' => 'events', 'act' => 'get_event'), 1);
            $breadcrumbs->pushCrumb(array('name' => _t('INTERVENTIONS'), 'mod' => 'events', 'act' => 'intv_list'), 2);
            break;
        case 'coe_list':
            $breadcrumbs->pushCrumb(array('name' => _t('VIEW_EVENT'), 'mod' => 'events', 'act' => 'get_event'), 1);
            $breadcrumbs->pushCrumb(array('name' => _t('CHAIN_OF_EVENTS'), 'mod' => 'events', 'act' => 'coe_list'), 2);
            break;
        case 'doc_list':
            $breadcrumbs->pushCrumb(array('name' => _t('VIEW_EVENT'), 'mod' => 'events', 'act' => 'get_event'), 1);
            $breadcrumbs->pushCrumb(array('name' => _t('DOCUMENTS'), 'mod' => 'events', 'act' => 'doc_list'), 2);
            break;
        case 'audit':
            $breadcrumbs->pushCrumb(array('name' => _t('VIEW_EVENT'), 'mod' => 'events', 'act' => 'get_event'), 1);
            $breadcrumbs->pushCrumb(array('name' => _t('AUDIT_LOG'), 'mod' => 'events', 'act' => 'audit'), 2);
            break;
        case 'permissions':
            $breadcrumbs->pushCrumb(array('name' => _t('VIEW_EVENT'), 'mod' => 'events', 'act' => 'get_event'), 1);
            $breadcrumbs->pushCrumb(array('name' => _t('PERMISSIONS'), 'mod' => 'events', 'act' => 'permissions'), 2);
            break;
        case 'browse':
        default:
            //$breadcrumbs->pushCrumb(array('name' => _t('BROWSE_EVENT'), 'mod' => 'events', 'act' => 'browse'), 1);
            break;
    }
} elseif ($module == "person") {
    global $person;
    if ($person) {
        $title = htmlspecialchars($person->person_name);
        $title_pre = _t('PERSON_NAME');
    }
    switch ($action) {
        case 'new_person':
            $breadcrumbs->pushCrumb(array('name' => _t('NEW_PERSON'), 'mod' => 'person', 'act' => 'new_person'), 1);
            break;
        case 'person':
            $breadcrumbs->pushCrumb(array('name' => _t('VIEW_PERSON'), 'mod' => 'person', 'act' => 'person'), 1);
            break;
        case 'biography_list':
            $breadcrumbs->pushCrumb(array('name' => _t('VIEW_PERSON'), 'mod' => 'person', 'act' => 'person'), 1);
            $breadcrumbs->pushCrumb(array('name' => _t('BIOGRAPHIC_DETAIL_S_'), 'mod' => 'person', 'act' => 'biography_list'), 2);
            break;
        case 'role_list':
            $breadcrumbs->pushCrumb(array('name' => _t('VIEW_PERSON'), 'mod' => 'person', 'act' => 'person'), 1);
            $breadcrumbs->pushCrumb(array('name' => _t('ROLE_LIST'), 'mod' => 'person', 'act' => 'role_list'), 2);
            break;
        case 'audit_log':
            $breadcrumbs->pushCrumb(array('name' => _t('VIEW_PERSON'), 'mod' => 'person', 'act' => 'person'), 1);
            $breadcrumbs->pushCrumb(array('name' => _t('AUDIT_LOG'), 'mod' => 'person', 'act' => 'audit_log'), 2);
            break;
        case 'address_list':
            $breadcrumbs->pushCrumb(array('name' => _t('VIEW_PERSON'), 'mod' => 'person', 'act' => 'person'), 1);
            $breadcrumbs->pushCrumb(array('name' => _t('PERSON_ADDRESS_ES_'), 'mod' => 'person', 'act' => 'address_list'), 2);
            break;
        case 'permissions':
            $breadcrumbs->pushCrumb(array('name' => _t('VIEW_PERSON'), 'mod' => 'person', 'act' => 'person'), 1);
            $breadcrumbs->pushCrumb(array('name' => _t('PERMISSIONS'), 'mod' => 'person', 'act' => 'permissions'), 2);
            break;
        case 'browse':
        default:
            //$breadcrumbs->pushCrumb(array('name' => _t('BROWSE_PERSON'), 'mod' => 'person', 'act' => 'browse'), 1);
            break;
    }
} elseif ($module == "docu") {
    global $supporting_docs_meta;
    if ($supporting_docs_meta) {
        $title = htmlspecialchars($supporting_docs_meta->title);
        $title_pre = _t('DOCUMENT_TITLE');
    }
    switch ($action) {
        case 'new_document':
            $breadcrumbs->pushCrumb(array('name' => _t('NEW_DOCUMENT'), 'mod' => 'docu', 'act' => 'new_document'), 1);
            break;
        case 'view_document':
            $breadcrumbs->pushCrumb(array('name' => _t('VIEW_DOCUMENT'), 'mod' => 'docu', 'act' => 'view_document'), 1);
            break;
        case 'link':
            $breadcrumbs->pushCrumb(array('name' => _t('VIEW_DOCUMENT'), 'mod' => 'docu', 'act' => 'view_document'), 1);
            $breadcrumbs->pushCrumb(array('name' => _t('LINKS'), 'mod' => 'docu', 'act' => 'link'), 2);
            break;
        case 'audit':
            $breadcrumbs->pushCrumb(array('name' => _t('VIEW_DOCUMENT'), 'mod' => 'docu', 'act' => 'view_document'), 1);
            $breadcrumbs->pushCrumb(array('name' => _t('AUDIT_LOG'), 'mod' => 'docu', 'act' => 'audit'), 2);
            break;

        case 'browse':
        default:
            //$breadcrumbs->pushCrumb(array('name' => _t('BROWSE_DOCUMENT'), 'mod' => 'docu', 'act' => 'browse'), 1);
            break;
    }
}elseif($module == "analysis"){
     switch ($action) {
        case 'adv_search':
            $breadcrumbs->pushCrumb(array('name' => _t('ADVANCED_SEARCH'), 'mod' => 'analysis', 'act' => 'adv_search'), 1);
            break;
      
       case 'search_query':
            $breadcrumbs->pushCrumb(array('name' => _t('SAVED_QUERIES'), 'mod' => 'analysis', 'act' => 'search_query'), 1);
            break;
       case 'facetsearch':
            $breadcrumbs->pushCrumb(array('name' => _t('Charts and map'), 'mod' => 'analysis', 'act' => 'facetsearch'), 1);
            break;
      default:
            //$breadcrumbs->pushCrumb(array('name' => _t('BROWSE_DOCUMENT'), 'mod' => 'analysis', 'act' => 'browse'), 1);
            break;
    }
}elseif($module == "admin"){
    switch ($action) {
                    case 'field_customization':
                        $breadcrumbs->pushCrumb(array('name' => _t('EXISTING_FIELDS'), 'mod' => 'admin', 'act' => 'field_customization'), 1);
                        break;
                    case 'new_field':
                        $breadcrumbs->pushCrumb(array('name' => _t('ADD_NEW_FIELD'), 'mod' => 'admin', 'act' => 'new_field'), 1);
                        break;
                    case 'mt_customization':
                        $breadcrumbs->pushCrumb(array('name' => _t('MICRO_THESAURI'), 'mod' => 'admin', 'act' => 'mt_customization'), 1);
                        break;
                    case 'user_management':
                        $breadcrumbs->pushCrumb(array('name' => _t('USER_MANAGEMENT'), 'mod' => 'admin', 'act' => 'user_management'), 1);
                        break;
                    case 'add_user':
                        $breadcrumbs->pushCrumb(array('name' => _t('USER_MANAGEMENT'), 'mod' => 'admin', 'act' => 'user_management'), 1);
                        $breadcrumbs->pushCrumb(array('name' => _t('ADD_NEW_USER'), 'mod' => 'admin', 'act' => 'add_user'), 2);
                        break;
                    case 'acl':
                        $breadcrumbs->pushCrumb(array('name' => _t('USER_MANAGEMENT'), 'mod' => 'admin', 'act' => 'user_management'), 1);
                        $breadcrumbs->pushCrumb(array('name' => _t('ROLES___MODULE_ACCESS_CONTROL'), 'mod' => 'admin', 'act' => 'acl'), 2);
                        break;
                    case 'permissions':
                        $breadcrumbs->pushCrumb(array('name' => _t('USER_MANAGEMENT'), 'mod' => 'admin', 'act' => 'user_management'), 1);
                        $breadcrumbs->pushCrumb(array('name' => _t('PERMISSIONS'), 'mod' => 'admin', 'act' => 'permissions'), 2);
                        break;
                    case 'set_locale':
                        $breadcrumbs->pushCrumb(array('name' => _t('LOCALIZATION'), 'mod' => 'admin', 'act' => 'set_locale'), 1);
                        break;
                    case 'System_configuration':
                        $breadcrumbs->pushCrumb(array('name' => _t('SYSTEM_CONFIGURATION'), 'mod' => 'admin', 'act' => 'System_configuration'), 1);
                        break;
                    case 'Extensions':
                        $breadcrumbs->pushCrumb(array('name' => _t('EXTENSIONS'), 'mod' => 'admin', 'act' => 'Extensions'), 1);
                        break;

                    default:
                        //$breadcrumbs->pushCrumb(array('name' => _t('BROWSE_DOCUMENT'), 'mod' => 'admin', 'act' => 'browse'), 1);
                        break;
                }

}elseif ($module == "home") {

    switch ($action) {
        case 'edit_user':
            $breadcrumbs->pushCrumb(array('name' => _t('EDIT_PROFILE'), 'mod' => 'home', 'act' => 'edit_user'), 1);
            break;
        case 'view_homement':
            $breadcrumbs->pushCrumb(array('name' => _t('CHANGE_PASSWORD'), 'mod' => 'home', 'act' => 'edit_password'), 1);
            break;
        default:
            //$breadcrumbs->pushCrumb(array('name' => _t('BROWSE_DOCUMENT'), 'mod' => 'home', 'act' => 'browse'), 1);
            break;
    }
}
?>
<div class="row-fluid">
<div class="span12">
<?php
        $breadcrumbs->renderBreadcrumbs();
        ?>

</div>
</div>
<?php
if ($title && !in_array($action,array("browse_act","browse_intervention"))) {
    ?>
<h3 class="breadcrumb" style="padding-top:4px;padding-bottom: 4px"><?php echo '<span>' . $title_pre . '</span> : <span>' . $title . '</span>'; ?></h3>

<?php
}
?>
Something went wrong with that request. Please try again.