mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-01 04:08:27 +08:00
Add pull and diff buttons to main page (#5021)
* Add more action buttons to main page * Fix line length
This commit is contained in:
parent
93d14fcc81
commit
bd1ffd1f2e
|
@ -507,7 +507,8 @@ CLASS zcl_abapgit_gui_page_diff IMPLEMENTATION.
|
|||
it_files = it_files ).
|
||||
|
||||
IF lines( mt_diff_files ) = 0.
|
||||
zcx_abapgit_exception=>raise( 'PAGE_DIFF ERROR: No diff files found' ).
|
||||
zcx_abapgit_exception=>raise(
|
||||
'There are no differences to show. The local state completely matches the remote repository.' ).
|
||||
ENDIF.
|
||||
|
||||
ms_control-page_menu = build_menu( ).
|
||||
|
|
|
@ -180,11 +180,21 @@ CLASS zcl_abapgit_gui_page_main IMPLEMENTATION.
|
|||
ls_hotkey_action-hotkey = |s|.
|
||||
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
|
||||
|
||||
ls_hotkey_action-description = |Diff|.
|
||||
ls_hotkey_action-action = zif_abapgit_definitions=>c_action-go_repo_diff.
|
||||
ls_hotkey_action-hotkey = |d|.
|
||||
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
|
||||
|
||||
ls_hotkey_action-description = |Check|.
|
||||
ls_hotkey_action-action = zif_abapgit_definitions=>c_action-repo_code_inspector.
|
||||
ls_hotkey_action-hotkey = |c|.
|
||||
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
|
||||
|
||||
ls_hotkey_action-description = |Pull|.
|
||||
ls_hotkey_action-action = zif_abapgit_definitions=>c_action-git_reset.
|
||||
ls_hotkey_action-hotkey = |p|.
|
||||
INSERT ls_hotkey_action INTO TABLE rt_hotkey_actions.
|
||||
|
||||
ls_hotkey_action-description = |Patch|.
|
||||
ls_hotkey_action-action = zif_abapgit_definitions=>c_action-go_patch.
|
||||
ls_hotkey_action-hotkey = |p|.
|
||||
|
|
|
@ -492,7 +492,9 @@ CLASS zcl_abapgit_gui_page_repo_over IMPLEMENTATION.
|
|||
lv_settings_link TYPE string,
|
||||
lv_check_link TYPE string,
|
||||
lv_stage_link TYPE string,
|
||||
lv_patch_link TYPE string.
|
||||
lv_patch_link TYPE string,
|
||||
lv_diff_link TYPE string,
|
||||
lv_pull_link TYPE string.
|
||||
|
||||
DATA:
|
||||
lv_zip_import_link TYPE string,
|
||||
|
@ -500,12 +502,12 @@ CLASS zcl_abapgit_gui_page_repo_over IMPLEMENTATION.
|
|||
|
||||
ii_html->add( |<div class="float-right">| ).
|
||||
|
||||
lv_check_link = ii_html->a(
|
||||
iv_txt = |Check|
|
||||
iv_act = |{ zif_abapgit_definitions=>c_action-repo_code_inspector }{ lc_dummy_key }|
|
||||
iv_class = |{ lc_action_class }| ).
|
||||
lv_pull_link = ii_html->a(
|
||||
iv_txt = |Pull|
|
||||
iv_act = |{ zif_abapgit_definitions=>c_action-git_reset }{ lc_dummy_key }|
|
||||
iv_class = |{ lc_action_class } { lc_online_class }| ).
|
||||
|
||||
ii_html->add( action_link( lv_check_link && lc_separator ) ).
|
||||
ii_html->add( action_link( lv_pull_link && lc_separator ) ).
|
||||
|
||||
lv_stage_link = ii_html->a(
|
||||
iv_txt = |Stage|
|
||||
|
@ -521,6 +523,20 @@ CLASS zcl_abapgit_gui_page_repo_over IMPLEMENTATION.
|
|||
|
||||
ii_html->add( action_link( lv_patch_link && lc_separator ) ).
|
||||
|
||||
lv_diff_link = ii_html->a(
|
||||
iv_txt = |Diff|
|
||||
iv_act = |{ zif_abapgit_definitions=>c_action-go_repo_diff }{ lc_dummy_key }|
|
||||
iv_class = |{ lc_action_class } { lc_online_class }| ).
|
||||
|
||||
ii_html->add( action_link( lv_diff_link && lc_separator ) ).
|
||||
|
||||
lv_check_link = ii_html->a(
|
||||
iv_txt = |Check|
|
||||
iv_act = |{ zif_abapgit_definitions=>c_action-repo_code_inspector }{ lc_dummy_key }|
|
||||
iv_class = |{ lc_action_class }| ).
|
||||
|
||||
ii_html->add( action_link( lv_check_link && lc_separator ) ).
|
||||
|
||||
lv_zip_import_link = ii_html->a(
|
||||
iv_txt = |Import|
|
||||
iv_act = |{ zif_abapgit_definitions=>c_action-zip_import }{ lc_dummy_key }|
|
||||
|
|
|
@ -170,6 +170,11 @@ CLASS zcl_abapgit_services_repo IMPLEMENTATION.
|
|||
" find troublesome objects
|
||||
ls_checks = io_repo->deserialize_checks( ).
|
||||
|
||||
IF ls_checks-overwrite IS INITIAL.
|
||||
zcx_abapgit_exception=>raise(
|
||||
'There is nothing to pull. The local state completely matches the remote repository.' ).
|
||||
ENDIF.
|
||||
|
||||
" let the user decide what to do
|
||||
TRY.
|
||||
popup_decisions(
|
||||
|
|
Loading…
Reference in New Issue
Block a user