You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by gj...@apache.org on 2012/05/15 17:38:08 UTC
svn commit: r1338757 - in
/incubator/bloodhound/trunk/bloodhound_theme/bhtheme:
templates/bh_milestone_edit.html theme.py
Author: gjm
Date: Tue May 15 15:38:07 2012
New Revision: 1338757
URL: http://svn.apache.org/viewvc?rev=1338757&view=rev
Log:
theme: edit milestone converted to bootstrap styling - towrds #75 (from olemis)
Added:
incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_milestone_edit.html (with props)
Modified:
incubator/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py
Added: incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_milestone_edit.html
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_milestone_edit.html?rev=1338757&view=auto
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_milestone_edit.html (added)
+++ incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_milestone_edit.html Tue May 15 15:38:07 2012
@@ -0,0 +1,145 @@
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:py="http://genshi.edgewall.org/"
+ xmlns:i18n="http://genshi.edgewall.org/i18n"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <xi:include href="layout.html" />
+ <head>
+ <py:choose test="milestone.exists">
+ <title py:when="True">Edit Milestone ${milestone.name}</title>
+ <title py:otherwise="">New Milestone</title>
+ </py:choose>
+ <link rel="stylesheet" type="text/css"
+ href="${chrome.htdocs_location}css/roadmap.css" />
+ <script type="text/javascript">/*<![CDATA[*/
+ jQuery(document).ready(function($) {
+ function updateDueDate() {
+ $("#duedate").enable($("#due").checked());
+ }
+ $("#due").click(updateDueDate);
+ updateDueDate();
+ function updateCompletedDate() {
+ var checked = $("#completed").checked();
+ $("#completeddate").enable(checked);
+ var retarget = $("#retarget");
+ retarget.enable(checked);
+ $("#target").enable(checked && retarget.checked());
+ }
+ $("#completed").click(updateCompletedDate);
+ updateCompletedDate();
+ $("#retarget").click(function(){
+ $("#target").enable(this.checked);
+ });
+ $("#name").get(0).focus()
+ $("#duedate").datetimepicker();
+ $("#completeddate").datetimepicker();
+ });
+ /*]]>*/</script>
+ </head>
+
+ <body>
+ <div id="content" class="milestone row">
+ <py:choose test="milestone.exists">
+ <h1 py:when="True">Edit Milestone ${milestone.name}</h1>
+ <h1 py:otherwise="">New Milestone</h1>
+ </py:choose>
+
+ <form id="edit" action="" method="post" class="form-horizontal">
+ <input type="hidden" name="id" value="${milestone.name}" />
+ <input type="hidden" name="action" value="edit" />
+ <div class="span6">
+ <div class="field control-group">
+ <label for="name" class="control-label">Name of the milestone:</label>
+ <div class="controls">
+ <input type="text" id="name" name="name" size="32" value="${milestone.name or req.args.get('name')}" />
+ </div>
+ </div>
+ <div class="field">
+ <fieldset class="iefix">
+ <label for="description" i18n:msg="">Description</label>
+ <p><textarea id="description" name="description" class="wikitext trac-resizable" rows="10" cols="78" placeholder="Describe this milestone using WikiFormatting">
+${milestone.description}</textarea></p>
+ <p class="help-block pull-right">
+ <span class="label label-info">Tip</span>
+ You may use <a tabindex="42"
+ href="${href.wiki('WikiFormatting')}">WikiFormatting</a> here
+ </p>
+ </fieldset>
+ </div>
+ </div>
+ <div class="span6">
+ <div class="well">
+ <fieldset>
+ <legend>Schedule</legend>
+ <div class="field control-group">
+ <label class="control-label">
+ <input type="checkbox" id="due" name="due" checked="${milestone.due or None}" />
+ Due:<br />
+ </label>
+ <div class="controls">
+ <input type="text" id="duedate" name="duedate" size="${len(datetime_hint)}"
+ value="${format_datetime(milestone.due or default_due)}"
+ title="${_('Format: %(datehint)s', datehint=datetime_hint)}"
+ placeholder="$datetime_hint" />
+ <p class="help-block" i18n:msg="datehint">
+ <span class="label label-info">Tip</span>
+ Format: ${datetime_hint}
+ </p>
+ </div>
+ </div>
+ <div class="field control-group">
+ <label class="control-label">
+ <input type="checkbox" id="completed" name="completed" checked="${milestone.completed or None}" />
+ Completed:<br />
+ </label>
+ <div class="controls">
+ <input type="text" id="completeddate" name="completeddate" size="${len(datetime_hint)}"
+ value="${format_datetime(milestone.completed)}"
+ title="${_('Format: %(datehint)s', datehint=datetime_hint)}"
+ plaveholder="$datetime_hint" />
+ <p class="help-block" i18n:msg="datehint">
+ <span class="label label-info">Tip</span>
+ Format: ${datetime_hint}
+ </p>
+ </div>
+ <py:if test="milestone_groups">
+ <br/>
+ <input type="checkbox" id="retarget" name="retarget" checked="${not milestone.completed or None}" />
+ <label for="retarget">Retarget associated open tickets to milestone:</label>
+ <select id="target" name="target" class="controls">
+ <option value="">None</option>
+ <optgroup py:for="(label, milestones) in milestone_groups"
+ py:if="milestones" label="${label}">
+ <option py:for="milestone in milestones"
+ value="${milestone.name}" py:content="milestone.name"></option>
+ </optgroup>
+ </select>
+ </py:if>
+ </div>
+ </fieldset>
+ </div>
+ </div>
+ <div class="buttons span12" py:choose="milestone.exists">
+ <input py:when="True" type="submit" value="${_('Submit changes')}"
+ class="btn" />
+ <input py:otherwise="" type="submit" value="${_('Add milestone')}"
+ class="btn" />
+ <input type="submit" name="cancel" value="${_('Cancel')}"
+ class="btn btn-inverse" />
+ </div>
+ </form>
+
+ <div id="help" class="span12" i18n:msg="">
+ <p class="help-block pull-right">
+ <span class="label label-info">Note</span> See
+ <a href="${href.wiki('TracRoadmap')}">TracRoadmap</a> for help on using
+ the roadmap.
+ </p>
+ </div>
+
+ </div>
+ </body>
+</html>
+
Propchange: incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_milestone_edit.html
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_milestone_edit.html
------------------------------------------------------------------------------
svn:mime-type = text/html
Modified: incubator/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py?rev=1338757&r1=1338756&r2=1338757&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py (original)
+++ incubator/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py Tue May 15 15:38:07 2012
@@ -70,6 +70,7 @@ class BloodhoundTheme(ThemeBase):
'wiki_view.html' : ('bh_wiki_view.html', '_modify_wiki_page_path'),
# Ticket
+ 'milestone_edit.html' : ('bh_milestone_edit.html', None),
'milestone_view.html' : ('bh_milestone_view.html', '_modify_roadmap_css'),
'report_delete.html' : ('bh_report_delete.html', None),
'report_edit.html' : ('bh_report_edit.html', None),