All files / src/ui/lib zcl_abapgit_html_toolbar_lib.clas.abap

100% Statements 75/75
100% Branches 1/1
100% Functions 1/1
100% Lines 75/75

Press n or j to go to the next uncovered block, b, p or k for the previous block.

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 761x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x  
CLASS zcl_abapgit_html_toolbar_lib DEFINITION
  PUBLIC
  FINAL
  CREATE PUBLIC .
 
  PUBLIC SECTION.
    CLASS-METHODS render_repo_settings_dropdown
      IMPORTING
        io_toolbar  TYPE REF TO zcl_abapgit_html_toolbar
        iv_key      TYPE zif_abapgit_persistence=>ty_value
        iv_opt      TYPE c OPTIONAL
        iv_class    TYPE string OPTIONAL
        iv_li_class TYPE string OPTIONAL.
  PROTECTED SECTION.
  PRIVATE SECTION.
    CLASS-METHODS build_repo_settings_dropdown
      IMPORTING
        iv_key            TYPE zif_abapgit_persistence=>ty_value
        iv_class          TYPE string OPTIONAL
      RETURNING
        VALUE(ro_toolbar) TYPE REF TO zcl_abapgit_html_toolbar.
ENDCLASS.
 
 
 
CLASS zcl_abapgit_html_toolbar_lib IMPLEMENTATION.
 
  METHOD render_repo_settings_dropdown.
 
    ASSERT io_toolbar IS BOUND.
 
    io_toolbar->add( iv_txt      = 'Repo Settings'
                     io_sub      = build_repo_settings_dropdown( iv_key   = iv_key
                                                                 iv_class = iv_class )
                     iv_opt      = iv_opt
                     iv_title    = `Repository Settings`
                     iv_class    = iv_class
                     iv_li_class = iv_li_class ).
 
  ENDMETHOD.
 
 
  METHOD build_repo_settings_dropdown.
 
    CREATE OBJECT ro_toolbar.
 
    ro_toolbar->add(
      iv_txt   = 'Repository'
      iv_act   = |{ zif_abapgit_definitions=>c_action-repo_settings }?key={ iv_key }|
      iv_class = iv_class
      iv_title = `Repository Settings`
    )->add(
      iv_txt   = 'Local'
      iv_act   = |{ zif_abapgit_definitions=>c_action-repo_local_settings }?key={ iv_key }|
      iv_class = iv_class
      iv_title = `Local Settings`
    )->add(
      iv_txt   = 'Remote'
      iv_act   = |{ zif_abapgit_definitions=>c_action-repo_remote_settings }?key={ iv_key }|
      iv_class = iv_class
      iv_title = `Remote Settings`
    )->add(
      iv_txt   = 'Background'
      iv_act   = |{ zif_abapgit_definitions=>c_action-repo_background }?key={ iv_key }|
      iv_class = iv_class
      iv_title = `Background Settings`
    )->add(
      iv_txt   = 'Stats'
      iv_act   = |{ zif_abapgit_definitions=>c_action-repo_infos }?key={ iv_key }|
      iv_class = iv_class
      iv_title = `Statistics` ).
 
  ENDMETHOD.
 
ENDCLASS.