Show More
@@ -202,7 +202,7 b' class GistsController(BaseController):' | |||||
202 |
|
202 | |||
203 | @LoginRequired() |
|
203 | @LoginRequired() | |
204 | @NotAnonymous() |
|
204 | @NotAnonymous() | |
205 |
def new(self |
|
205 | def new(self): | |
206 | """GET /admin/gists/new: Form to create a new item""" |
|
206 | """GET /admin/gists/new: Form to create a new item""" | |
207 | # url('new_gist') |
|
207 | # url('new_gist') | |
208 | self.__load_defaults() |
|
208 | self.__load_defaults() | |
@@ -322,7 +322,9 b' class GistsController(BaseController):' | |||||
322 |
|
322 | |||
323 | @LoginRequired() |
|
323 | @LoginRequired() | |
324 | @NotAnonymous() |
|
324 | @NotAnonymous() | |
325 |
def edit_form(self, gist_id |
|
325 | def edit_form(self, gist_id): | |
|
326 | translate = _ = c.pyramid_request.translate | |||
|
327 | ||||
326 | """GET /admin/gists/gist_id/edit: Form to edit an existing item""" |
|
328 | """GET /admin/gists/gist_id/edit: Form to edit an existing item""" | |
327 | # url('edit_gist', gist_id=ID) |
|
329 | # url('edit_gist', gist_id=ID) | |
328 | self._add_gist_to_context(gist_id) |
|
330 | self._add_gist_to_context(gist_id) | |
@@ -342,6 +344,8 b' class GistsController(BaseController):' | |||||
342 | else: |
|
344 | else: | |
343 | # this cannot use timeago, since it's used in select2 as a value |
|
345 | # this cannot use timeago, since it's used in select2 as a value | |
344 | expiry = h.age(h.time_to_datetime(c.gist.gist_expires)) |
|
346 | expiry = h.age(h.time_to_datetime(c.gist.gist_expires)) | |
|
347 | ||||
|
348 | expiry = translate(expiry) | |||
345 | self.__load_defaults( |
|
349 | self.__load_defaults( | |
346 | extra_values=(0, _('%(expiry)s - current value') % {'expiry': expiry})) |
|
350 | extra_values=(0, _('%(expiry)s - current value') % {'expiry': expiry})) | |
347 | return render('admin/gists/edit.mako') |
|
351 | return render('admin/gists/edit.mako') |
General Comments 0
You need to be logged in to leave comments.
Login now