'Helper function to construct the event type header
@param event_type: the event type (Row)
@returns: dict of view items'

def get_header(self, event_type=None):

    T = current.T
    output = {}
    if event_type:
        event_type_name = T(event_type.name)
        name_class = 'event-type-name'
    else:
        event_type_name = T('Please    select    an    event    type')
        name_class = 'event-type-name    placeholder'
    event_type_header = DIV(H4(SPAN(T(event_type_name), _class=name_class), SPAN(ICON('settings'), _class='event-type-setting'), _class='event-type-toggle', _id='event-type-toggle'), _class='event-type-header')
    output['event_type'] = event_type_header
    event_types = self.get_event_types()
    buttons = []
    for (k, v) in event_types.items():
        if (k != '_default'):
            button = LI(A(T(v.name), _class='secondary    button    event-type-selector', data={'code': s3_str(v.code), 'name': s3_str(T(v.name))}))
            buttons.append(button)
    output['event_type_selector'] = UL(buttons, _class='button-group    stack    hide    event-type-selector', _id='event-type-selector')
    return output
