Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/milestone_edit.html URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/milestone_edit.html?rev=1639823&r1=1639822&r2=1639823&view=diff ============================================================================== --- bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/milestone_edit.html (original) +++ bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/milestone_edit.html Sat Nov 15 01:14:46 2014 @@ -1,3 +1,13 @@ +<!--! Copyright (C) 2006-2014 Edgewall Software + + This software is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at http://trac.edgewall.com/license.html. + + This software consists of voluntary contributions made by many + individuals. For the exact contribution history, see the revision + history and logs, available at http://trac.edgewall.org/. +--> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> @@ -26,13 +36,14 @@ var retarget = $("#retarget"); retarget.enable(checked); $("#target").enable(checked && retarget.checked()); + $("#retarget-comment").enable(checked && retarget.checked()); } $("#completed").click(updateCompletedDate); updateCompletedDate(); $("#retarget").click(function(){ $("#target").enable(this.checked); + $("#retarget-comment").enable(this.checked); }); - $("#name").get(0).focus() $("#duedate").datetimepicker(); $("#completeddate").datetimepicker(); }); @@ -51,7 +62,8 @@ <input type="hidden" name="id" value="${milestone.name}" /> <input type="hidden" name="action" value="edit" /> <label>Name of the milestone:<br /> - <input type="text" id="name" name="name" size="32" value="${milestone.name or req.args.get('name')}" /> + <input type="text" id="name" name="name" class="trac-autofocus" size="32" + value="${milestone.name or req.args.get('name')}" /> </label> </div> <fieldset> @@ -91,20 +103,28 @@ value="${milestone.name}" py:content="milestone.name"></option> </optgroup> </select> + <br/> + <label for="retarget-comment">Comment:</label> + <!--! Don't translate ticket comment (comment:40:ticket:5658) --> + <input type="text" id="retarget-comment" name="comment" size="40" + value="Ticket retargeted after milestone closed" /> </py:if> </div> </fieldset> <div class="field"> <fieldset> - <label for="description" i18n:msg="">Description (you may use <a tabindex="42" - href="${href.wiki('WikiFormatting')}">WikiFormatting</a> here):</label> - <p><textarea id="description" name="description" class="wikitext trac-resizable" rows="10" cols="78"> + <label for="description" i18n:msg=""> + Description: (you may use <a tabindex="42" href="${href.wiki('WikiFormatting')}">WikiFormatting</a> here) + </label> + <p><textarea id="description" name="description" class="wikitext trac-fullwidth trac-resizable" rows="10" cols="78"> ${milestone.description}</textarea></p> </fieldset> </div> <div class="buttons" py:choose="milestone.exists"> - <input py:when="True" type="submit" value="${_('Submit changes')}" /> - <input py:otherwise="" type="submit" value="${_('Add milestone')}" /> + <input py:when="True" type="submit" name="save" + value="${_('Submit changes')}" class="trac-disable-on-submit" /> + <input py:otherwise="" type="submit" name="add" + value="${_('Add milestone')}" /> <input type="submit" name="cancel" value="${_('Cancel')}" /> </div> </form>
Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/milestone_view.html URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/milestone_view.html?rev=1639823&r1=1639822&r2=1639823&view=diff ============================================================================== --- bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/milestone_view.html (original) +++ bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/milestone_view.html Sat Nov 15 01:14:46 2014 @@ -1,3 +1,13 @@ +<!--! Copyright (C) 2006-2014 Edgewall Software + + This software is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at http://trac.edgewall.com/license.html. + + This software consists of voluntary contributions made by many + individuals. For the exact contribution history, see the revision + history and logs, available at http://trac.edgewall.org/. +--> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/query.html URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/query.html?rev=1639823&r1=1639822&r2=1639823&view=diff ============================================================================== --- bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/query.html (original) +++ bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/query.html Sat Nov 15 01:14:46 2014 @@ -1,3 +1,13 @@ +<!--! Copyright (C) 2006-2014 Edgewall Software + + This software is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at http://trac.edgewall.com/license.html. + + This software consists of voluntary contributions made by many + individuals. For the exact contribution history, see the revision + history and logs, available at http://trac.edgewall.org/. +--> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> @@ -223,7 +233,7 @@ </form> <xi:include href="query_results.html" /> - <xi:include py:if="batch_modify" href="batch_modify.html" /> + <xi:include py:if="tickets and batch_modify" href="batch_modify.html" /> <div id="trac-report-buttons" class="buttons" py:with="edit = report_resource and 'REPORT_MODIFY' in perm(report_resource); Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/query_results.html URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/query_results.html?rev=1639823&r1=1639822&r2=1639823&view=diff ============================================================================== --- bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/query_results.html (original) +++ bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/query_results.html Sat Nov 15 01:14:46 2014 @@ -1,17 +1,26 @@ -<!--! - groups - a dict, where: - key - is the value shared by all results in this group - value - is the list of corresponding tickets - - headers - a sequence of header structure: - .name - field name for this header - .label - what to display for this header +<!--! Copyright (C) 2006-2014 Edgewall Software - fields - dict of field name to field structure: - .label - field label + This software is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at http://trac.edgewall.com/license.html. - query - the actual Query instance used to perform the query + This software consists of voluntary contributions made by many + individuals. For the exact contribution history, see the revision + history and logs, available at http://trac.edgewall.org/. +Arguments: + - groups - a dict, where: + key - is the value shared by all results in this group + value - is the list of corresponding tickets + + - headers - a sequence of header structure: + .name - field name for this header + .label - what to display for this header + + - fields - dict of field name to field structure: + .label - field label + + - query - the actual Query instance used to perform the query --> <div xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://genshi.edgewall.org/" @@ -74,7 +83,8 @@ <py:with vars="name = header.name; value = result[name]"> <td py:when="name == 'id'" class="id"><a href="$result.href" title="View ticket" class="${classes(closed=result.status == 'closed')}">#$result.id</a></td> - <td py:otherwise="" class="$name" py:choose=""> + <td py:otherwise="" class="$name" + xml:space="${'preserve' if header.wikifyblock else None}" py:choose=""> <a py:when="name == 'summary'" href="$result.href" title="View ticket">$value</a> <py:when test="isinstance(value, datetime)">${pretty_dateinfo(value, dateonly=True)}</py:when> <py:when test="name == 'reporter'">${authorinfo(value)}</py:when> @@ -82,6 +92,7 @@ <py:when test="name == 'owner' and value">${authorinfo(value)}</py:when> <py:when test="name == 'milestone'"><a py:if="value" title="View milestone" href="${href.milestone(value)}">${value}</a></py:when> <py:when test="header.wikify">${wiki_to_oneliner(ticket_context, value)}</py:when> + <py:when test="header.wikifyblock">${wiki_to_html(ticket_context, value)}</py:when> <py:otherwise>$value</py:otherwise> </td> </py:with> Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/report_delete.html URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/report_delete.html?rev=1639823&r1=1639822&r2=1639823&view=diff ============================================================================== --- bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/report_delete.html (original) +++ bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/report_delete.html Sat Nov 15 01:14:46 2014 @@ -1,3 +1,13 @@ +<!--! Copyright (C) 2006-2014 Edgewall Software + + This software is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at http://trac.edgewall.com/license.html. + + This software consists of voluntary contributions made by many + individuals. For the exact contribution history, see the revision + history and logs, available at http://trac.edgewall.org/. +--> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> @@ -12,14 +22,14 @@ <body> <div id="content" class="report"> - <h1>$report.title</h1> + <h1>{$report.id} $report.title</h1> <form action="${href.report()}" method="post"> <p><strong>Are you sure you want to delete this report?</strong></p> <div class="buttons"> <input type="hidden" name="id" value="$report.id"/> <input type="hidden" name="action" value="delete" /> + <input type="submit" class="trac-disable-on-submit" value="${_('Delete report')}"/> <input type="submit" name="cancel" value="${_('Cancel')}"/> - <input type="submit" value="${_('Delete report')}"/> </div> </form> Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/report_edit.html URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/report_edit.html?rev=1639823&r1=1639822&r2=1639823&view=diff ============================================================================== --- bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/report_edit.html (original) +++ bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/report_edit.html Sat Nov 15 01:14:46 2014 @@ -1,3 +1,13 @@ +<!--! Copyright (C) 2006-2014 Edgewall Software + + This software is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at http://trac.edgewall.com/license.html. + + This software consists of voluntary contributions made by many + individuals. For the exact contribution history, see the revision + history and logs, available at http://trac.edgewall.org/. +--> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> @@ -11,38 +21,45 @@ </head> <body> - <div id="content" class="report"> + <div id="content" class="report edit" + py:with="new_report = action == 'new'"> - <h1>${_('New Report') if action == 'new' else report.title}</h1> - <form action="${href.report(report.id)}" method="post" id="edit_report"> - <div> + <h1 py:choose=""> + <py:when test="new_report">New Report</py:when> + <py:otherwise>$report.title</py:otherwise> + </h1> + <form id="edit_report" method="post" action="${href.report(report.id)}"> + <fieldset> + <legend py:choose=""> + <py:when test="new_report">Create Report:</py:when> + <py:otherwise>Modify Report:</py:otherwise> + </legend> <input type="hidden" name="action" value="$action" /> <div class="field"> - <label for="title">Report Title:</label><br /> - <input type="text" id="title" name="title" value="$report.title" size="50"/><br /> + <label for="title">Title:</label> + <input type="text" id="title" name="title" class="trac-fullwidth trac-autofocus" value="$report.title" /> </div> <div class="field"> <label for="description" i18n:msg=""> Description: (you may use <a tabindex="42" href="${href.wiki('WikiFormatting')}">WikiFormatting</a> here) </label> - <br /> - <textarea id="description" name="description" class="wikitext trac-resizable" rows="10" cols="78"> + <textarea id="description" name="description" class="wikitext trac-fullwidth trac-resizable" rows="10" cols="78"> $report.description</textarea> </div> <div class="field"> <div class="system-message" py:if="error"> <strong>Error:</strong> $error </div> - <label for="query" i18n:msg="">Query for Report: (can be either SQL or, if starting with <tt>query:</tt>, + <label for="query" i18n:msg="">Query: (can be either SQL or, if starting with <tt>query:</tt>, a <a tabindex="42" href="${href.wiki('TracQuery') + '#QueryLanguage'}">TracQuery</a> expression) - </label><br /> - <textarea id="query" name="query" class="trac-resizable" cols="85" rows="20"> + </label> + <textarea id="query" name="query" class="trac-fullwidth trac-resizable" rows="20" cols="78"> $report.sql</textarea> </div> - <div class="buttons"> - <input type="submit" value="${_('Save report')}"/> - <input type="submit" name="cancel" value="${_('Cancel')}"/> - </div> + </fieldset> + <div class="buttons"> + <input type="submit" class="trac-disable-on-submit" value="${_('Save report')}" /> + <input type="submit" name="cancel" value="${_('Cancel')}" /> </div> </form> Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/report_list.html URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/report_list.html?rev=1639823&r1=1639822&r2=1639823&view=diff ============================================================================== --- bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/report_list.html (original) +++ bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/report_list.html Sat Nov 15 01:14:46 2014 @@ -1,3 +1,13 @@ +<!--! Copyright (C) 2009-2014 Edgewall Software + + This software is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at http://trac.edgewall.com/license.html. + + This software consists of voluntary contributions made by many + individuals. For the exact contribution history, see the revision + history and logs, available at http://trac.edgewall.org/. +--> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> @@ -96,7 +106,7 @@ </a></h3> <span class="foldable" /> <div py:if="description" class="description" xml:space="preserve"> - ${wiki_to_html(context, description)} + ${wiki_to_html(context.child('report', id), description)} </div> </div> </py:when> Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/report_view.html URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/report_view.html?rev=1639823&r1=1639822&r2=1639823&view=diff ============================================================================== --- bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/report_view.html (original) +++ bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/report_view.html Sat Nov 15 01:14:46 2014 @@ -1,3 +1,13 @@ +<!--! Copyright (C) 2006-2014 Edgewall Software + + This software is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at http://trac.edgewall.com/license.html. + + This software consists of voluntary contributions made by many + individuals. For the exact contribution history, see the revision + history and logs, available at http://trac.edgewall.org/. +--> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/roadmap.html URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/roadmap.html?rev=1639823&r1=1639822&r2=1639823&view=diff ============================================================================== --- bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/roadmap.html (original) +++ bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/roadmap.html Sat Nov 15 01:14:46 2014 @@ -1,3 +1,13 @@ +<!--! Copyright (C) 2006-2014 Edgewall Software + + This software is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at http://trac.edgewall.com/license.html. + + This software consists of voluntary contributions made by many + individuals. For the exact contribution history, see the revision + history and logs, available at http://trac.edgewall.org/. +--> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> @@ -60,7 +70,7 @@ </py:choose> <xi:include href="progress_bar.html" py:if="mstats.stats.count" py:with="stats = mstats.stats; interval_hrefs = mstats.interval_hrefs; - stats_href = mstats.stats_href"/> + stats_href = mstats.stats_href" /> </div> <div class="description" xml:space="preserve"> @@ -71,10 +81,10 @@ </div> <div py:if="'MILESTONE_CREATE' in perm" class="buttons"> - <form method="get" action="${href.milestone()}"><div> - <input type="hidden" name="action" value="new" /> - <input type="submit" value="${_('Add new milestone')}" /> - </div></form> + <form id="add" method="get" action="${href.milestone()}"><div> + <input type="hidden" name="action" value="new" /> + <input type="submit" value="${_('Add new milestone')}" /> + </div></form> </div> <div id="help" i18n:msg=""><strong>Note:</strong> See Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/ticket.html URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/ticket.html?rev=1639823&r1=1639822&r2=1639823&view=diff ============================================================================== --- bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/ticket.html (original) +++ bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/ticket.html Sat Nov 15 01:14:46 2014 @@ -1,3 +1,13 @@ +<!--! Copyright (C) 2007-2014 Edgewall Software + + This software is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at http://trac.edgewall.com/license.html. + + This software consists of voluntary contributions made by many + individuals. For the exact contribution history, see the revision + history and logs, available at http://trac.edgewall.org/. +--> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> @@ -97,17 +107,11 @@ comment.toggle(comment.children().length != 0); }, "#changelog .trac-loading"); /*]]>*/ - <py:if test="preview_mode"> - $("#trac-add-comment").scrollToTop(); - </py:if> </py:when> <py:otherwise> $("#propertyform").autoSubmit({preview: '1'}, function(data, reply) { $('#ticket').replaceWith(reply); }, "#ticket .trac-loading"); - <py:if test="not preview_mode"> - $("#field-summary").focus(); - </py:if> </py:otherwise> }); </script> @@ -182,7 +186,8 @@ action="${href.ticket(ticket.id) + '#trac-add-comment' if ticket.exists else href.newticket() + '#ticket'}"> <!--! Add comment --> - <div py:if="ticket.exists and can_append" id="trac-add-comment" class="field"> + <div py:if="ticket.exists and can_append" id="trac-add-comment" + class="${classes('field', 'trac-scroll' if preview_mode else None)}"> <h3 class="foldable" id="edit">Add Comment</h3> <div> <div id="trac-edit-warning" class="warning system-message" @@ -199,7 +204,7 @@ <a tabindex="42" href="${href.wiki('WikiFormatting')}">WikiFormatting</a> here. </label> - <textarea id="comment" name="comment" class="wikitext trac-resizable" rows="10" cols="78"> + <textarea id="comment" name="comment" class="wikitext trac-fullwidth trac-resizable" rows="10" cols="78"> ${comment}</textarea> </fieldset> </div> @@ -216,37 +221,35 @@ ${comment}</textarea> <py:otherwise>Properties</py:otherwise> </legend> <table> + <col class="th" /><col class="td" /><col class="th" /><col class="td" /> <tr py:if="can_modify or can_create"> <th><label for="field-summary">Summary:</label></th> <td class="fullrow" colspan="3"> <input type="text" id="field-summary" name="field_summary" - value="$ticket.summary" size="70" /> + class="${'trac-autofocus' if not ticket.exists and not preview_mode else None}" + value="$ticket.summary" /> </td> </tr> - <py:if test="only_for_admin"> - <tr> - <th><label for="field-reporter">Reporter:</label></th> - <td class="fullrow" colspan="3"> - <input type="text" id="field-reporter" name="field_reporter" - value="${ticket.reporter}" size="70" /> - </td> - </tr> - </py:if> - <py:if test="can_edit or can_create"> - <tr> - <th><label for="field-description">Description:</label></th> - <td class="fullrow" colspan="3"> - <fieldset> - <label for="field-description" id="field-description-help" i18n:msg="">You may use - <a tabindex="42" href="${href.wiki('WikiFormatting')}">WikiFormatting</a> here. - </label> - <textarea id="field-description" name="field_description" - class="wikitext trac-resizable" rows="10" cols="68"> + <tr py:if="only_for_admin"> + <th><label for="field-reporter">Reporter:</label></th> + <td class="fullrow" colspan="3"> + <input type="text" id="field-reporter" name="field_reporter" + value="${ticket.reporter}" /> + </td> + </tr> + <tr py:if="can_edit or can_create"> + <th><label for="field-description">Description:</label></th> + <td class="fullrow" colspan="3"> + <fieldset> + <label for="field-description" id="field-description-help" i18n:msg="">You may use + <a tabindex="42" href="${href.wiki('WikiFormatting')}">WikiFormatting</a> here. + </label> + <textarea id="field-description" name="field_description" + class="wikitext trac-fullwidth trac-resizable" rows="10" cols="68"> ${ticket.description}</textarea> - </fieldset> - </td> - </tr> - </py:if> + </fieldset> + </td> + </tr> <tr py:for="row in group(fields, 2, lambda f: f.type != 'textarea')" py:if="can_modify or can_create" py:with="fullrow = len(row) == 1"> @@ -361,7 +364,7 @@ ${value}</textarea> </tr> </table> <p py:if="author_id == 'anonymous'" class="hint"> - <i18n:msg>E-mail address and user name can be saved in the <a href="${href.prefs()}">Preferences</a>.</i18n:msg> + <i18n:msg>E-mail address and user name can be saved in the <a href="${href.prefs()}" class="trac-target-new">Preferences</a>.</i18n:msg> </p> </fieldset> </div> @@ -385,7 +388,7 @@ ${value}</textarea> <input type="hidden" name="replyto" value="${replyto}" /> </py:if> <input type="submit" name="preview" value="${_('Preview')}" accesskey="r" /> - <input type="submit" name="submit" value="${_('Submit changes') if ticket.exists else _('Create ticket')}" /> + <input type="submit" name="submit" value="${_('Submit changes') if ticket.exists else _('Create ticket')}" class="trac-disable-on-submit" /> </div> </form> Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/ticket_box.html URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/ticket_box.html?rev=1639823&r1=1639822&r2=1639823&view=diff ============================================================================== --- bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/ticket_box.html (original) +++ bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/ticket_box.html Sat Nov 15 01:14:46 2014 @@ -1,4 +1,13 @@ -<!--! +<!--! Copyright (C) 2010-2014 Edgewall Software + + This software is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at http://trac.edgewall.com/license.html. + + This software consists of voluntary contributions made by many + individuals. For the exact contribution history, see the revision + history and logs, available at http://trac.edgewall.org/. + Ticket Box (ticket fields along with description). Arguments: Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/ticket_change.html URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/ticket_change.html?rev=1639823&r1=1639822&r2=1639823&view=diff ============================================================================== --- bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/ticket_change.html (original) +++ bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/ticket_change.html Sat Nov 15 01:14:46 2014 @@ -1,4 +1,13 @@ -<!--! +<!--! Copyright (C) 2010-2014 Edgewall Software + + This software is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at http://trac.edgewall.com/license.html. + + This software consists of voluntary contributions made by many + individuals. For the exact contribution history, see the revision + history and logs, available at http://trac.edgewall.org/. + Render a ticket comment. Arguments: @@ -106,7 +115,7 @@ Arguments: <form py:if="show_editor" id="trac-comment-editor" method="post" action="${href.ticket(ticket.id) + '#comment:%d' % cnum}"> <div> - <textarea name="edited_comment" class="wikitext trac-resizable" rows="10" cols="78"> + <textarea name="edited_comment" class="wikitext trac-fullwidth trac-resizable" rows="10" cols="78"> ${edited_comment if edited_comment is not None else change.comment}</textarea> <input type="hidden" name="cnum_edit" value="${cnum}"/> </div> Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/ticket_preview.html URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/ticket_preview.html?rev=1639823&r1=1639822&r2=1639823&view=diff ============================================================================== --- bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/ticket_preview.html (original) +++ bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/templates/ticket_preview.html Sat Nov 15 01:14:46 2014 @@ -1,4 +1,13 @@ -<!--! +<!--! Copyright (C) 2011-2014 Edgewall Software + + This software is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at http://trac.edgewall.com/license.html. + + This software consists of voluntary contributions made by many + individuals. For the exact contribution history, see the revision + history and logs, available at http://trac.edgewall.org/. + Render data relevant to automatic ticket preview. --> <html xmlns="http://www.w3.org/1999/xhtml" Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/tests/__init__.py URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/tests/__init__.py?rev=1639823&r1=1639822&r2=1639823&view=diff ============================================================================== --- bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/tests/__init__.py (original) +++ bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/tests/__init__.py Sat Nov 15 01:14:46 2014 @@ -1,3 +1,16 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2005-2013 Edgewall Software +# All rights reserved. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at http://trac.edgewall.org/wiki/TracLicense. +# +# This software consists of voluntary contributions made by many +# individuals. For the exact contribution history, see the revision +# history and logs, available at http://trac.edgewall.org/log/. + import doctest import unittest Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/tests/api.py URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/tests/api.py?rev=1639823&r1=1639822&r2=1639823&view=diff ============================================================================== --- bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/tests/api.py (original) +++ bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/tests/api.py Sat Nov 15 01:14:46 2014 @@ -1,7 +1,20 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2005-2013 Edgewall Software +# All rights reserved. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at http://trac.edgewall.org/wiki/TracLicense. +# +# This software consists of voluntary contributions made by many +# individuals. For the exact contribution history, see the revision +# history and logs, available at http://trac.edgewall.org/log/. + from trac.perm import PermissionCache, PermissionSystem +from trac.test import EnvironmentStub, Mock from trac.ticket.api import TicketSystem, ITicketFieldProvider from trac.ticket.model import Ticket -from trac.test import EnvironmentStub, Mock from trac.core import implements, Component import unittest @@ -174,7 +187,8 @@ class TicketSystemTestCase(unittest.Test def suite(): - return unittest.makeSuite(TicketSystemTestCase, 'test') + return unittest.makeSuite(TicketSystemTestCase) + if __name__ == '__main__': - unittest.main() + unittest.main(defaultTest='suite') Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/tests/batch.py URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/tests/batch.py?rev=1639823&r1=1639822&r2=1639823&view=diff ============================================================================== --- bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/tests/batch.py (original) +++ bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/tests/batch.py Sat Nov 15 01:14:46 2014 @@ -1,11 +1,29 @@ -from trac.perm import PermissionCache +# -*- coding: utf-8 -*- +# +# Copyright (C) 2012-2013 Edgewall Software +# All rights reserved. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at http://trac.edgewall.org/wiki/TracLicense. +# +# This software consists of voluntary contributions made by many +# individuals. For the exact contribution history, see the revision +# history and logs, available at http://trac.edgewall.org/log/. + +from __future__ import with_statement + +import unittest +from datetime import datetime, timedelta + +from trac.perm import DefaultPermissionPolicy, DefaultPermissionStore,\ + PermissionCache from trac.test import Mock, EnvironmentStub from trac.ticket import api, default_workflow, web_ui from trac.ticket.batch import BatchModifyModule from trac.ticket.model import Ticket from trac.util.datefmt import utc - -import unittest +from trac.web.chrome import web_context class BatchModifyTestCase(unittest.TestCase): @@ -13,8 +31,10 @@ class BatchModifyTestCase(unittest.TestC def setUp(self): self.env = EnvironmentStub(default_data=True, enable=[default_workflow.ConfigurableTicketWorkflow, - web_ui.TicketModule, - api.TicketSystem]) + DefaultPermissionPolicy, DefaultPermissionStore, + web_ui.TicketModule, api.TicketSystem]) + self.env.config.set('trac', 'permission_policies', + 'DefaultPermissionPolicy') self.req = Mock(href=self.env.href, authname='anonymous', tz=utc) self.req.session = {} self.req.perm = PermissionCache(self.env) @@ -220,8 +240,6 @@ class BatchModifyTestCase(unittest.TestC batch._save_ticket_changes(self.req, selected_tickets, {}, '', 'embiggen') - ticket = Ticket(self.env, int(first_ticket_id)) - changes = ticket.get_changelog() self.assertFieldChanged(first_ticket_id, 'status', 'big') self.assertFieldChanged(second_ticket_id, 'status', 'big') @@ -242,15 +260,56 @@ class BatchModifyTestCase(unittest.TestC batch._save_ticket_changes(self.req, selected_tickets, {}, '', 'buckify') - ticket = Ticket(self.env, int(first_ticket_id)) - changes = ticket.get_changelog() self.assertFieldChanged(first_ticket_id, 'owner', 'buck') self.assertFieldChanged(second_ticket_id, 'owner', 'buck') + def test_timeline_events(self): + """Regression test for #11288""" + tktmod = web_ui.TicketModule(self.env) + now = datetime.now(utc) + start = now - timedelta(hours=1) + stop = now + timedelta(hours=1) + events = tktmod.get_timeline_events(self.req, start, stop, + ['ticket_details']) + self.assertEqual(True, all(ev[0] != 'batchmodify' for ev in events)) + + ids = [] + for i in xrange(20): + ticket = Ticket(self.env) + ticket['summary'] = 'Ticket %d' % i + ids.append(ticket.insert()) + ids.sort() + new_values = {'summary': 'batch updated ticket', + 'owner': 'ticket11288', 'reporter': 'ticket11288'} + batch = BatchModifyModule(self.env) + batch._save_ticket_changes(self.req, ids, new_values, '', 'leave') + # shuffle ticket_change records + with self.env.db_transaction as db: + rows = db('SELECT * FROM ticket_change') + db.execute('DELETE FROM ticket_change') + rows = rows[0::4] + rows[1::4] + rows[2::4] + rows[3::4] + db.executemany('INSERT INTO ticket_change VALUES (%s)' % + ','.join(('%s',) * len(rows[0])), + rows) + + events = tktmod.get_timeline_events(self.req, start, stop, + ['ticket_details']) + events = [ev for ev in events if ev[0] == 'batchmodify'] + self.assertEqual(1, len(events)) + batch_ev = events[0] + self.assertEqual('anonymous', batch_ev[2]) + self.assertEqual(ids, sorted(batch_ev[3][0])) + self.assertEqual('updated', batch_ev[3][1]) + + context = web_context(self.req) + self.assertEqual( + self.req.href.query(id=','.join(str(t) for t in ids)), + tktmod.render_timeline_event(context, 'url', batch_ev)) + def suite(): suite = unittest.TestSuite() - suite.addTest(unittest.makeSuite(BatchModifyTestCase, 'test')) + suite.addTest(unittest.makeSuite(BatchModifyTestCase)) return suite if __name__ == '__main__': Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/tests/conversion.py URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/tests/conversion.py?rev=1639823&r1=1639822&r2=1639823&view=diff ============================================================================== --- bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/tests/conversion.py (original) +++ bloodhound/branches/trac-1.0.2-integration/trac/trac/ticket/tests/conversion.py Sat Nov 15 01:14:46 2014 @@ -1,11 +1,24 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2005-2013 Edgewall Software +# All rights reserved. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at http://trac.edgewall.org/wiki/TracLicense. +# +# This software consists of voluntary contributions made by many +# individuals. For the exact contribution history, see the revision +# history and logs, available at http://trac.edgewall.org/log/. + import os import unittest from trac import __version__ as TRAC_VERSION -from trac.test import EnvironmentStub, Mock +from trac.mimeview.api import Mimeview +from trac.test import EnvironmentStub, Mock, MockPerm from trac.ticket.model import Ticket from trac.ticket.web_ui import TicketModule -from trac.mimeview.api import Mimeview from trac.web.href import Href @@ -37,6 +50,16 @@ class TicketConversionTestCase(unittest. ticket.insert() return ticket + def _create_a_ticket_with_email(self): + ticket = Ticket(self.env) + ticket['owner'] = 'j...@example.org' + ticket['reporter'] = 'sa...@example.org' + ticket['cc'] = 'cc1, c...@example.org' + ticket['summary'] = 'Foo' + ticket['description'] = 'Bar' + ticket.insert() + return ticket + def test_conversions(self): conversions = self.mimeview.get_supported_conversions( 'trac.ticket.Ticket') @@ -61,6 +84,26 @@ class TicketConversionTestCase(unittest. 'keywords,cc\r\n1,Foo,santa,,Bar,,,\r\n', 'text/csv;charset=utf-8', 'csv'), csv) + def test_csv_conversion_with_obfuscation(self): + ticket = self._create_a_ticket_with_email() + csv = self.mimeview.convert_content(self.req, 'trac.ticket.Ticket', + ticket, 'csv') + self.assertEqual( + ('\xef\xbb\xbf' + 'id,summary,reporter,owner,description,status,keywords,cc\r\n' + '1,Foo,santa@â¦,joe@â¦,Bar,,,cc1 cc2@â¦\r\n', + 'text/csv;charset=utf-8', 'csv'), + csv) + self.req.perm = MockPerm() + csv = self.mimeview.convert_content(self.req, 'trac.ticket.Ticket', + ticket, 'csv') + self.assertEqual( + ('\xef\xbb\xbf' + 'id,summary,reporter,owner,description,status,keywords,cc\r\n' + '1,Foo,sa...@example.org,j...@example.org,Bar,,,' + 'cc1 c...@example.org\r\n', + 'text/csv;charset=utf-8', 'csv'), + csv) def test_tab_conversion(self): ticket = self._create_a_ticket() @@ -72,6 +115,29 @@ class TicketConversionTestCase(unittest. 'text/tab-separated-values;charset=utf-8', 'tsv'), csv) + def test_tab_conversion_with_obfuscation(self): + ticket = self._create_a_ticket_with_email() + csv = self.mimeview.convert_content(self.req, 'trac.ticket.Ticket', + ticket, 'tab') + self.assertEqual( + ('\xef\xbb\xbf' + 'id\tsummary\treporter\towner\tdescription\tstatus\tkeywords\t' + 'cc\r\n' + '1\tFoo\tsanta@â¦\tjoe@â¦\tBar\t\t\tcc1 cc2@â¦\r\n', + 'text/tab-separated-values;charset=utf-8', 'tsv'), + csv) + self.req.perm = MockPerm() + csv = self.mimeview.convert_content(self.req, 'trac.ticket.Ticket', + ticket, 'tab') + self.assertEqual( + ('\xef\xbb\xbf' + 'id\tsummary\treporter\towner\tdescription\tstatus\tkeywords\t' + 'cc\r\n' + '1\tFoo\tsa...@example.org\t...@example.org\tBar\t\t\t' + 'cc1 c...@example.org\r\n', + 'text/tab-separated-values;charset=utf-8', 'tsv'), + csv) + def test_rss_conversion(self): ticket = self._create_a_ticket() content, mimetype, ext = self.mimeview.convert_content( @@ -94,7 +160,8 @@ Bar def suite(): - return unittest.makeSuite(TicketConversionTestCase, 'test') + return unittest.makeSuite(TicketConversionTestCase) + if __name__ == '__main__': - unittest.main() + unittest.main(defaultTest='suite')