Commit d2395e42 authored by Christophe Dumez's avatar Christophe Dumez

Display file edit icon in diff only if the file is editable

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7192 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e3374c1f
......@@ -81,22 +81,31 @@ tab_Removed=removed.split(\',\')\n
if modified != \'none\':\n
for f in tab_Modified:\n
f = context.getPortalObject()["portal_subversion"].relativeToAbsolute(f, context) \n
print "<b><font color=\'black\'>Index: <a href=\'BusinessTemplate_viewSvnShowFile?file="+f+"\'>"+f+"</a> <a href=\'"+context.getPortalObject()["portal_subversion"].editPath(context, f)+"\'><img src=\'imgs/edit.png\' border=\'0\'></a><br>"\n
print \'<hr></font></b>\'\n
print "<b><font color=\'black\'>Index: <a href=\'BusinessTemplate_viewSvnShowFile?file="+f+"\'>"+f+"</a>"\n
edit_path = context.getPortalObject()["portal_subversion"].editPath(context, f)\n
if(edit_path != \'#\'):\n
print "<a href=\'"+edit_path+"\'><img src=\'imgs/edit.png\' border=\'0\'></a>"\n
print \'<br><hr></font></b>\'\n
print context.getPortalObject()["portal_subversion"].diffHTML(f, context)\n
\n
if added != \'none\':\n
for f in tab_Added:\n
f = context.getPortalObject()["portal_subversion"].relativeToAbsolute(f, context) \n
print "<b><font color=\'black\'>Index: <a href=\'BusinessTemplate_viewSvnShowFile?file="+f+"\'>"+f+"</a> <a href=\'"+context.getPortalObject()["portal_subversion"].editPath(context, f)+"\'><img src=\'imgs/edit.png\' border=\'0\'></a><br>"\n
print \'<hr></font></b>\'\n
print "<b><font color=\'black\'>Index: <a href=\'BusinessTemplate_viewSvnShowFile?file="+f+"\'>"+f+"</a>"\n
edit_path = context.getPortalObject()["portal_subversion"].editPath(context, f)\n
if(edit_path != \'#\'):\n
print "<a href=\'"+edit_path+"\'><img src=\'imgs/edit.png\' border=\'0\'></a>"\n
print \'<br><hr></font></b>\'\n
print "<font color=\'green\'>File Added</font><br><br>"\n
\n
if removed != \'none\':\n
for f in tab_Removed:\n
f = context.getPortalObject()["portal_subversion"].relativeToAbsolute(f, context) \n
print "<b><font color=\'black\'>Index: <a href=\'BusinessTemplate_viewSvnShowFile?file="+f+"\'>"+f+"</a> <a href=\'"+context.getPortalObject()["portal_subversion"].editPath(context, f)+"\'><img src=\'imgs/edit.png\' border=\'0\'></a><br>"\n
print \'<hr></font></b>\'\n
print "<b><font color=\'black\'>Index: <a href=\'BusinessTemplate_viewSvnShowFile?file="+f+"\'>"+f+"</a>"\n
edit_path = context.getPortalObject()["portal_subversion"].editPath(context, f)\n
if(edit_path != \'#\'):\n
print "<a href=\'"+edit_path+"\'><img src=\'imgs/edit.png\' border=\'0\'></a>"\n
print \'<br><hr></font></b>\'\n
print "<font color=\'red\'>File Removed</font><br><br>"\n
\n
print \'</font>\'\n
......@@ -156,6 +165,7 @@ return printed\n
<string>tab_Removed</string>
<string>_getiter_</string>
<string>f</string>
<string>edit_path</string>
</tuple>
</value>
</item>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment