diff --git a/codepot/src/codepot/views/Makefile.am b/codepot/src/codepot/views/Makefile.am index b112d08a..2328a8e8 100644 --- a/codepot/src/codepot/views/Makefile.am +++ b/codepot/src/codepot/views/Makefile.am @@ -3,6 +3,7 @@ www_DATA = \ error.php \ code_blame.php \ code_diff.php \ + code_edit.php \ code_file.php \ code_folder.php \ code_history.php \ diff --git a/codepot/src/codepot/views/Makefile.in b/codepot/src/codepot/views/Makefile.in index 324e4aa9..d1e9ce8c 100644 --- a/codepot/src/codepot/views/Makefile.in +++ b/codepot/src/codepot/views/Makefile.in @@ -202,6 +202,7 @@ www_DATA = \ error.php \ code_blame.php \ code_diff.php \ + code_edit.php \ code_file.php \ code_folder.php \ code_history.php \ diff --git a/codepot/src/codepot/views/code_edit.php b/codepot/src/codepot/views/code_edit.php new file mode 100644 index 00000000..9f5dbcd6 --- /dev/null +++ b/codepot/src/codepot/views/code_edit.php @@ -0,0 +1,357 @@ + + + + + + + + + + + + + + + + + ' . $this->lang->line('Enstyle'); +$destyle_anchor_text = ' ' . $this->lang->line('Destyle'); + +if ($revision <= 0) +{ + $revreq = ''; + $revreqroot = ''; +} +else +{ + $revreq = "/{$file['created_rev']}"; + $revreqroot = '/' . $this->converter->AsciiToHex ('.') . $revreq; +} + +$hex_headpath = $this->converter->AsciiToHex($headpath); +?> + + + +<?php + if ($headpath == '') + printf ('%s', htmlspecialchars($project->name)); + else + printf ('%s - %s', htmlspecialchars($project->name), htmlspecialchars($headpath)); +?> + + + + +
+ + + +load->view ('taskbar'); ?> + + + +load->view ( + 'projectbar', + array ( + 'banner' => NULL, + + 'page' => array ( + 'type' => 'project', + 'id' => 'code', + 'project' => $project, + ), + + 'ctxmenuitems' => array () + ) +); +?> + + + +
+ +
+id}{$revreqroot}", + htmlspecialchars($project->name));*/ + print htmlspecialchars($project->name); + + $exps = explode ('/', $headpath); + $expsize = count($exps); + $par = ''; + for ($i = 1; $i < $expsize; $i++) + { + $par .= '/' . $exps[$i]; + $xpar = $this->converter->AsciiToHex ($par); + + print '/'; + /* + print anchor ( + "code/file/{$project->id}/{$xpar}{$revreq}", + htmlspecialchars($exps[$i])); + */ + print htmlspecialchars($exps[$i]); + } + + if ($headpath != $file['fullpath']) + { + print ' - '; + print htmlspecialchars($file['fullpath']); + } +?> +
+ +
+ + '; + print ' '; + print anchor ("code/file/{$project->id}/{$hex_headpath}", $this->lang->line('Save'), 'id="code_edit_mainarea_save_button"'); + print ' '; + print anchor ("code/file/{$project->id}/{$hex_headpath}{$revreq}", $this->lang->line('Return'), 'id="code_edit_mainarea_return_button"'); + ?> + +
+ +
+ + + +
0) + { + foreach ($file['properties'] as $pn => $pv) + { + if ($pn == 'svn:mime-type' && $pv == 'application/octet-stream') + { + $is_octet_stream = TRUE; + break; + } + } + } + + $is_image_stream = FALSE; + if ($is_octet_stream || + in_array (strtolower($fileext), array ('png', 'jpg', 'gif', 'tif', 'bmp', 'ico'))) + { + $img = @imagecreatefromstring ($file['content']); + if ($img !== FALSE) + { + @imagedestroy ($img); + print ('[image]'); + $is_image_stream = TRUE; + } + } + + if (!$is_image_stream)*/ print htmlspecialchars($file['content']); +?>
+ +
+ +
+
+ lang->line('Message'); ?> +
+
+ +
+
+ +
+
+ +
+ + + +
+ + + +load->view ('footer'); ?> + + + + + + + +