Add top repo menu to more pages (#3764)

* Add top repo menu to more pages

- diff, patch
- syntax check, code inspector
- repo settings

* Add to syntax check page, add margin

Co-authored-by: Lars Hvam <larshp@hotmail.com>
This commit is contained in:
Frederik Hudák 2020-08-22 09:53:35 +02:00 committed by GitHub
parent f5052cf0b6
commit a824368a4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 27 additions and 11 deletions

View File

@ -150,6 +150,7 @@ div.log .icon { padding-right: 6px; }
/* REPOSITORY */ /* REPOSITORY */
div.repo { div.repo {
margin-top: 3px; margin-top: 3px;
margin-bottom: 3px;
padding: 0.5em 1em 0.5em 1em; padding: 0.5em 1em 0.5em 1em;
position: relative; position: relative;
} }
@ -959,7 +960,7 @@ table.commit tr .title {
.floating-button { .floating-button {
position: fixed; position: fixed;
top: 6em; top: 8em;
right: 2.8em; right: 2.8em;
padding: 1em 1.8em; padding: 1em 1.8em;
border-radius: 4px; border-radius: 4px;

View File

@ -175,6 +175,10 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_CODE_INSP IMPLEMENTATION.
CREATE OBJECT ri_html TYPE zcl_abapgit_html. CREATE OBJECT ri_html TYPE zcl_abapgit_html.
ri_html->add( `<div class="repo">` ).
ri_html->add( zcl_abapgit_gui_chunk_lib=>render_repo_top( mo_repo ) ).
ri_html->add( `</div>` ).
IF mv_check_variant IS INITIAL. IF mv_check_variant IS INITIAL.
ri_html->add( zcl_abapgit_gui_chunk_lib=>render_error( iv_error = 'No check variant supplied.' ) ). ri_html->add( zcl_abapgit_gui_chunk_lib=>render_error( iv_error = 'No check variant supplied.' ) ).
RETURN. RETURN.
@ -184,10 +188,6 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_CODE_INSP IMPLEMENTATION.
ri_html->add( '<div class="ci-head">' ). ri_html->add( '<div class="ci-head">' ).
ri_html->add( |Code inspector check variant: <span class="ci-variant">{ mv_check_variant }</span>| ). ri_html->add( |Code inspector check variant: <span class="ci-variant">{ mv_check_variant }</span>| ).
ri_html->add( |<div class="float-right package-name">{
zcl_abapgit_html=>icon( 'box/grey70' ) }<span>{
mo_repo->get_package( ) }</span></div>| ).
ri_html->add( '</div>' ).
IF lines( mt_result ) = 0. IF lines( mt_result ) = 0.
ri_html->add( '<div class="dummydiv success">' ). ri_html->add( '<div class="dummydiv success">' ).

View File

@ -131,7 +131,9 @@ CLASS zcl_abapgit_gui_page_diff DEFINITION
IMPORTING IMPORTING
!is_diff TYPE ty_file_diff !is_diff TYPE ty_file_diff
RETURNING RETURNING
VALUE(ro_html) TYPE REF TO zcl_abapgit_html . VALUE(ro_html) TYPE REF TO zcl_abapgit_html
RAISING
zcx_abapgit_exception .
METHODS render_beacon METHODS render_beacon
IMPORTING IMPORTING
!is_diff_line TYPE zif_abapgit_definitions=>ty_diff !is_diff_line TYPE zif_abapgit_definitions=>ty_diff
@ -584,6 +586,10 @@ CLASS zcl_abapgit_gui_page_diff IMPLEMENTATION.
li_progress = zcl_abapgit_progress=>get_instance( lines( mt_diff_files ) ). li_progress = zcl_abapgit_progress=>get_instance( lines( mt_diff_files ) ).
ri_html->add( `<div class="repo">` ).
ri_html->add( zcl_abapgit_gui_chunk_lib=>render_repo_top( mo_repo ) ).
ri_html->add( `</div>` ).
ri_html->add( |<div id="diff-list" data-repo-key="{ mv_repo_key }">| ). ri_html->add( |<div id="diff-list" data-repo-key="{ mv_repo_key }">| ).
ri_html->add( zcl_abapgit_gui_chunk_lib=>render_js_error_banner( ) ). ri_html->add( zcl_abapgit_gui_chunk_lib=>render_js_error_banner( ) ).
LOOP AT mt_diff_files INTO ls_diff_file. LOOP AT mt_diff_files INTO ls_diff_file.
@ -914,9 +920,8 @@ CLASS zcl_abapgit_gui_page_diff IMPLEMENTATION.
METHOD render_table_head. METHOD render_table_head.
CREATE OBJECT ro_html. CREATE OBJECT ro_html.
ro_html->add( '<thead class="header">' ).
ro_html->add( '<thead class="header">' ). "#EC NOTEXT ro_html->add( '<tr>' ).
ro_html->add( '<tr>' ). "#EC NOTEXT
IF mv_unified = abap_true. IF mv_unified = abap_true.
@ -930,8 +935,8 @@ CLASS zcl_abapgit_gui_page_diff IMPLEMENTATION.
ENDIF. ENDIF.
ro_html->add( '</tr>' ). "#EC NOTEXT ro_html->add( '</tr>' ).
ro_html->add( '</thead>' ). "#EC NOTEXT ro_html->add( '</thead>' ).
ENDMETHOD. ENDMETHOD.

View File

@ -93,6 +93,11 @@ CLASS zcl_abapgit_gui_page_repo_sett IMPLEMENTATION.
METHOD render_content. METHOD render_content.
CREATE OBJECT ri_html TYPE zcl_abapgit_html. CREATE OBJECT ri_html TYPE zcl_abapgit_html.
ri_html->add( `<div class="repo">` ).
ri_html->add( zcl_abapgit_gui_chunk_lib=>render_repo_top( mo_repo ) ).
ri_html->add( `</div>` ).
ri_html->add( '<div class="settings_container">' ). ri_html->add( '<div class="settings_container">' ).
ri_html->add( |<form id="settings_form" method="post" action="sapevent:{ c_action-save_settings }">| ). ri_html->add( |<form id="settings_form" method="post" action="sapevent:{ c_action-save_settings }">| ).

View File

@ -57,6 +57,11 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_SYNTAX IMPLEMENTATION.
METHOD render_content. METHOD render_content.
CREATE OBJECT ri_html TYPE zcl_abapgit_html. CREATE OBJECT ri_html TYPE zcl_abapgit_html.
ri_html->add( `<div class="repo">` ).
ri_html->add( zcl_abapgit_gui_chunk_lib=>render_repo_top( mo_repo ) ).
ri_html->add( `</div>` ).
ri_html->add( '<div class="toc">' ). ri_html->add( '<div class="toc">' ).
IF lines( mt_result ) = 0. IF lines( mt_result ) = 0.