Skip to content

Commit

Permalink
add format option in admin panel and show warning if complete field i…
Browse files Browse the repository at this point in the history
…s not defined.

git-svn-id: http://svn.sourceforge.jp/svnroot/shibuya-trac/plugins/ganttcalendarplugin/trunk@801 456a77e7-5939-0410-b211-84f85430c667
  • Loading branch information
okamototk committed Jun 8, 2011
1 parent 2722880 commit 21e3e2c
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 1 deletion.
Binary file modified ganttcalendar/locale/en/LC_MESSAGES/ganttcalendar.mo
Binary file not shown.
2 changes: 2 additions & 0 deletions ganttcalendar/locale/en/LC_MESSAGES/ganttcalendar.po
Original file line number Diff line number Diff line change
Expand Up @@ -242,3 +242,5 @@ msgstr ""
msgid "December"
msgstr ""

msgid "'complete' field is not defined. Please define it."
msgstr ""
Binary file modified ganttcalendar/locale/ja/LC_MESSAGES/ganttcalendar.mo
Binary file not shown.
3 changes: 3 additions & 0 deletions ganttcalendar/locale/ja/LC_MESSAGES/ganttcalendar.po
Original file line number Diff line number Diff line change
Expand Up @@ -238,3 +238,6 @@ msgstr "11月"

msgid "December"
msgstr "12月"

msgid "'complete' field is not defined. Please define it."
msgstr "カスタムフィールド'complete'が定義されていません。'complete'フィールドを定義してください"
Binary file modified ganttcalendar/locale/ko/LC_MESSAGES/ganttcalendar.mo
Binary file not shown.
6 changes: 5 additions & 1 deletion ganttcalendar/ticketgantt.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from trac.ticket.api import TicketSystem
#from trac.util.translation import _
from trac.config import IntOption, BoolOption
from trac.config import IntOption, BoolOption, Option
from trac import __version__
from trac.util.translation import domain_functions

Expand Down Expand Up @@ -44,6 +44,7 @@ class TicketGanttChartPlugin(Component):
first_day = IntOption('ganttcalendar', 'first_day', '0', """Begin of week: 0 == Sunday, 1 == Monday (default: 0)""")
show_ticket_summary = BoolOption('ganttcalendar', 'show_ticket_summary', 'false', """Show ticket summary at gantchart bar. (default: false)""")
normal_mode = IntOption('ganttcalendar', 'default_zoom_mode', '3', """Default zoom mode in gantchar. (default: 3)""")
format = Option('ganttcalendar', 'format', '%Y/%m/%d', """Date format for due assign and due finish""")

substitutions = ['$USER']
clause_re = re.compile(r'(?P<clause>\d+)_(?P<field>.+)$')
Expand Down Expand Up @@ -201,6 +202,9 @@ def process_request(self, req):
show_ticket_summary = req.args.get('show_ticket_summary')
show_ticket_status = req.args.get('show_ticket_status')

ts = TicketSystem(self.env)
if not 'complete' in ts.get_custom_fields():
add_warning(req, _("'complete' field is not defined. Please define it."))
normal_mode = req.args.get('normal')
current_mode = req.args.get('zoom')
zoom_modes = [1, 2, 3, 4, 5, 6] # zoom modes
Expand Down

0 comments on commit 21e3e2c

Please sign in to comment.