Class: ODDB::State::Admin::Global

Inherits:
Global show all
Defined in:
src/state/admin/root.rb,
src/state/admin/admin.rb,
src/state/admin/global.rb,
src/state/global_predefine.rb

Direct Known Subclasses

ActiveAgent, AddressSuggestion, Addresses, AjaxActiveAgents, AjaxCompositions, AjaxParts, AssignDeprivedSequence, AssignFachinfo, AtcClass, CommercialForm, CommercialForms, Confirm, DeductiblePackage, Entities, Entity, FachinfoConfirm, GalenicForm, GalenicGroup, GalenicGroups, Indication, Indications, Init, Logout, MergeCommercialForm, MergeGalenicForm, MergeIndication, OrphanedFachinfoAssign, OrphanedFachinfos, OrphanedPatinfo, OrphanedPatinfoAssign, OrphanedPatinfos, Package, PasswordReset, Patent, PatinfoDeprivedSequences, PatinfoPreview, PatinfoStatsCommon, Registration, ResellerRegistration, ResellerSequence, SelectIndication, SelectSubstance, Sequence, SlEntry, Sponsor, StubResolvedRootState, StubResolvedState, WaitForFachinfo

Constant Summary

HOME_STATE =
State::Admin::Init
ZONE =
:admin

Constants inherited from Global

DIRECT_EVENT, GLOBAL_MAP, HOME_STATE, LIMITED, PRINT_STATES, READONLY_STATES, RESOLVE_STATES, REVERSE_MAP, VIEW, ZONE_NAVIGATION

Constants included from UmlautSort

FILTER_PAIRS

Instance Method Summary (collapse)

Methods inherited from Global

#_search_drugs, #_search_drugs_state, #_trigger, #add_to_interaction_basket, #allowed?, #atc_chooser, #checkout, #clear_interaction_basket, #creditable?, #direct_request_path, #doctorlist, #download, #export_csv, #extend, #fachinfo, #feedbacks, #help_navigation, #home_navigation, #home_state, #hospitallist, #interaction_basket, #limit_state, #limited?, #logout, #navigation, #notify, #password_reset, #paypal_return, #powerlink, #print, #proceed_download, #proceed_poweruser, #resolve, #resolve_state, #rss, #search, #show, #snapback_event, #sort, #sponsorlink, #suggest_address, #switch, #unique_email, #user_input, #user_navigation, #ywesee_contact, #zones

Methods included from LoginMethods

#autologin, #login

Methods included from UmlautSort

#sort_model, #umlaut_filter

Instance Method Details

- (Object) zone_navigation



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'src/state/admin/global.rb', line 13

def zone_navigation
  links = [ 
    ['create', 'org.oddb.registration', :new_registration],
    ['view', 'org.oddb.patinfo_stats', State::Admin::PatinfoStats],
    ['edit', 'org.oddb.model.!sponsor.*', State::Admin::],
    ['edit', 'org.oddb.model.!indication.*', State::Admin::Indications],
    ['edit', 'org.oddb.model.!galenic_group.*', State::Admin::GalenicGroups],
    ['edit', 'org.oddb.model.!address.*', State::Admin::Addresses],
    ['view', 'org.oddb.patinfo_stats.associated', 
      State::Admin::PatinfoStatsCompanyUser],
    ['edit', 'yus.entities', State::Admin::Entities],
    ['edit', 'org.oddb.model.!galenic_group.*', State::Admin::CommercialForms],
  ]
  links.inject([]) { |memo, (action, item, link)|
    memo.push(link) if(@session.allowed?(action, item))
    memo
  }
end