stable

Clone or download

Read-only

Display edit button in gitphp UI

This is a first step of story #6971: Git online commit in the Tuleap UI As we have no control over gitphp code, the button is injected through javascript, only if 1) the site admin activate the corresponding variable 2) the repository is configured to allow online edition 3) the user has write access on the repository. Please note that the 2) is hard coded, you will have to edit manually the code to test the feature: set $result[self::ENABLE_ONLINE_EDIT] variable to true in GitDao line 492. The ability for a repository admin to change this setting will be done in another changeset. The [edit] button does nothing and is disabled if the user is targeting a file in the past. Change-Id: I1ca81e33d4834f10ebb4b2d68ecccbf15a6fab40

Modified Files

Name
M plugins/git/etc/config.inc.dist +4 −2 Go to diff View file
A plugins/git/include/GitConfig.class.php +58 −0 Go to diff View file
M plugins/git/include/GitDao.class.php +9 −3 Go to diff View file
M plugins/git/include/GitRepository.class.php +13 −3 Go to diff View file
M plugins/git/include/GitViews/ShowRepo/Content.class.php +15 −4 Go to diff View file
M plugins/git/include/autoload.php +4 −3 Go to diff View file
M plugins/git/include/gitPlugin.class.php +1 −0 Go to diff View file
M plugins/git/site-content/en_US/script_locale.txt +2 −1 Go to diff View file
M plugins/git/site-content/fr_FR/script_locale.txt +2 −1 Go to diff View file
A plugins/git/tests/GitConfigTest.php +46 −0 Go to diff View file
A plugins/git/www/online_edit.js +52 −0 Go to diff View file