Commit 9a2c84ff authored by Kurt Maute's avatar Kurt Maute

The following updated provided by Maurice van der Pot <griffon26@kfk4ever.com>

* configure.in:  escape newlines in ALL_LINGUAS
* data/stylesheets/html1_css_ie.xsl
* data/stylesheets/html1_css.xsl
* data/stylesheets/html1_gantt.xsl
* data/stylesheets/Makefile.am
* data/stylesheets/planner2html.xsl - fix layout of gantt chart in
HTML export (headers not aligned with gantt bars) per bug #393620


svn path=/trunk/; revision=843
parent 8ba0bcab
2007-07-02 Kurt Maute <kurt@maute.us>
The following updated provided by Maurice van der Pot <griffon26@kfk4ever.com>
* configure.in: escape newlines in ALL_LINGUAS
* data/stylesheets/html1_css_ie.xsl
* data/stylesheets/html1_css.xsl
* data/stylesheets/html1_gantt.xsl
* data/stylesheets/Makefile.am
* data/stylesheets/planner2html.xsl - fix layout of gantt chart in
HTML export (headers not aligned with gantt bars) per bug #393620
2007-06-11 Chao-Hsiung Liao <j_h_liau@yahoo.com.tw>
* configure.in: Added 'zh_HK' to ALL_LINGUAS.
......
......@@ -161,8 +161,8 @@ GETTEXT_PACKAGE=planner
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [The prefix for our gettext translation domains.])
ALL_LINGUAS="am ar az be bg ca cs da de dz el en_CA en_GB es et eu fa fi
fr hi hr hu id is it ja kn ko lt lv ml mn ms nb ne nl nn pa pl pt pt_BR
ALL_LINGUAS="am ar az be bg ca cs da de dz el en_CA en_GB es et eu fa fi \
fr hi hr hu id is it ja kn ko lt lv ml mn ms nb ne nl nn pa pl pt pt_BR \
ru rw sk sl sq sr sr@Latn sv uk vi zh_CN zh_HK zh_TW"
AM_GLIB_GNU_GETTEXT
......
......@@ -3,6 +3,7 @@ stylesheetdir = $(datadir)/planner/stylesheets
stylesheet_DATA = \
planner2html.xsl \
html1_css.xsl \
html1_css_ie.xsl \
html1_gantt.xsl \
html1_resources.xsl \
html1_tasks.xsl \
......
......@@ -186,9 +186,38 @@ span.gantt-resources {
margin-left: 0.5em;
}
th.gantt-1day-header {
width: 19px;
}
th.gantt-2day-header {
width: 38px;
}
th.gantt-3day-header {
width: 57px;
}
th.gantt-4day-header {
width: 76px;
}
th.gantt-5day-header {
width: 95px;
}
th.gantt-6day-header {
width: 114px;
}
th.gantt-week-header {
width: 133px;
}
th.gantt-day-header {
margin: 0;
padding: 0;
width: 19px;
}
</xsl:comment>
......
......@@ -18,7 +18,7 @@
<xsl:param name="date"/>
<xsl:choose>
<xsl:when test="date:day-in-week($date) = 2 and $days >= 7">
<th align="center" colspan="7">
<th class="gantt-week-header" align="center" colspan="7">
<xsl:value-of select="I18N:gettext('Week')"/>&nbsp;<xsl:value-of select="date:week-in-year($date) + 1"/>, <xsl:value-of select="date:year($date)"/>
</th>
<xsl:if test="not($days = 7)">
......@@ -29,7 +29,8 @@
</xsl:if>
</xsl:when>
<xsl:when test="not($days >= 7)">
<th colspan="{$days}"></th>
<th class="gantt-{$days}day-header" colspan="{$days}"></th>
<th></th>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="colspan">
......@@ -40,7 +41,7 @@
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<th colspan="{$colspan}"></th>
<th class="gantt-{$colspan}day-header" colspan="{$colspan}"></th>
<xsl:if test="$days > 1">
<xsl:call-template name="create-week-row">
<xsl:with-param name="days" select="$days - $colspan"/>
......@@ -54,15 +55,21 @@
<xsl:template name="create-day-row">
<xsl:param name="days"/>
<xsl:param name="date"/>
<th class="gantt-day-header" align="center" width="19px">
<th class="gantt-day-header" align="center">
<xsl:value-of select="date:day-in-month($date)"/>
</th>
<xsl:if test="$days > 1">
<xsl:choose>
<xsl:when test="$days > 1">
<xsl:call-template name="create-day-row">
<xsl:with-param name="days" select="$days - 1"/>
<xsl:with-param name="date" select="date:add($date, date:duration(86400))"/>
</xsl:call-template>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<th align="center">
</th>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="gantt">
......@@ -180,7 +187,7 @@
<td>
<div class="scroll-div" style="border-color: #aaa #aaa #aaa #fff;">
<table cellspacing="0" cellpadding="0" border="1">
<table cellspacing="0" cellpadding="0" border="1" style="table-layout: fixed;">
<tr class="header" align="left">
<xsl:call-template name="create-week-row">
<xsl:with-param name="days" select="$days"/>
......@@ -221,7 +228,7 @@
<xsl:variable name="task-complete" select="floor($task-end * (@percent-complete div 100))"/>
<tr class="{$rowclass}">
<td colspan="{$days}">
<td colspan="{$days + 1}">
<div style="width: {$days * 20 + 1}px; white-space: nowrap;">
<xsl:if test="not (task)">
<xsl:if test="$task-start > 0">
......@@ -265,7 +272,15 @@
<xsl:for-each select="/project/allocations/allocation[@task-id=$task-id]">
<xsl:sort data-type="number" select="@resource-id" order="descending"/>
<xsl:variable name="resource-id" select="@resource-id"/>
<xsl:value-of select="/project/resources/resource[@id=$resource-id]/@short-name"/>
<xsl:choose>
<xsl:when test="/project/resources/resource[@id=$resource-id]/@short-name = ''">
<xsl:value-of select="/project/resources/resource[@id=$resource-id]/@name"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="/project/resources/resource[@id=$resource-id]/@short-name"/>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="not(position() = last())">
<xsl:text>, </xsl:text>
</xsl:if>
......
......@@ -33,6 +33,7 @@
<!-- CSS file to be included in XHTML output -->
<xsl:variable name="css-stylesheet-local" select="'html1_css.xsl'"/>
<xsl:variable name="css-stylesheet-local-ie" select="'html1_css_ie.xsl'"/>
<!-- Current date/time at UTC/GMT -->
......@@ -145,6 +146,11 @@
<style type="text/css">
<xsl:value-of select="document($css-stylesheet-local)"/>
</style>
<xsl:comment>
<xsl:text>[if lte IE 6]&gt;&lt;style type="text/css"&gt;</xsl:text>
<xsl:value-of select="document($css-stylesheet-local-ie)"/>
<xsl:text>&lt;/style&gt;&lt;![endif]</xsl:text>
</xsl:comment>
</head>
</xsl:template>
......
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