|
1 | 1 | <?php |
2 | 2 | include("headers.php"); |
3 | 3 | include("settings.php"); |
| 4 | +$t = $text['github-manager']; |
4 | 5 |
|
5 | 6 | // If we have an action to perform |
6 | 7 | if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset($_GET['action'])) { |
|
26 | 27 | if (is_writable($docRoot)) { |
27 | 28 | mkdir($docRoot.$chosenLocal, 0705); |
28 | 29 | } else { |
29 | | - echo "<script>top.ICEcoder.message('Sorry, cannot create folder at\\n".$chosenLocal."');</script>"; |
| 30 | + echo "<script>top.ICEcoder.message('".$t['Sorry, cannot create...']."\\n".$chosenLocal."');</script>"; |
30 | 31 | } |
31 | 32 | } |
32 | 33 |
|
|
54 | 55 | // Hide this popup and reload file manager |
55 | 56 | echo "<script>top.ICEcoder.showHide('hide',top.document.getElementById('blackMask'));top.ICEcoder.refreshFileManager();</script>"; |
56 | 57 | } else { |
57 | | - echo "<script>top.ICEcoder.message('Cannot update config file. Please set public write permissions on lib/".$settingsFile." and try again');</script>"; |
| 58 | + echo "<script>top.ICEcoder.message('".$t['Cannot update config...']." lib/".$settingsFile." ".$t['and try again']."');</script>"; |
58 | 59 | } |
59 | | - |
| 60 | + |
60 | 61 | } |
61 | 62 |
|
62 | 63 | } |
|
153 | 154 | // Finally, reload the iFrame screen for the user |
154 | 155 | header("Location: github-manager.php?updatedGithubPaths&csrf=".$_SESSION["csrf"]); |
155 | 156 | echo "<script>window.location='github-manager.php?updatedGithubPaths&csrf='+top.ICEcoder.csrf;</script>"; |
156 | | - die('saving github paths...'); |
| 157 | + die($t['saving github paths']); |
157 | 158 | } else { |
158 | | - echo "<script>top.ICEcoder.message('Cannot update config file. Please set public write permissions on lib/".$settingsFile." and try again');</script>"; |
| 159 | + echo "<script>top.ICEcoder.message('".$t['Cannot update config...']." lib/".$settingsFile." ".$t['and try again']."');</script>"; |
159 | 160 | } |
160 | 161 | } |
161 | 162 | } |
|
172 | 173 |
|
173 | 174 | <body class="githubManager"> |
174 | 175 |
|
175 | | -<h1>github paths</h1> |
| 176 | +<h1><?php echo $t['github paths'];?></h1> |
176 | 177 |
|
177 | 178 | <div style="display: inline-block; width: 620px; height: 340px; overflow-y: auto"> |
178 | 179 | <?php |
|
181 | 182 | if (count($pathsLocal) > 0) { |
182 | 183 | ?> |
183 | 184 | <div style="display: inline-block; width: 600px; margin-bottom: 30px"> |
184 | | - <h2>Choose existing path</h2><br> |
| 185 | + <h2><?php echo $t['Choose existing path'];?></h2><br> |
185 | 186 |
|
186 | 187 | <form id="githubUpdateForm" action="github-manager.php?action=update" method="POST"> |
187 | 188 | <table> |
188 | 189 | <tr> |
189 | | - <td style="padding-left: 5px">Local path</td> |
190 | | - <td style="padding-left: 5px">Remote GitHub path</td> |
| 190 | + <td style="padding-left: 5px"><?php echo $t['Local path'];?></td> |
| 191 | + <td style="padding-left: 5px"><?php echo $t['Remote GitHub path'];?></td> |
191 | 192 | </tr> |
192 | 193 | <?php |
193 | 194 | for ($i=0; $i<count($pathsLocal); $i++) { |
194 | 195 | echo '<tr>'; |
195 | 196 | echo '<td style="padding: 0 10px 8px 0"><input type="text" name="githubLocalPath'.$i.'" value="'.$pathsLocal[$i].'" style="width: 250px"></td>'; |
196 | 197 | echo '<td style="padding: 0 10px 8px 0"><input type="text" name="githubRemotePath'.$i.'" value="'.$pathsRemote[$i].'" style="width: 250px"></td>'; |
197 | | - echo '<td style="padding: 2px 0 8px 0"><div style="display: inline-block; padding: 5px; background: #2187e7; color: #fff; font-size: 12px; cursor: pointer" onclick="window.location=\'github-manager.php?action=choose&pathPair='.$i.'&csrf='.$_SESSION["csrf"].'\'">Choose</div></td>'; |
| 198 | + echo '<td style="padding: 2px 0 8px 0"><div style="display: inline-block; padding: 5px; background: #2187e7; color: #fff; font-size: 12px; cursor: pointer" onclick="window.location=\'github-manager.php?action=choose&pathPair='.$i.'&csrf='.$_SESSION["csrf"].'\'">'.$t['Choose'].'</div></td>'; |
198 | 199 | echo '</tr>'; |
199 | 200 | } |
200 | 201 | echo '<tr>'; |
201 | | - echo '<td style="padding-top: 7px; color: #444">Set local and remote path to blanks to remove</td>'; |
202 | | - echo '<td style="padding: 3px 10px 8px 0; text-align: right"><div style="display: inline-block; padding: 5px; background: #2187e7; color: #fff; font-size: 12px; cursor: pointer" onclick="document.getElementById(\'githubUpdateForm\').submit()">Update</div></td>'; |
| 202 | + echo '<td style="padding-top: 7px; color: #444">'.$t['Set local and...'].'</td>'; |
| 203 | + echo '<td style="padding: 3px 10px 8px 0; text-align: right"><div style="display: inline-block; padding: 5px; background: #2187e7; color: #fff; font-size: 12px; cursor: pointer" onclick="document.getElementById(\'githubUpdateForm\').submit()">'.$t['Update'].'</div></td>'; |
203 | 204 | echo '</tr>'; |
204 | 205 | ?> |
205 | 206 | </table> |
|
211 | 212 | ?> |
212 | 213 |
|
213 | 214 | <div style="display: inline-block; width: 600px"> |
214 | | - <h2>Add new path</h2><br> |
| 215 | + <h2><?php echo $t['Add new path'];?></h2><br> |
215 | 216 |
|
216 | 217 | <form id="githubAddForm" action="github-manager.php?action=add" method="POST"> |
217 | 218 | <table> |
218 | 219 | <tr> |
219 | | - <td style="padding-left: 5px">Local path</td> |
220 | | - <td style="padding-left: 5px">Remote GitHub path</td> |
| 220 | + <td style="padding-left: 5px"><?php echo $t['Local path'];?></td> |
| 221 | + <td style="padding-left: 5px"><?php echo $t['Remote GitHub path'];?></td> |
221 | 222 | </tr> |
222 | 223 | <tr> |
223 | 224 | <td style="padding: 0 10px 8px 0"><input type="text" name="githubLocalPathNEW" value="" style="width: 250px"></td> |
224 | 225 | <td style="padding: 0 0 8px 0"><input type="text" name="githubRemotePathNEW" value="" style="width: 250px"></td> |
225 | 226 | </tr> |
226 | 227 | <tr> |
227 | | - <td colspan="2" style="padding: 3px 0 8px 0; text-align: right"><div style="display: inline-block; padding: 5px; background: #2187e7; color: #fff; font-size: 12px; cursor: pointer" onclick="document.getElementById('githubAddForm').submit()">Add</div></td> |
| 228 | + <td colspan="2" style="padding: 3px 0 8px 0; text-align: right"><div style="display: inline-block; padding: 5px; background: #2187e7; color: #fff; font-size: 12px; cursor: pointer" onclick="document.getElementById('githubAddForm').submit()"><?php echo $t['Add'];?></div></td> |
228 | 229 | </tr> |
229 | 230 | </table> |
230 | 231 | <input type="hidden" name="csrf" value="<?php echo $_SESSION["csrf"]; ?>"> |
231 | 232 | </form> |
232 | 233 | </div> |
233 | 234 |
|
234 | | - <h2 style="margin-bottom: 10px">Usage Info:</h2> |
| 235 | + <h2 style="margin-bottom: 10px"><?php echo $t['Usage Info'];?></h2> |
235 | 236 |
|
236 | | - <p style="color: #888; margin: 0 10px 10px 0">Enter relative local paths (eg /server/myfiles) and absolute GitHub paths (eg https://github.com/user/repo or https://github.com/user/repo/tree/branch for branches), as per the examples. With this done you have established the source paths at both locations, as a pair.</p> |
237 | | - <p style="color: #888; margin: 0 10px 10px 0">You can then choose a path pair and this then becomes your new root path in ICEcoder.</p> |
238 | | - <p style="color: #888; margin: 0 10px 10px 0">The file manager then displays a new GitHub icon, which you can click on to perform and show a diff check between the 2 sources. These diffs can then be committed and pushed to the remote path at GitHub or cloned to your local path, to sync your files.</p> |
239 | | - <p style="color: #888; margin: 0 10px 0 0">If you want to set another root path, this can be done in the Help > Settings screen.</p> |
| 237 | + <p style="color: #888; margin: 0 10px 10px 0"><?php echo $t['Enter relative local...'];?></p> |
| 238 | + <p style="color: #888; margin: 0 10px 10px 0"><?php echo $t['You can then...'];?></p> |
| 239 | + <p style="color: #888; margin: 0 10px 10px 0"><?php echo $t['The file manager...'];?></p> |
| 240 | + <p style="color: #888; margin: 0 10px 0 0"><?php echo $t['If you want...'];?></p> |
240 | 241 |
|
241 | 242 | </div> |
242 | 243 |
|
|
0 commit comments