Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
d08d7d95
Commit
d08d7d95
authored
Aug 20, 2003
by
jkeiser%netscape.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check for PatchReader as a part of the installation and disable the "Diff"
links if it is not there (bug 215268)
parent
3efe1a90
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
99 additions
and
43 deletions
+99
-43
attachment.cgi
attachment.cgi
+57
-41
checksetup.pl
checksetup.pl
+20
-0
show_bug.cgi
show_bug.cgi
+6
-0
edit.html.tmpl
template/en/default/attachment/edit.html.tmpl
+15
-1
list.html.tmpl
template/en/default/attachment/list.html.tmpl
+1
-1
No files found.
attachment.cgi
View file @
d08d7d95
...
@@ -467,11 +467,11 @@ sub interdiff
...
@@ -467,11 +467,11 @@ sub interdiff
$ENV
{
'PATH'
}
=
$::diffpath
;
$ENV
{
'PATH'
}
=
$::diffpath
;
open
my
$interdiff_fh
,
"$::interdiffbin $old_filename $new_filename|"
;
open
my
$interdiff_fh
,
"$::interdiffbin $old_filename $new_filename|"
;
binmode
$interdiff_fh
;
binmode
$interdiff_fh
;
my
(
$
iter
,
$last_iter
)
=
setup_iterato
rs
(
""
);
my
(
$
reader
,
$last_reader
)
=
setup_patch_reade
rs
(
""
);
if
(
$::FORM
{
'format'
}
eq
"raw"
)
if
(
$::FORM
{
'format'
}
eq
"raw"
)
{
{
require
Patch
Iterato
r::DiffPrinter::
raw
;
require
Patch
Reade
r::DiffPrinter::
raw
;
$last_
iter
->
sends_data_to
(
new
PatchIterato
r::DiffPrinter::
raw
());
$last_
reader
->
sends_data_to
(
new
PatchReade
r::DiffPrinter::
raw
());
# Actually print out the patch
# Actually print out the patch
print
$cgi
->
header
(
-
type
=>
'text/plain'
,
print
$cgi
->
header
(
-
type
=>
'text/plain'
,
-
expires
=>
'+3M'
);
-
expires
=>
'+3M'
);
...
@@ -487,9 +487,9 @@ sub interdiff
...
@@ -487,9 +487,9 @@ sub interdiff
delete
$vars
->
{
attachid
};
delete
$vars
->
{
attachid
};
delete
$vars
->
{
do_context
};
delete
$vars
->
{
do_context
};
delete
$vars
->
{
context
};
delete
$vars
->
{
context
};
setup_template_
iterator
(
$iter
,
$last_it
er
);
setup_template_
patch_reader
(
$last_read
er
);
}
}
$
it
er
->
iterate_fh
(
$interdiff_fh
,
"interdiff #$::FORM{'oldid'} #$::FORM{'newid'}"
);
$
read
er
->
iterate_fh
(
$interdiff_fh
,
"interdiff #$::FORM{'oldid'} #$::FORM{'newid'}"
);
close
$interdiff_fh
;
close
$interdiff_fh
;
$ENV
{
'PATH'
}
=
''
;
$ENV
{
'PATH'
}
=
''
;
...
@@ -505,10 +505,10 @@ sub get_unified_diff
...
@@ -505,10 +505,10 @@ sub get_unified_diff
my
(
$id
)
=
@_
;
my
(
$id
)
=
@_
;
# Bring in the modules we need
# Bring in the modules we need
require
Patch
Iterato
r::
Raw
;
require
Patch
Reade
r::
Raw
;
require
Patch
Iterato
r::
FixPatchRoot
;
require
Patch
Reade
r::
FixPatchRoot
;
require
Patch
Iterato
r::DiffPrinter::
raw
;
require
Patch
Reade
r::DiffPrinter::
raw
;
require
Patch
Iterato
r::
PatchInfoGrabber
;
require
Patch
Reade
r::
PatchInfoGrabber
;
require
File::
Temp
;
require
File::
Temp
;
# Get the patch
# Get the patch
...
@@ -520,18 +520,29 @@ sub get_unified_diff
...
@@ -520,18 +520,29 @@ sub get_unified_diff
}
}
# Reads in the patch, converting to unified diff in a temp file
# Reads in the patch, converting to unified diff in a temp file
my
$iter
=
new
PatchIterator::
Raw
;
my
$reader
=
new
PatchReader::
Raw
;
my
$last_reader
=
$reader
;
# fixes patch root (makes canonical if possible)
# fixes patch root (makes canonical if possible)
my
$fix_patch_root
=
new
PatchIterator::
FixPatchRoot
(
Param
(
'cvsroot'
));
if
(
Param
(
'cvsroot'
))
{
$iter
->
sends_data_to
(
$fix_patch_root
);
my
$fix_patch_root
=
new
PatchReader::
FixPatchRoot
(
Param
(
'cvsroot'
));
$last_reader
->
sends_data_to
(
$fix_patch_root
);
$last_reader
=
$fix_patch_root
;
}
# Grabs the patch file info
# Grabs the patch file info
my
$patch_info_grabber
=
new
PatchIterator::
PatchInfoGrabber
();
my
$patch_info_grabber
=
new
PatchReader::
PatchInfoGrabber
();
$fix_patch_root
->
sends_data_to
(
$patch_info_grabber
);
$last_reader
->
sends_data_to
(
$patch_info_grabber
);
$last_reader
=
$patch_info_grabber
;
# Prints out to temporary file
# Prints out to temporary file
my
(
$fh
,
$filename
)
=
File::Temp::
tempfile
();
my
(
$fh
,
$filename
)
=
File::Temp::
tempfile
();
$patch_info_grabber
->
sends_data_to
(
new
PatchIterator::DiffPrinter::
raw
(
$fh
));
my
$raw_printer
=
new
PatchReader::DiffPrinter::
raw
(
$fh
);
$last_reader
->
sends_data_to
(
$raw_printer
);
$last_reader
=
$raw_printer
;
# Iterate!
# Iterate!
$
it
er
->
iterate_string
(
$id
,
$thedata
);
$
read
er
->
iterate_string
(
$id
,
$thedata
);
return
(
$bugid
,
$description
,
$filename
,
$patch_info_grabber
->
patch_info
()
->
{
files
});
return
(
$bugid
,
$description
,
$filename
,
$patch_info_grabber
->
patch_info
()
->
{
files
});
}
}
...
@@ -557,7 +568,7 @@ sub warn_if_interdiff_might_fail {
...
@@ -557,7 +568,7 @@ sub warn_if_interdiff_might_fail {
return
undef
;
return
undef
;
}
}
sub
setup_
iterato
rs
{
sub
setup_
patch_reade
rs
{
my
(
$diff_root
)
=
@_
;
my
(
$diff_root
)
=
@_
;
#
#
...
@@ -568,36 +579,36 @@ sub setup_iterators {
...
@@ -568,36 +579,36 @@ sub setup_iterators {
# headers=0|1
# headers=0|1
#
#
# Define the
iterato
rs
# Define the
patch reade
rs
# The
iterato
r that reads the patch in (whatever its format)
# The
reade
r that reads the patch in (whatever its format)
require
Patch
Iterato
r::
Raw
;
require
Patch
Reade
r::
Raw
;
my
$
iter
=
new
PatchIterato
r::
Raw
;
my
$
reader
=
new
PatchReade
r::
Raw
;
my
$last_
iter
=
$it
er
;
my
$last_
reader
=
$read
er
;
# Fix the patch root if we have a cvs root
# Fix the patch root if we have a cvs root
if
(
Param
(
'cvsroot'
))
if
(
Param
(
'cvsroot'
))
{
{
require
Patch
Iterato
r::
FixPatchRoot
;
require
Patch
Reade
r::
FixPatchRoot
;
$last_
iter
->
sends_data_to
(
new
PatchIterato
r::
FixPatchRoot
(
Param
(
'cvsroot'
)));
$last_
reader
->
sends_data_to
(
new
PatchReade
r::
FixPatchRoot
(
Param
(
'cvsroot'
)));
$last_
it
er
->
sends_data_to
->
diff_root
(
$diff_root
)
if
defined
(
$diff_root
);
$last_
read
er
->
sends_data_to
->
diff_root
(
$diff_root
)
if
defined
(
$diff_root
);
$last_
iter
=
$last_it
er
->
sends_data_to
;
$last_
reader
=
$last_read
er
->
sends_data_to
;
}
}
# Add in cvs context if we have the necessary info to do it
# Add in cvs context if we have the necessary info to do it
if
(
$::FORM
{
'context'
}
ne
"patch"
&&
$::cvsbin
&&
Param
(
'cvsroot_get'
))
if
(
$::FORM
{
'context'
}
ne
"patch"
&&
$::cvsbin
&&
Param
(
'cvsroot_get'
))
{
{
require
Patch
Iterato
r::
AddCVSContext
;
require
Patch
Reade
r::
AddCVSContext
;
$last_
it
er
->
sends_data_to
(
$last_
read
er
->
sends_data_to
(
new
Patch
Iterato
r::
AddCVSContext
(
$::FORM
{
'context'
},
new
Patch
Reade
r::
AddCVSContext
(
$::FORM
{
'context'
},
Param
(
'cvsroot_get'
)));
Param
(
'cvsroot_get'
)));
$last_
iter
=
$last_it
er
->
sends_data_to
;
$last_
reader
=
$last_read
er
->
sends_data_to
;
}
}
return
(
$
iter
,
$last_it
er
);
return
(
$
reader
,
$last_read
er
);
}
}
sub
setup_template_
iterato
r
sub
setup_template_
patch_reade
r
{
{
my
(
$
iter
,
$last_it
er
)
=
@_
;
my
(
$
last_read
er
)
=
@_
;
require
Patch
Iterato
r::DiffPrinter::
template
;
require
Patch
Reade
r::DiffPrinter::
template
;
my
$format
=
$::FORM
{
'format'
};
my
$format
=
$::FORM
{
'format'
};
...
@@ -614,7 +625,7 @@ sub setup_template_iterator
...
@@ -614,7 +625,7 @@ sub setup_template_iterator
# Print everything out
# Print everything out
print
$cgi
->
header
(
-
type
=>
'text/html'
,
print
$cgi
->
header
(
-
type
=>
'text/html'
,
-
expires
=>
'+3M'
);
-
expires
=>
'+3M'
);
$last_
iter
->
sends_data_to
(
new
PatchIterato
r::DiffPrinter::
template
(
$template
,
$last_
reader
->
sends_data_to
(
new
PatchReade
r::DiffPrinter::
template
(
$template
,
"attachment/diff-header.$format.tmpl"
,
"attachment/diff-header.$format.tmpl"
,
"attachment/diff-file.$format.tmpl"
,
"attachment/diff-file.$format.tmpl"
,
"attachment/diff-footer.$format.tmpl"
,
"attachment/diff-footer.$format.tmpl"
,
...
@@ -638,17 +649,17 @@ sub diff
...
@@ -638,17 +649,17 @@ sub diff
return
;
return
;
}
}
my
(
$
iter
,
$last_iter
)
=
setup_iterato
rs
();
my
(
$
reader
,
$last_reader
)
=
setup_patch_reade
rs
();
if
(
$::FORM
{
'format'
}
eq
"raw"
)
if
(
$::FORM
{
'format'
}
eq
"raw"
)
{
{
require
Patch
Iterato
r::DiffPrinter::
raw
;
require
Patch
Reade
r::DiffPrinter::
raw
;
$last_
iter
->
sends_data_to
(
new
PatchIterato
r::DiffPrinter::
raw
());
$last_
reader
->
sends_data_to
(
new
PatchReade
r::DiffPrinter::
raw
());
# Actually print out the patch
# Actually print out the patch
use
vars
qw($cgi)
;
use
vars
qw($cgi)
;
print
$cgi
->
header
(
-
type
=>
'text/plain'
,
print
$cgi
->
header
(
-
type
=>
'text/plain'
,
-
expires
=>
'+3M'
);
-
expires
=>
'+3M'
);
$
it
er
->
iterate_string
(
"Attachment "
.
$::FORM
{
'id'
},
$thedata
);
$
read
er
->
iterate_string
(
"Attachment "
.
$::FORM
{
'id'
},
$thedata
);
}
}
else
else
{
{
...
@@ -674,9 +685,9 @@ sub diff
...
@@ -674,9 +685,9 @@ sub diff
$vars
->
{
bugid
}
=
$bugid
;
$vars
->
{
bugid
}
=
$bugid
;
$vars
->
{
attachid
}
=
$::FORM
{
'id'
};
$vars
->
{
attachid
}
=
$::FORM
{
'id'
};
$vars
->
{
description
}
=
$description
;
$vars
->
{
description
}
=
$description
;
setup_template_
iterator
(
$iter
,
$last_it
er
);
setup_template_
patch_reader
(
$last_read
er
);
# Actually print out the patch
# Actually print out the patch
$
it
er
->
iterate_string
(
"Attachment "
.
$::FORM
{
'id'
},
$thedata
);
$
read
er
->
iterate_string
(
"Attachment "
.
$::FORM
{
'id'
},
$thedata
);
}
}
}
}
...
@@ -937,6 +948,11 @@ sub edit
...
@@ -937,6 +948,11 @@ sub edit
$vars
->
{
'attachments'
}
=
\
@bugattachments
;
$vars
->
{
'attachments'
}
=
\
@bugattachments
;
$vars
->
{
'GetBugLink'
}
=
\&
GetBugLink
;
$vars
->
{
'GetBugLink'
}
=
\&
GetBugLink
;
# Determine if PatchReader is installed
eval
{
require
PatchReader
;
$vars
->
{
'patchviewerinstalled'
}
=
1
;
};
print
Bugzilla
->
cgi
->
header
();
print
Bugzilla
->
cgi
->
header
();
# Generate and return the UI (HTML page) from the appropriate template.
# Generate and return the UI (HTML page) from the appropriate template.
...
...
checksetup.pl
View file @
d08d7d95
...
@@ -268,6 +268,7 @@ my $chartbase = have_vers("Chart::Base","0.99");
...
@@ -268,6 +268,7 @@ my $chartbase = have_vers("Chart::Base","0.99");
my
$xmlparser
=
have_vers
(
"XML::Parser"
,
0
);
my
$xmlparser
=
have_vers
(
"XML::Parser"
,
0
);
my
$gdgraph
=
have_vers
(
"GD::Graph"
,
0
);
my
$gdgraph
=
have_vers
(
"GD::Graph"
,
0
);
my
$gdtextalign
=
have_vers
(
"GD::Text::Align"
,
0
);
my
$gdtextalign
=
have_vers
(
"GD::Text::Align"
,
0
);
my
$patchreader
=
have_vers
(
"PatchReader"
,
0
);
print
"\n"
unless
$silent
;
print
"\n"
unless
$silent
;
if
((
!
$gd
||
!
$chartbase
)
&&
!
$silent
)
{
if
((
!
$gd
||
!
$chartbase
)
&&
!
$silent
)
{
...
@@ -295,6 +296,17 @@ if ((!$gd || !$gdgraph || !$gdtextalign) && !$silent) {
...
@@ -295,6 +296,17 @@ if ((!$gd || !$gdgraph || !$gdtextalign) && !$silent) {
"-e'install \"GD::Text::Align\"'\n"
if
!
$gdtextalign
;
"-e'install \"GD::Text::Align\"'\n"
if
!
$gdtextalign
;
print
"\n"
;
print
"\n"
;
}
}
if
(
!
$patchreader
&&
!
$silent
)
{
print
"If you want to see pretty HTML views of patches, you should "
;
print
"install the \nPatchReader module, which can be downloaded at:\n"
;
print
"http://search.cpan.org/CPAN/authors/id/J/JK/JKEISER/PatchReader-0.9.2.tar.gz\n"
;
print
"When you get it, do the following to install:\n"
;
print
"tar xzvf PatchReader-0.9.2.tar.gz\n"
;
print
"cd PatchReader-0.9.2\n"
;
print
"perl Makefile.PL\n"
;
print
"make install\n\n"
;
}
if
(
%
missing
)
{
if
(
%
missing
)
{
print
"\n\n"
;
print
"\n\n"
;
print
"Bugzilla requires some Perl modules which are either missing from your\n"
,
print
"Bugzilla requires some Perl modules which are either missing from your\n"
,
...
@@ -461,6 +473,14 @@ END
...
@@ -461,6 +473,14 @@ END
if
(
!
LocalVarExists
(
'interdiffbin'
))
{
if
(
!
LocalVarExists
(
'interdiffbin'
))
{
my
$interdiff_executable
=
`which interdiff`
;
my
$interdiff_executable
=
`which interdiff`
;
if
(
$interdiff_executable
=~
/no interdiff/
||
$interdiff_executable
eq
''
)
{
if
(
$interdiff_executable
=~
/no interdiff/
||
$interdiff_executable
eq
''
)
{
if
(
!
$silent
)
{
print
"\nOPTIONAL NOTE: If you want to "
;
print
"be able to use the\n 'difference between two patches"
;
print
"feature of Bugzilla (requires\n the PatchReader Perl module"
;
print
"as well), you should install\n patchutils from "
;
print
"http://cyberelk.net/tim/patchutils/\n\n"
;
}
# If which didn't find it, set to blank
# If which didn't find it, set to blank
$interdiff_executable
=
""
;
$interdiff_executable
=
""
;
}
else
{
}
else
{
...
...
show_bug.cgi
View file @
d08d7d95
...
@@ -73,6 +73,12 @@ if ($single) {
...
@@ -73,6 +73,12 @@ if ($single) {
}
}
}
}
# Determine if Patch Viewer is installed, for Diff link
eval
{
require
PatchReader
;
$vars
->
{
'patchviewerinstalled'
}
=
1
;
};
$vars
->
{
'bugs'
}
=
\
@bugs
;
$vars
->
{
'bugs'
}
=
\
@bugs
;
# Next bug in list (if there is one)
# Next bug in list (if there is one)
...
...
template/en/default/attachment/edit.html.tmpl
View file @
d08d7d95
...
@@ -90,6 +90,7 @@
...
@@ -90,6 +90,7 @@
{
{
switchToMode
(
'edit'
);
switchToMode
(
'edit'
);
}
}
[
%
IF
patchviewerinstalled
%
]
function
viewDiff
()
function
viewDiff
()
{
{
switchToMode
(
'diff'
);
switchToMode
(
'diff'
);
...
@@ -102,6 +103,7 @@
...
@@ -102,6 +103,7 @@
has_viewed_as_diff
=
1
;
has_viewed_as_diff
=
1
;
}
}
}
}
[
%
END
%
]
function
viewRaw
()
function
viewRaw
()
{
{
switchToMode
(
'raw'
);
switchToMode
(
'raw'
);
...
@@ -120,11 +122,15 @@
...
@@ -120,11 +122,15 @@
hideElementById
(
'undoEditButton'
);
hideElementById
(
'undoEditButton'
);
}
else
if
(
current_mode
==
'raw'
)
{
}
else
if
(
current_mode
==
'raw'
)
{
hideElementById
(
'viewFrame'
);
hideElementById
(
'viewFrame'
);
[
%
IF
patchviewerinstalled
%
]
hideElementById
(
'viewDiffButton'
);
hideElementById
(
'viewDiffButton'
);
[
%
END
%
]
hideElementById
(
has_edited
?
'redoEditButton'
:
'editButton'
);
hideElementById
(
has_edited
?
'redoEditButton'
:
'editButton'
);
hideElementById
(
'smallCommentFrame'
);
hideElementById
(
'smallCommentFrame'
);
}
else
if
(
current_mode
==
'diff'
)
{
}
else
if
(
current_mode
==
'diff'
)
{
[
%
IF
patchviewerinstalled
%
]
hideElementById
(
'viewDiffFrame'
);
hideElementById
(
'viewDiffFrame'
);
[
%
END
%
]
hideElementById
(
'viewRawButton'
);
hideElementById
(
'viewRawButton'
);
hideElementById
(
has_edited
?
'redoEditButton'
:
'editButton'
);
hideElementById
(
has_edited
?
'redoEditButton'
:
'editButton'
);
hideElementById
(
'smallCommentFrame'
);
hideElementById
(
'smallCommentFrame'
);
...
@@ -136,11 +142,15 @@
...
@@ -136,11 +142,15 @@
showElementById
(
'undoEditButton'
);
showElementById
(
'undoEditButton'
);
}
else
if
(
mode
==
'raw'
)
{
}
else
if
(
mode
==
'raw'
)
{
showElementById
(
'viewFrame'
);
showElementById
(
'viewFrame'
);
[
%
IF
patchviewerinstalled
%
]
showElementById
(
'viewDiffButton'
);
showElementById
(
'viewDiffButton'
);
[
%
END
%
]
showElementById
(
has_edited
?
'redoEditButton'
:
'editButton'
);
showElementById
(
has_edited
?
'redoEditButton'
:
'editButton'
);
showElementById
(
'smallCommentFrame'
);
showElementById
(
'smallCommentFrame'
);
}
else
if
(
mode
==
'diff'
)
{
}
else
if
(
mode
==
'diff'
)
{
[
%
IF
patchviewerinstalled
%
]
showElementById
(
'viewDiffFrame'
);
showElementById
(
'viewDiffFrame'
);
[
%
END
%
]
showElementById
(
'viewRawButton'
);
showElementById
(
'viewRawButton'
);
showElementById
(
has_edited
?
'redoEditButton'
:
'editButton'
);
showElementById
(
has_edited
?
'redoEditButton'
:
'editButton'
);
showElementById
(
'smallCommentFrame'
);
showElementById
(
'smallCommentFrame'
);
...
@@ -227,7 +237,7 @@
...
@@ -227,7 +237,7 @@
<input
type=
"submit"
value=
"Submit"
><br><br>
<input
type=
"submit"
value=
"Submit"
><br><br>
<strong>
Actions:
</strong>
<a
href=
"attachment.cgi?id=[% attachid %]"
>
View
</a>
<strong>
Actions:
</strong>
<a
href=
"attachment.cgi?id=[% attachid %]"
>
View
</a>
[% IF ispatch %]
[% IF ispatch
&&
patchviewerinstalled
%]
|
<a
href=
"attachment.cgi?id=[% attachid %]&action=diff"
>
Diff
</a>
|
<a
href=
"attachment.cgi?id=[% attachid %]&action=diff"
>
Diff
</a>
[% END %]
[% END %]
</small>
</small>
...
@@ -243,11 +253,15 @@
...
@@ -243,11 +253,15 @@
<script
type=
"application/x-javascript"
language=
"JavaScript"
>
<script
type=
"application/x-javascript"
language=
"JavaScript"
>
<!--
<!--
if
(
typeof
document
.
getElementById
==
"function"
)
{
if
(
typeof
document
.
getElementById
==
"function"
)
{
[
%
IF
patchviewerinstalled
%
]
document
.
write
(
'<iframe id="viewDiffFrame" style="height: 400px; width: 100%; display: none;"></iframe>'
);
document
.
write
(
'<iframe id="viewDiffFrame" style="height: 400px; width: 100%; display: none;"></iframe>'
);
[
%
END
%
]
document
.
write
(
'<button type="button" id="editButton" onclick="editAsComment();">Edit Attachment As Comment</button>'
);
document
.
write
(
'<button type="button" id="editButton" onclick="editAsComment();">Edit Attachment As Comment</button>'
);
document
.
write
(
'<button type="button" id="undoEditButton" onclick="undoEditAsComment();" style="display: none;">Undo Edit As Comment</button>'
);
document
.
write
(
'<button type="button" id="undoEditButton" onclick="undoEditAsComment();" style="display: none;">Undo Edit As Comment</button>'
);
document
.
write
(
'<button type="button" id="redoEditButton" onclick="redoEditAsComment();" style="display: none;">Redo Edit As Comment</button>'
);
document
.
write
(
'<button type="button" id="redoEditButton" onclick="redoEditAsComment();" style="display: none;">Redo Edit As Comment</button>'
);
[
%
IF
patchviewerinstalled
%
]
document
.
write
(
'<button type="button" id="viewDiffButton" onclick="viewDiff();">View Attachment As Diff</button>'
);
document
.
write
(
'<button type="button" id="viewDiffButton" onclick="viewDiff();">View Attachment As Diff</button>'
);
[
%
END
%
]
document
.
write
(
'<button type="button" id="viewRawButton" onclick="viewRaw();" style="display: none;">View Attachment As Raw</button>'
);
document
.
write
(
'<button type="button" id="viewRawButton" onclick="viewRaw();" style="display: none;">View Attachment As Raw</button>'
);
}
}
//-->
//-->
...
...
template/en/default/attachment/list.html.tmpl
View file @
d08d7d95
...
@@ -70,7 +70,7 @@
...
@@ -70,7 +70,7 @@
[% IF attachment.canedit %]
[% IF attachment.canedit %]
<a href="attachment.cgi?id=[% attachment.attachid %]&action=edit">Edit</a>
<a href="attachment.cgi?id=[% attachment.attachid %]&action=edit">Edit</a>
[% END %]
[% END %]
[% IF attachment.ispatch %]
[% IF attachment.ispatch
&& patchviewerinstalled
%]
[% IF attachment.canedit %]
[% IF attachment.canedit %]
|
|
[% END %]
[% END %]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment