Main page - disable hover info for package/user links (#4545)

* Main page - Only show hover info for favorites

in package, user links

suppress titles for non-favorite repositories

* always suppress loading titles in repo overview

Co-authored-by: Lars Hvam <larshp@hotmail.com>
This commit is contained in:
Frederik Hudák 2021-02-20 17:22:25 +01:00 committed by GitHub
parent 982679b40d
commit e68feff2e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 13 deletions

View File

@ -127,19 +127,21 @@ CLASS zcl_abapgit_gui_chunk_lib DEFINITION
zcx_abapgit_exception .
CLASS-METHODS render_package_name
IMPORTING
!iv_package TYPE devclass
!iv_interactive TYPE abap_bool DEFAULT abap_true
!iv_package TYPE devclass
!iv_interactive TYPE abap_bool DEFAULT abap_true
!iv_suppress_title TYPE abap_bool DEFAULT abap_false
RETURNING
VALUE(ri_html) TYPE REF TO zif_abapgit_html
VALUE(ri_html) TYPE REF TO zif_abapgit_html
RAISING
zcx_abapgit_exception .
CLASS-METHODS render_user_name
IMPORTING
!iv_username TYPE xubname
!iv_interactive TYPE abap_bool DEFAULT abap_true
!iv_icon_only TYPE abap_bool DEFAULT abap_false
!iv_username TYPE xubname
!iv_interactive TYPE abap_bool DEFAULT abap_true
!iv_icon_only TYPE abap_bool DEFAULT abap_false
!iv_suppress_title TYPE abap_bool DEFAULT abap_false
RETURNING
VALUE(ri_html) TYPE REF TO zif_abapgit_html
VALUE(ri_html) TYPE REF TO zif_abapgit_html
RAISING
zcx_abapgit_exception .
CLASS-METHODS render_transport
@ -692,8 +694,10 @@ CLASS zcl_abapgit_gui_chunk_lib IMPLEMENTATION.
RETURN.
ENDIF.
SELECT SINGLE ctext FROM tdevct INTO lv_title
WHERE devclass = iv_package AND spras = sy-langu ##SUBRC_OK.
IF iv_suppress_title = abap_false.
SELECT SINGLE ctext FROM tdevct INTO lv_title
WHERE devclass = iv_package AND spras = sy-langu ##SUBRC_OK.
ENDIF.
lv_obj_name = iv_package.
lv_jump = zcl_abapgit_html_action_utils=>jump_encode(
@ -950,7 +954,7 @@ CLASS zcl_abapgit_gui_chunk_lib IMPLEMENTATION.
RETURN.
ENDIF.
IF iv_username <> zcl_abapgit_objects_super=>c_user_unknown.
IF iv_username <> zcl_abapgit_objects_super=>c_user_unknown AND iv_suppress_title = abap_false.
CALL FUNCTION 'SUSR_USER_ADDRESS_READ'
EXPORTING
user_name = iv_username

View File

@ -349,7 +349,9 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_REPO_OVER IMPLEMENTATION.
ENDIF.
ii_html->add( |<td>| ).
ii_html->add( zcl_abapgit_gui_chunk_lib=>render_package_name( <ls_overview>-package ) ).
ii_html->add( zcl_abapgit_gui_chunk_lib=>render_package_name(
iv_package = <ls_overview>-package
iv_suppress_title = abap_true ) ).
ii_html->add( |</td>| ).
IF <ls_overview>-branch IS INITIAL.
@ -363,11 +365,15 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_REPO_OVER IMPLEMENTATION.
ENDIF.
ii_html->add( |<td class="ro-detail">| ).
ii_html->add( zcl_abapgit_gui_chunk_lib=>render_user_name( <ls_overview>-deserialized_by ) ).
ii_html->add( zcl_abapgit_gui_chunk_lib=>render_user_name(
iv_username = <ls_overview>-deserialized_by
iv_suppress_title = abap_true ) ).
ii_html->add( |</td>| ).
ii_html->add( |<td class="ro-detail">{ <ls_overview>-deserialized_at }</td>| ).
ii_html->add( |<td class="ro-detail">| ).
ii_html->add( zcl_abapgit_gui_chunk_lib=>render_user_name( <ls_overview>-created_by ) ).
ii_html->add( zcl_abapgit_gui_chunk_lib=>render_user_name(
iv_username = <ls_overview>-created_by
iv_suppress_title = abap_true ) ).
ii_html->add( |</td>| ).
ii_html->add( |<td class="ro-detail">{ <ls_overview>-created_at }</td>| ).
ii_html->add( |<td class="ro-detail">{ <ls_overview>-key }</td>| ).