-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclient.coffee
More file actions
40 lines (35 loc) · 805 Bytes
/
Copy pathclient.coffee
File metadata and controls
40 lines (35 loc) · 805 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
App = require 'app'
Comments = require 'comments'
Db = require 'db'
Dom = require 'dom'
Form = require 'form'
Icon = require 'icon'
Modal = require 'modal'
Obs = require 'obs'
Page = require 'page'
Photo = require 'photo'
Time = require 'time'
Ui = require 'ui'
{tr} = require 'i18n'
exports.render = !->
Comments.enable
invertBar: false
messages:
title: (c) ->
if c.id>1
tr("%1 changed topic: %2", c.user, c.c)
else
tr("%1 started topic: %2", c.user, c.c)
exports.renderSettings = !->
Form.input
name: '_title'
text: tr 'Subject'
value: App.title()
Form.condition (values) ->
tr("A subject is required") if !values._title
if !Db.shared
Comments.renderInput
text: tr("Optional first message")
photo: true
name: "commentText"
snipName: "commentSnip"