├── .gitattributes ├── templates ├── portal │ ├── .gitignore │ ├── public │ │ ├── js │ │ │ └── .DS_Store │ │ ├── img │ │ │ ├── favicon.png │ │ │ ├── glyphicons-halflings.png │ │ │ └── glyphicons-halflings-white.png │ │ └── ckeditor │ │ │ ├── plugins │ │ │ ├── icons.png │ │ │ ├── icons_hidpi.png │ │ │ ├── link │ │ │ │ ├── images │ │ │ │ │ ├── anchor.png │ │ │ │ │ └── hidpi │ │ │ │ │ │ └── anchor.png │ │ │ │ └── dialogs │ │ │ │ │ └── anchor.js │ │ │ ├── smiley │ │ │ │ └── images │ │ │ │ │ ├── kiss.gif │ │ │ │ │ ├── kiss.png │ │ │ │ │ ├── heart.gif │ │ │ │ │ ├── heart.png │ │ │ │ │ ├── cry_smile.gif │ │ │ │ │ ├── cry_smile.png │ │ │ │ │ ├── envelope.gif │ │ │ │ │ ├── envelope.png │ │ │ │ │ ├── lightbulb.gif │ │ │ │ │ ├── lightbulb.png │ │ │ │ │ ├── omg_smile.gif │ │ │ │ │ ├── omg_smile.png │ │ │ │ │ ├── sad_smile.gif │ │ │ │ │ ├── sad_smile.png │ │ │ │ │ ├── thumbs_up.gif │ │ │ │ │ ├── thumbs_up.png │ │ │ │ │ ├── angel_smile.gif │ │ │ │ │ ├── angel_smile.png │ │ │ │ │ ├── angry_smile.gif │ │ │ │ │ ├── angry_smile.png │ │ │ │ │ ├── broken_heart.gif │ │ │ │ │ ├── broken_heart.png │ │ │ │ │ ├── devil_smile.gif │ │ │ │ │ ├── devil_smile.png │ │ │ │ │ ├── shades_smile.gif │ │ │ │ │ ├── shades_smile.png │ │ │ │ │ ├── teeth_smile.gif │ │ │ │ │ ├── teeth_smile.png │ │ │ │ │ ├── thumbs_down.gif │ │ │ │ │ ├── thumbs_down.png │ │ │ │ │ ├── tongue_smile.gif │ │ │ │ │ ├── tongue_smile.png │ │ │ │ │ ├── tounge_smile.gif │ │ │ │ │ ├── wink_smile.gif │ │ │ │ │ ├── wink_smile.png │ │ │ │ │ ├── confused_smile.gif │ │ │ │ │ ├── confused_smile.png │ │ │ │ │ ├── regular_smile.gif │ │ │ │ │ ├── regular_smile.png │ │ │ │ │ ├── embaressed_smile.gif │ │ │ │ │ ├── embarrassed_smile.gif │ │ │ │ │ ├── embarrassed_smile.png │ │ │ │ │ ├── whatchutalkingabout_smile.gif │ │ │ │ │ └── whatchutalkingabout_smile.png │ │ │ ├── image │ │ │ │ └── images │ │ │ │ │ └── noimage.png │ │ │ ├── magicline │ │ │ │ └── images │ │ │ │ │ ├── icon.png │ │ │ │ │ ├── icon-rtl.png │ │ │ │ │ └── hidpi │ │ │ │ │ ├── icon.png │ │ │ │ │ └── icon-rtl.png │ │ │ ├── flash │ │ │ │ └── images │ │ │ │ │ └── placeholder.png │ │ │ ├── forms │ │ │ │ ├── images │ │ │ │ │ └── hiddenfield.gif │ │ │ │ └── dialogs │ │ │ │ │ ├── hiddenfield.js │ │ │ │ │ ├── button.js │ │ │ │ │ ├── form.js │ │ │ │ │ ├── textarea.js │ │ │ │ │ ├── radio.js │ │ │ │ │ └── checkbox.js │ │ │ ├── iframe │ │ │ │ ├── images │ │ │ │ │ └── placeholder.png │ │ │ │ └── dialogs │ │ │ │ │ └── iframe.js │ │ │ ├── pagebreak │ │ │ │ └── images │ │ │ │ │ └── pagebreak.gif │ │ │ ├── showblocks │ │ │ │ └── images │ │ │ │ │ ├── block_h1.png │ │ │ │ │ ├── block_h2.png │ │ │ │ │ ├── block_h3.png │ │ │ │ │ ├── block_h4.png │ │ │ │ │ ├── block_h5.png │ │ │ │ │ ├── block_h6.png │ │ │ │ │ ├── block_p.png │ │ │ │ │ ├── block_div.png │ │ │ │ │ ├── block_pre.png │ │ │ │ │ ├── block_address.png │ │ │ │ │ └── block_blockquote.png │ │ │ ├── about │ │ │ │ └── dialogs │ │ │ │ │ ├── logo_ckeditor.png │ │ │ │ │ ├── hidpi │ │ │ │ │ └── logo_ckeditor.png │ │ │ │ │ └── about.js │ │ │ ├── templates │ │ │ │ ├── templates │ │ │ │ │ ├── images │ │ │ │ │ │ ├── template1.gif │ │ │ │ │ │ ├── template2.gif │ │ │ │ │ │ └── template3.gif │ │ │ │ │ └── default.js │ │ │ │ └── dialogs │ │ │ │ │ └── templates.css │ │ │ ├── dialog │ │ │ │ └── dialogDefinition.js │ │ │ ├── preview │ │ │ │ └── preview.html │ │ │ ├── specialchar │ │ │ │ └── dialogs │ │ │ │ │ └── lang │ │ │ │ │ ├── _translationstatus.txt │ │ │ │ │ ├── ja.js │ │ │ │ │ ├── zh.js │ │ │ │ │ ├── zh-cn.js │ │ │ │ │ ├── ko.js │ │ │ │ │ └── fr-ca.js │ │ │ ├── a11yhelp │ │ │ │ └── dialogs │ │ │ │ │ ├── lang │ │ │ │ │ ├── _translationstatus.txt │ │ │ │ │ ├── zh-cn.js │ │ │ │ │ ├── zh.js │ │ │ │ │ └── ja.js │ │ │ │ │ └── a11yhelp.js │ │ │ ├── wsc │ │ │ │ ├── README.md │ │ │ │ ├── LICENSE.md │ │ │ │ └── dialogs │ │ │ │ │ ├── wsc.css │ │ │ │ │ ├── ciframe.html │ │ │ │ │ └── tmpFrameset.html │ │ │ ├── scayt │ │ │ │ ├── README.md │ │ │ │ ├── CHANGELOG.md │ │ │ │ ├── LICENSE.md │ │ │ │ └── dialogs │ │ │ │ │ └── toolbar.css │ │ │ └── liststyle │ │ │ │ └── dialogs │ │ │ │ └── liststyle.js │ │ │ ├── samples │ │ │ ├── img │ │ │ │ ├── logo.png │ │ │ │ ├── header-bg.png │ │ │ │ ├── github-top.png │ │ │ │ ├── navigation-tip.png │ │ │ │ └── header-separator.png │ │ │ ├── old │ │ │ │ ├── assets │ │ │ │ │ ├── sample.jpg │ │ │ │ │ ├── inlineall │ │ │ │ │ │ └── logo.png │ │ │ │ │ ├── uilanguages │ │ │ │ │ │ └── languages.js │ │ │ │ │ └── posteddata.php │ │ │ │ ├── htmlwriter │ │ │ │ │ └── assets │ │ │ │ │ │ └── outputforflash │ │ │ │ │ │ ├── outputforflash.fla │ │ │ │ │ │ └── outputforflash.swf │ │ │ │ ├── sample_posteddata.php │ │ │ │ ├── dialog │ │ │ │ │ └── assets │ │ │ │ │ │ └── my_dialog.js │ │ │ │ ├── sample.js │ │ │ │ ├── appendto.html │ │ │ │ ├── tabindex.html │ │ │ │ ├── uicolor.html │ │ │ │ └── ajax.html │ │ │ ├── toolbarconfigurator │ │ │ │ ├── font │ │ │ │ │ ├── fontello.eot │ │ │ │ │ ├── fontello.ttf │ │ │ │ │ ├── fontello.woff │ │ │ │ │ ├── LICENSE.txt │ │ │ │ │ ├── config.json │ │ │ │ │ └── fontello.svg │ │ │ │ ├── lib │ │ │ │ │ └── codemirror │ │ │ │ │ │ ├── show-hint.css │ │ │ │ │ │ ├── neo.css │ │ │ │ │ │ └── LICENSE │ │ │ │ └── css │ │ │ │ │ └── fontello.css │ │ │ └── js │ │ │ │ └── sample.js │ │ │ ├── skins │ │ │ └── moono │ │ │ │ ├── icons.png │ │ │ │ ├── icons_hidpi.png │ │ │ │ ├── images │ │ │ │ ├── arrow.png │ │ │ │ ├── close.png │ │ │ │ ├── lock.png │ │ │ │ ├── refresh.png │ │ │ │ ├── spinner.gif │ │ │ │ ├── hidpi │ │ │ │ │ ├── lock.png │ │ │ │ │ ├── close.png │ │ │ │ │ ├── lock-open.png │ │ │ │ │ └── refresh.png │ │ │ │ └── lock-open.png │ │ │ │ └── readme.md │ │ │ ├── config.js │ │ │ ├── README.md │ │ │ ├── contents.css │ │ │ └── adapters │ │ │ └── jquery.js │ ├── app │ │ ├── views │ │ │ ├── widget │ │ │ │ ├── checkbox.html │ │ │ │ ├── email.html │ │ │ │ ├── password.html │ │ │ │ ├── text.html │ │ │ │ ├── number.html │ │ │ │ ├── float.html │ │ │ │ ├── image.html │ │ │ │ ├── textarea.html │ │ │ │ ├── file.html │ │ │ │ ├── date.html │ │ │ │ ├── datetime.html │ │ │ │ ├── finder.pagination.html │ │ │ │ ├── pagination.html │ │ │ │ ├── selection.html │ │ │ │ └── index.html │ │ │ ├── footer.html │ │ │ ├── errors │ │ │ │ ├── 500.html │ │ │ │ └── 404.html │ │ │ ├── flash.html │ │ │ ├── header.html │ │ │ ├── index.html │ │ │ ├── view.[[.table.Name | module]] │ │ │ │ ├── detail.html │ │ │ │ ├── finder.query.html │ │ │ │ ├── create.html │ │ │ │ ├── update.html │ │ │ │ └── query.html │ │ │ ├── detail.html │ │ │ ├── debug.html │ │ │ └── auth │ │ │ │ ├── password.html │ │ │ │ └── login.html │ │ ├── controllers │ │ │ ├── base.fns.table.go │ │ │ ├── base.db.go │ │ │ ├── base.fns.option.go │ │ │ ├── base.portal.go │ │ │ ├── base.fns.token.go │ │ │ └── base.fns.upload.go │ │ ├── models │ │ │ ├── base.fns.validator.go │ │ │ ├── base.db.go │ │ │ ├── base.fns.cipher.go │ │ │ └── base.db.expression.go │ │ └── init.go │ ├── tests │ │ └── apptest.go │ ├── messages │ │ └── sample.en │ ├── conf │ │ └── routes │ └── README.md └── model │ └── m.[[.table.Name | module]].go ├── doc ├── portal.md ├── model.md └── template.md ├── main.go ├── symbol ├── db.mysql.go ├── fs.go ├── tag.go └── template.go ├── License.txt ├── README.md ├── commands └── commands.go └── README.en.md /.gitattributes: -------------------------------------------------------------------------------- 1 | templates/portal/* linguist-vendored 2 | -------------------------------------------------------------------------------- /templates/portal/.gitignore: -------------------------------------------------------------------------------- 1 | test-results/ 2 | tmp/ 3 | routes/ 4 | -------------------------------------------------------------------------------- /templates/portal/public/js/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/js/.DS_Store -------------------------------------------------------------------------------- /templates/portal/public/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/img/favicon.png -------------------------------------------------------------------------------- /templates/portal/app/views/widget/checkbox.html: -------------------------------------------------------------------------------- 1 | {{if eq .mode "w"}}{{end}} -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/icons.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/samples/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/samples/img/logo.png -------------------------------------------------------------------------------- /templates/portal/public/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/icons_hidpi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/icons_hidpi.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/skins/moono/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/skins/moono/icons.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/samples/img/header-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/samples/img/header-bg.png -------------------------------------------------------------------------------- /templates/portal/public/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /doc/portal.md: -------------------------------------------------------------------------------- 1 | portal 表定义说明 2 | === 3 | 4 | portal 模板主要提供了一键生成管理平台的功能。故而, 相应的表定义的tag项就复杂很多。根据表和列的tag进行一一讲解。 5 | 6 | (待更新) 7 | 8 | ### 表注释 tag详解 9 | 10 | ### 列注释 tag详解 -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/samples/img/github-top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/samples/img/github-top.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/skins/moono/icons_hidpi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/skins/moono/icons_hidpi.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/skins/moono/images/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/skins/moono/images/arrow.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/skins/moono/images/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/skins/moono/images/close.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/skins/moono/images/lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/skins/moono/images/lock.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/link/images/anchor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/link/images/anchor.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/kiss.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/kiss.gif -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/kiss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/kiss.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/samples/img/navigation-tip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/samples/img/navigation-tip.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/samples/old/assets/sample.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/samples/old/assets/sample.jpg -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/skins/moono/images/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/skins/moono/images/refresh.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/skins/moono/images/spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/skins/moono/images/spinner.gif -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/image/images/noimage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/image/images/noimage.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/magicline/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/magicline/images/icon.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/heart.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/heart.gif -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/heart.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/samples/img/header-separator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/samples/img/header-separator.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/skins/moono/images/hidpi/lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/skins/moono/images/hidpi/lock.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/skins/moono/images/lock-open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/skins/moono/images/lock-open.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/cry_smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/cry_smile.gif -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/cry_smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/cry_smile.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/envelope.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/envelope.gif -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/envelope.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/envelope.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/lightbulb.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/lightbulb.gif -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/lightbulb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/lightbulb.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/omg_smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/omg_smile.gif -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/omg_smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/omg_smile.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/sad_smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/sad_smile.gif -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/sad_smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/sad_smile.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/thumbs_up.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/thumbs_up.gif -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/thumbs_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/thumbs_up.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/skins/moono/images/hidpi/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/skins/moono/images/hidpi/close.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/flash/images/placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/flash/images/placeholder.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/forms/images/hiddenfield.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/forms/images/hiddenfield.gif -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/iframe/images/placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/iframe/images/placeholder.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/link/images/hidpi/anchor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/link/images/hidpi/anchor.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/magicline/images/icon-rtl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/magicline/images/icon-rtl.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/pagebreak/images/pagebreak.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/pagebreak/images/pagebreak.gif -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/showblocks/images/block_h1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/showblocks/images/block_h1.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/showblocks/images/block_h2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/showblocks/images/block_h2.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/showblocks/images/block_h3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/showblocks/images/block_h3.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/showblocks/images/block_h4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/showblocks/images/block_h4.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/showblocks/images/block_h5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/showblocks/images/block_h5.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/showblocks/images/block_h6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/showblocks/images/block_h6.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/showblocks/images/block_p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/showblocks/images/block_p.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/angel_smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/angel_smile.gif -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/angel_smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/angel_smile.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/angry_smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/angry_smile.gif -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/angry_smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/angry_smile.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/broken_heart.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/broken_heart.gif -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/broken_heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/broken_heart.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/devil_smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/devil_smile.gif -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/devil_smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/devil_smile.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/shades_smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/shades_smile.gif -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/shades_smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/shades_smile.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/teeth_smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/teeth_smile.gif -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/teeth_smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/teeth_smile.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/thumbs_down.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/thumbs_down.gif -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/thumbs_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/thumbs_down.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/tongue_smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/tongue_smile.gif -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/tongue_smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/tongue_smile.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/tounge_smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/tounge_smile.gif -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/wink_smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/wink_smile.gif -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/wink_smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/wink_smile.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/samples/old/assets/inlineall/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/samples/old/assets/inlineall/logo.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/skins/moono/images/hidpi/lock-open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/skins/moono/images/hidpi/lock-open.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/skins/moono/images/hidpi/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/skins/moono/images/hidpi/refresh.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/about/dialogs/logo_ckeditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/about/dialogs/logo_ckeditor.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/magicline/images/hidpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/magicline/images/hidpi/icon.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/showblocks/images/block_div.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/showblocks/images/block_div.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/showblocks/images/block_pre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/showblocks/images/block_pre.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/confused_smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/confused_smile.gif -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/confused_smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/confused_smile.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/regular_smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/regular_smile.gif -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/regular_smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/regular_smile.png -------------------------------------------------------------------------------- /templates/portal/app/views/widget/email.html: -------------------------------------------------------------------------------- 1 | {{if eq .mode "r"}}{{.value}}{{end}} 2 | {{if eq .mode "w"}} 3 | 4 | {{end}} 5 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/magicline/images/hidpi/icon-rtl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/magicline/images/hidpi/icon-rtl.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/showblocks/images/block_address.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/showblocks/images/block_address.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/embaressed_smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/embaressed_smile.gif -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/embarrassed_smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/embarrassed_smile.gif -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/embarrassed_smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/embarrassed_smile.png -------------------------------------------------------------------------------- /templates/portal/app/views/widget/password.html: -------------------------------------------------------------------------------- 1 | {{if eq .mode "r"}}{{.value}}{{end}} 2 | {{if eq .mode "w"}} 3 | 4 | {{end}} 5 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/samples/toolbarconfigurator/font/fontello.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/samples/toolbarconfigurator/font/fontello.eot -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/samples/toolbarconfigurator/font/fontello.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/samples/toolbarconfigurator/font/fontello.ttf -------------------------------------------------------------------------------- /templates/portal/app/views/widget/text.html: -------------------------------------------------------------------------------- 1 | {{if eq .mode "r"}}{{.value | secure_escape}}{{end}} 2 | {{if eq .mode "w"}} 3 | 4 | {{end}} 5 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/showblocks/images/block_blockquote.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/showblocks/images/block_blockquote.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/templates/templates/images/template1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/templates/templates/images/template1.gif -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/templates/templates/images/template2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/templates/templates/images/template2.gif -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/templates/templates/images/template3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/templates/templates/images/template3.gif -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/samples/toolbarconfigurator/font/fontello.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/samples/toolbarconfigurator/font/fontello.woff -------------------------------------------------------------------------------- /templates/portal/app/views/widget/number.html: -------------------------------------------------------------------------------- 1 | {{if eq .mode "r"}}{{.value}}{{end}} 2 | {{if eq .mode "w"}} 3 | 4 | {{end}} 5 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/dialog/dialogDefinition.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.png -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/samples/old/htmlwriter/assets/outputforflash/outputforflash.fla: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/samples/old/htmlwriter/assets/outputforflash/outputforflash.fla -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/samples/old/htmlwriter/assets/outputforflash/outputforflash.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liujianping/scaffold/HEAD/templates/portal/public/ckeditor/samples/old/htmlwriter/assets/outputforflash/outputforflash.swf -------------------------------------------------------------------------------- /templates/portal/app/views/footer.html: -------------------------------------------------------------------------------- 1 | {{define "footer"}} 2 | {{range .scripts}} 3 | 4 | {{end}} 5 | 6 | 7 | 8 | {{end}} 9 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/samples/toolbarconfigurator/font/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Font license info 2 | 3 | 4 | ## Font Awesome 5 | 6 | Copyright (C) 2012 by Dave Gandy 7 | 8 | Author: Dave Gandy 9 | License: SIL () 10 | Homepage: http://fortawesome.github.com/Font-Awesome/ 11 | -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "log" 5 | "os" 6 | 7 | "github.com/liujianping/scaffold/commands" 8 | ) 9 | 10 | func main() { 11 | defer func() { 12 | if r := recover(); r != nil { 13 | log.Println(os.Args[0], " ", r) 14 | } 15 | }() 16 | 17 | commands.App().Run(os.Args) 18 | } 19 | -------------------------------------------------------------------------------- /templates/portal/app/controllers/base.fns.table.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import ( 4 | "[[.project]]/app/models" 5 | "github.com/revel/revel" 6 | ) 7 | 8 | func GetTableObject(table string, id int64) interface{} { 9 | return models.TableObject(db, table, id) 10 | } 11 | 12 | func init() { 13 | revel.TemplateFuncs["table_object"] = GetTableObject 14 | } 15 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/preview/preview.html: -------------------------------------------------------------------------------- 1 | 14 | -------------------------------------------------------------------------------- /templates/portal/app/views/errors/500.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Application error 5 | 6 | 7 | {{if eq .RunMode "dev"}} 8 | {{template "errors/500-dev.html" .}} 9 | {{else}} 10 |

Oops, an error occured

11 |

12 | This exception has been logged. 13 |

14 | {{end}} 15 | 16 | 17 | -------------------------------------------------------------------------------- /templates/portal/app/views/widget/float.html: -------------------------------------------------------------------------------- 1 | {{if eq .mode "r"}}{{.value}}{{end}} 2 | {{if eq .mode "w"}} 3 | {{if ne (index .options 0) ""}} 4 | 5 | {{else}} 6 | 7 | {{end}} 8 | {{end}} -------------------------------------------------------------------------------- /templates/portal/app/views/errors/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Not found 5 | 6 | 7 | {{if eq .RunMode "dev"}} 8 | {{template "errors/404-dev.html" .}} 9 | {{else}} 10 | {{with .Error}} 11 |

12 | {{.Title}} 13 |

14 |

15 | {{.Description}} 16 |

17 | {{end}} 18 | {{end}} 19 | 20 | 21 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. 3 | * For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | 6 | CKEDITOR.editorConfig = function( config ) { 7 | // Define changes to default configuration here. For example: 8 | config.language = 'zh-cn'; 9 | // config.uiColor = '#AADC6E'; 10 | }; 11 | -------------------------------------------------------------------------------- /templates/portal/app/views/flash.html: -------------------------------------------------------------------------------- 1 | {{if .flash.success}} 2 |
3 | {{.flash.success}} 4 |
5 | {{end}} 6 | 7 | {{if or .errors .flash.error}} 8 |
9 | {{if .flash.error}} 10 | {{.flash.error}} 11 | {{end}} 12 | 17 |
18 | {{end}} 19 | -------------------------------------------------------------------------------- /templates/portal/app/views/widget/image.html: -------------------------------------------------------------------------------- 1 | {{if eq .mode "r"}}{{end}} 2 | {{if eq .mode "w"}} 3 |
4 | 5 | 6 | {{if and .value (ne .value "")}} 7 | 8 | {{end}} 9 |
10 | {{end}} 11 | -------------------------------------------------------------------------------- /templates/portal/app/views/widget/textarea.html: -------------------------------------------------------------------------------- 1 | {{if eq .mode "r"}}{{.value | javascript_escape | raw}}{{end}} 2 | {{if eq .mode "w"}} 3 | 4 | 7 | 10 | {{end}} -------------------------------------------------------------------------------- /templates/portal/app/views/widget/file.html: -------------------------------------------------------------------------------- 1 | {{if eq .mode "r"}}{{.value}}{{end}} 2 | {{if eq .mode "w"}} 3 |
4 | 5 | 6 | {{if and .value (ne .value "")}} 7 | {{.value}} 8 | {{end}} 9 |
10 | {{end}} 11 | -------------------------------------------------------------------------------- /templates/model/m.[[.table.Name | module]].go: -------------------------------------------------------------------------------- 1 | package model 2 | [[set . "t_class" (.table.Name | singular | camel)]] 3 | import ( 4 | "time" 5 | ) 6 | 7 | //! [[.table.Tag "caption"]] 8 | type [[.t_class]] struct { 9 | [[range .table.Columns]] 10 | [[.Field | camel | lint]] [[convert "mysql" .Type (.Tag "gotype")]] `db:"[[.Field]]"`[[end]] 11 | } 12 | 13 | func (obj [[.t_class]]) TableName() string { 14 | return "[[.table.Name]]" 15 | } 16 | 17 | -------------------------------------------------------------------------------- /templates/portal/tests/apptest.go: -------------------------------------------------------------------------------- 1 | package tests 2 | 3 | import "github.com/revel/revel/testing" 4 | 5 | type AppTest struct { 6 | testing.TestSuite 7 | } 8 | 9 | func (t *AppTest) Before() { 10 | println("Set up") 11 | } 12 | 13 | func (t *AppTest) TestThatIndexPageWorks() { 14 | t.Get("/") 15 | t.AssertOk() 16 | t.AssertContentType("text/html; charset=utf-8") 17 | } 18 | 19 | func (t *AppTest) After() { 20 | println("Tear down") 21 | } 22 | -------------------------------------------------------------------------------- /symbol/db.mysql.go: -------------------------------------------------------------------------------- 1 | package symbol 2 | 3 | import "strings" 4 | 5 | type MySQLConvert struct{} 6 | 7 | func (mysql MySQLConvert) Convert(db_type string) string { 8 | kv := strings.SplitN(strings.ToLower(db_type), "(", 2) 9 | switch kv[0] { 10 | case "int", "tinyint": 11 | return "int64" 12 | case "date", "datetime", "timestamp": 13 | return "time.Time" 14 | case "float", "decimal", "double": 15 | return "float64" 16 | default: 17 | return "string" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /templates/portal/app/views/widget/date.html: -------------------------------------------------------------------------------- 1 | {{if eq .mode "r"}} 2 | {{.value | datetime}} 3 | {{else}} 4 |
5 | 6 |
7 | 13 | {{end}} -------------------------------------------------------------------------------- /templates/portal/messages/sample.en: -------------------------------------------------------------------------------- 1 | # Sample messages file for the English language (en) 2 | # Message file extensions should be ISO 639-1 codes (http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) 3 | # Sections within each message file can optionally override the defaults using ISO 3166-1 alpha-2 codes (http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) 4 | # See also: 5 | # - http://www.rfc-editor.org/rfc/bcp/bcp47.txt 6 | # - http://www.w3.org/International/questions/qa-accept-lang-locales 7 | 8 | -------------------------------------------------------------------------------- /templates/portal/app/views/widget/datetime.html: -------------------------------------------------------------------------------- 1 | {{if eq .mode "r"}} 2 | {{.value | datetime}} 3 | {{else}} 4 |
5 | 6 |
7 | 13 | {{end}} -------------------------------------------------------------------------------- /templates/portal/app/views/header.html: -------------------------------------------------------------------------------- 1 | {{define "header"}} 2 | 3 | 4 | 5 | {{.title}} 6 | 7 | 8 | 9 | {{range .styles}} 10 | 11 | {{end}} 12 | 13 | 14 | 15 | 16 | {{end}} 17 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/samples/toolbarconfigurator/font/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "", 3 | "css_prefix_text": "icon-", 4 | "css_use_suffix": false, 5 | "hinting": true, 6 | "units_per_em": 1000, 7 | "ascent": 850, 8 | "glyphs": [ 9 | { 10 | "uid": "f48ae54adfb27d8ada53d0fd9e34ee10", 11 | "css": "trash-empty", 12 | "code": 59392, 13 | "src": "fontawesome" 14 | }, 15 | { 16 | "uid": "1c4068ed75209e21af36017df8871802", 17 | "css": "down-big", 18 | "code": 59393, 19 | "src": "fontawesome" 20 | }, 21 | { 22 | "uid": "95376bf082bfec6ce06ea1cda7bd7ead", 23 | "css": "up-big", 24 | "code": 59394, 25 | "src": "fontawesome" 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /templates/portal/app/views/widget/finder.pagination.html: -------------------------------------------------------------------------------- 1 | {{if gt (len .value.pages) 1}} 2 | 25 | {{end}} -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/specialchar/dialogs/lang/_translationstatus.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. 2 | For licensing, see LICENSE.md or http://ckeditor.com/license 3 | 4 | cs.js Found: 118 Missing: 0 5 | cy.js Found: 118 Missing: 0 6 | de.js Found: 118 Missing: 0 7 | el.js Found: 16 Missing: 102 8 | eo.js Found: 118 Missing: 0 9 | et.js Found: 31 Missing: 87 10 | fa.js Found: 24 Missing: 94 11 | fi.js Found: 23 Missing: 95 12 | fr.js Found: 118 Missing: 0 13 | hr.js Found: 23 Missing: 95 14 | it.js Found: 118 Missing: 0 15 | nb.js Found: 118 Missing: 0 16 | nl.js Found: 118 Missing: 0 17 | no.js Found: 118 Missing: 0 18 | tr.js Found: 118 Missing: 0 19 | ug.js Found: 39 Missing: 79 20 | zh-cn.js Found: 118 Missing: 0 21 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/samples/old/sample_posteddata.php: -------------------------------------------------------------------------------- 1 |
 2 | 
 3 | -------------------------------------------------------------------------------------------
 4 |   CKEditor - Posted Data
 5 | 
 6 |   We are sorry, but your Web server does not support the PHP language used in this script.
 7 | 
 8 |   Please note that CKEditor can be used with any other server-side language than just PHP.
 9 |   To save the content created with CKEditor you need to read the POST data on the server
10 |   side and write it to a file or the database.
11 | 
12 |   Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
13 |   For licensing, see LICENSE.md or http://ckeditor.com/license
14 | -------------------------------------------------------------------------------------------
15 | 
16 | 
*/ include "assets/posteddata.php"; ?> 17 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/samples/toolbarconfigurator/lib/codemirror/show-hint.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-hints { 2 | position: absolute; 3 | z-index: 10; 4 | overflow: hidden; 5 | list-style: none; 6 | 7 | margin: 0; 8 | padding: 2px; 9 | 10 | -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2); 11 | -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2); 12 | box-shadow: 2px 3px 5px rgba(0,0,0,.2); 13 | border-radius: 3px; 14 | border: 1px solid silver; 15 | 16 | background: white; 17 | font-size: 90%; 18 | font-family: monospace; 19 | 20 | max-height: 20em; 21 | overflow-y: auto; 22 | } 23 | 24 | .CodeMirror-hint { 25 | margin: 0; 26 | padding: 0 4px; 27 | border-radius: 2px; 28 | max-width: 19em; 29 | overflow: hidden; 30 | white-space: pre; 31 | color: black; 32 | cursor: pointer; 33 | } 34 | 35 | li.CodeMirror-hint-active { 36 | background: #08f; 37 | color: white; 38 | } 39 | -------------------------------------------------------------------------------- /templates/portal/app/views/widget/pagination.html: -------------------------------------------------------------------------------- 1 | {{if gt (len .value.pages) 1}} 2 | 25 | {{end}} -------------------------------------------------------------------------------- /templates/portal/app/controllers/base.db.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import ( 4 | "fmt" 5 | 6 | _ "github.com/go-sql-driver/mysql" 7 | "github.com/jinzhu/gorm" 8 | "github.com/revel/revel" 9 | 10 | "[[.project]]/app/models" 11 | ) 12 | 13 | var db *gorm.DB 14 | 15 | func InitDatabase() { 16 | driver := revel.Config.StringDefault("db.driver", "mysql") 17 | host := revel.Config.StringDefault("db.host", "127.0.0.1") 18 | port := revel.Config.IntDefault("db.port", 3306) 19 | user := revel.Config.StringDefault("db.username", "") 20 | pass := revel.Config.StringDefault("db.password", "") 21 | name := revel.Config.StringDefault("db.database", "") 22 | dsn := fmt.Sprintf("%s:%s@tcp(%s:%d)/%s?charset=utf8&parseTime=True&loc=Local&strict=true&sql_notes=false", 23 | user, pass, host, port, name) 24 | 25 | var err error 26 | if db, err = models.DB(driver, dsn); err != nil { 27 | panic(err) 28 | } 29 | 30 | db.LogMode(revel.Config.BoolDefault("db.debug", false)) 31 | } 32 | 33 | func init() { 34 | revel.OnAppStart(InitDatabase) 35 | } 36 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/a11yhelp/dialogs/lang/_translationstatus.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. 2 | For licensing, see LICENSE.md or http://ckeditor.com/license 3 | 4 | cs.js Found: 30 Missing: 0 5 | cy.js Found: 30 Missing: 0 6 | da.js Found: 12 Missing: 18 7 | de.js Found: 30 Missing: 0 8 | el.js Found: 25 Missing: 5 9 | eo.js Found: 30 Missing: 0 10 | fa.js Found: 30 Missing: 0 11 | fi.js Found: 30 Missing: 0 12 | fr.js Found: 30 Missing: 0 13 | gu.js Found: 12 Missing: 18 14 | he.js Found: 30 Missing: 0 15 | it.js Found: 30 Missing: 0 16 | mk.js Found: 5 Missing: 25 17 | nb.js Found: 30 Missing: 0 18 | nl.js Found: 30 Missing: 0 19 | no.js Found: 30 Missing: 0 20 | pt-br.js Found: 30 Missing: 0 21 | ro.js Found: 6 Missing: 24 22 | tr.js Found: 30 Missing: 0 23 | ug.js Found: 27 Missing: 3 24 | vi.js Found: 6 Missing: 24 25 | zh-cn.js Found: 30 Missing: 0 26 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/samples/toolbarconfigurator/lib/codemirror/neo.css: -------------------------------------------------------------------------------- 1 | /* neo theme for codemirror */ 2 | 3 | /* Color scheme */ 4 | 5 | .cm-s-neo.CodeMirror { 6 | background-color:#ffffff; 7 | color:#2e383c; 8 | line-height:1.4375; 9 | } 10 | .cm-s-neo .cm-comment {color:#75787b} 11 | .cm-s-neo .cm-keyword, .cm-s-neo .cm-property {color:#1d75b3} 12 | .cm-s-neo .cm-atom,.cm-s-neo .cm-number {color:#75438a} 13 | .cm-s-neo .cm-node,.cm-s-neo .cm-tag {color:#9c3328} 14 | .cm-s-neo .cm-string {color:#b35e14} 15 | .cm-s-neo .cm-variable,.cm-s-neo .cm-qualifier {color:#047d65} 16 | 17 | 18 | /* Editor styling */ 19 | 20 | .cm-s-neo pre { 21 | padding:0; 22 | } 23 | 24 | .cm-s-neo .CodeMirror-gutters { 25 | border:none; 26 | border-right:10px solid transparent; 27 | background-color:transparent; 28 | } 29 | 30 | .cm-s-neo .CodeMirror-linenumber { 31 | padding:0; 32 | color:#e0e2e5; 33 | } 34 | 35 | .cm-s-neo .CodeMirror-guttermarker { color: #1d75b3; } 36 | .cm-s-neo .CodeMirror-guttermarker-subtle { color: #e0e2e5; } 37 | -------------------------------------------------------------------------------- /doc/model.md: -------------------------------------------------------------------------------- 1 | model 数据表定义 2 | === 3 | 4 | 例子: 5 | 6 | ````sql 7 | CREATE TABLE `user_accounts` ( 8 | `id` INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, 9 | `name` VARCHAR(32) NOT NULL DEFAULT '', 10 | `mailbox` VARCHAR(128) NOT NULL DEFAULT '', 11 | `sex` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0', 12 | `description` VARCHAR(256) NOT NULL DEFAULT '', 13 | `password` VARCHAR(32) NOT NULL DEFAULT '', 14 | `head_url` VARCHAR(255) NOT NULL DEFAULT '', 15 | `status` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT, 16 | `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, 17 | `updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, 18 | `deleted_at` TIMESTAMP NULL DEFAULT NULL COMMENT 'gotype:"*time.Time"' 19 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT 'caption:"会员账号"'; 20 | 21 | ```` 22 | 23 | 主要提供了两个tag功能: 24 | 25 | - 可选: 给表加一个 caption 的comment注释, 这样生成代码时会出现相遇的注释信息。 26 | 27 | - 可选: 给字段加一个 gotype 的comment注释, 这样生成该字段类型时, 就会使用自定的 gotype 做为生成的字段类型。 28 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/wsc/README.md: -------------------------------------------------------------------------------- 1 | CKEditor WebSpellChecker Plugin 2 | =============================== 3 | 4 | This plugin brings Web Spell Checker (WSC) into CKEditor. 5 | 6 | WSC is "installation-less", using the web-services of [WebSpellChecker.net](http://www.webspellchecker.net/). It's an out of the box solution. 7 | 8 | Installation 9 | ------------ 10 | 11 | 1. Clone/copy this repository contents in a new "plugins/wsc" folder in your CKEditor installation. 12 | 2. Enable the "wsc" plugin in the CKEditor configuration file (config.js): 13 | 14 | config.extraPlugins = 'wsc'; 15 | 16 | That's all. WSC will appear on the editor toolbar and will be ready to use. 17 | 18 | License 19 | ------- 20 | 21 | Licensed under the terms of any of the following licenses at your choice: [GPL](http://www.gnu.org/licenses/gpl.html), [LGPL](http://www.gnu.org/licenses/lgpl.html) and [MPL](http://www.mozilla.org/MPL/MPL-1.1.html). 22 | 23 | See LICENSE.md for more information. 24 | 25 | Developed in cooperation with [WebSpellChecker.net](http://www.webspellchecker.net/). 26 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/scayt/README.md: -------------------------------------------------------------------------------- 1 | CKEditor SCAYT Plugin 2 | ===================== 3 | 4 | This plugin brings Spell Check As You Type (SCAYT) into up to CKEditor 4+. 5 | 6 | SCAYT is a "installation-less", using the web-services of [WebSpellChecker.net](http://www.webspellchecker.net/). It's an out of the box solution. 7 | 8 | Installation 9 | ------------ 10 | 11 | 1. Clone/copy this repository contents in a new "plugins/scayt" folder in your CKEditor installation. 12 | 2. Enable the "scayt" plugin in the CKEditor configuration file (config.js): 13 | 14 | config.extraPlugins = 'scayt'; 15 | 16 | That's all. SCAYT will appear on the editor toolbar and will be ready to use. 17 | 18 | License 19 | ------- 20 | 21 | Licensed under the terms of any of the following licenses at your choice: [GPL](http://www.gnu.org/licenses/gpl.html), [LGPL](http://www.gnu.org/licenses/lgpl.html) and [MPL](http://www.mozilla.org/MPL/MPL-1.1.html). 22 | 23 | See LICENSE.md for more information. 24 | 25 | Developed in cooperation with [WebSpellChecker.net](http://www.webspellchecker.net/). 26 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/samples/old/dialog/assets/my_dialog.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. 3 | * For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | 6 | CKEDITOR.dialog.add( 'myDialog', function() { 7 | return { 8 | title: 'My Dialog', 9 | minWidth: 400, 10 | minHeight: 200, 11 | contents: [ 12 | { 13 | id: 'tab1', 14 | label: 'First Tab', 15 | title: 'First Tab', 16 | elements: [ 17 | { 18 | id: 'input1', 19 | type: 'text', 20 | label: 'Text Field' 21 | }, 22 | { 23 | id: 'select1', 24 | type: 'select', 25 | label: 'Select Field', 26 | items: [ 27 | [ 'option1', 'value1' ], 28 | [ 'option2', 'value2' ] 29 | ] 30 | } 31 | ] 32 | }, 33 | { 34 | id: 'tab2', 35 | label: 'Second Tab', 36 | title: 'Second Tab', 37 | elements: [ 38 | { 39 | id: 'button1', 40 | type: 'button', 41 | label: 'Button Field' 42 | } 43 | ] 44 | } 45 | ] 46 | }; 47 | } ); 48 | 49 | -------------------------------------------------------------------------------- /License.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Schubert Anselme 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /templates/portal/app/views/index.html: -------------------------------------------------------------------------------- 1 | {{set . "title" "index"}} 2 | {{template "header" .}} 3 |
4 | 7 |
8 |
账号登录
9 |
10 |
欢迎您, {{.account.Name}}({{.account.Mailbox}})
11 | 修改密码 12 | 登出 13 |
14 |
15 | 22 |
23 | 24 | index 25 | 26 | [[range .tables]][[if eq (.Tag "index") "y"]] 27 | {{[[.Name | singular | camel]]Count}}[[.Tag "caption"]] 28 | [[end]][[end]] 29 |
30 |
31 | {{template "footer" .}} 32 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/samples/toolbarconfigurator/lib/codemirror/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2014 by Marijn Haverbeke and others 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /templates/portal/app/controllers/base.fns.option.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import ( 4 | "strings" 5 | 6 | "[[.project]]/app/models" 7 | "github.com/revel/revel" 8 | ) 9 | 10 | var selections = map[string]interface{}{} 11 | 12 | func GetSelection(code string) []models.SystemOption { 13 | if items, ok := selections[code]; ok { 14 | return items.([]models.SystemOption) 15 | } 16 | 17 | query := models.SystemOptionQuery{Code: code} 18 | sort := models.SystemOptionSort{2} 19 | page := models.SystemOptionPage{0, 0} 20 | _, items, _ := models.DefaultSystemOption.Search(db, 21 | query, sort, page) 22 | 23 | selections[code] = items 24 | return items 25 | } 26 | 27 | func GetOptionValue(code, option_code string) int64 { 28 | opts := GetSelection(code) 29 | for _, opt := range opts { 30 | if strings.ToLower(opt.OptionCode) == strings.ToLower(option_code) { 31 | return opt.OptionValue 32 | } 33 | } 34 | return 0 35 | } 36 | 37 | func GetOptionName(code string, option_value int64) string { 38 | opts := GetSelection(code) 39 | for _, opt := range opts { 40 | if opt.OptionValue == option_value { 41 | return opt.OptionName 42 | } 43 | } 44 | return "none" 45 | } 46 | 47 | func init() { 48 | revel.TemplateFuncs["selection"] = GetSelection 49 | revel.TemplateFuncs["option"] = GetOptionValue 50 | revel.TemplateFuncs["option_name"] = GetOptionName 51 | } 52 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/samples/old/assets/uilanguages/languages.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | var CKEDITOR_LANGS=function(){var c={af:"Afrikaans",ar:"Arabic",bg:"Bulgarian",bn:"Bengali/Bangla",bs:"Bosnian",ca:"Catalan",cs:"Czech",cy:"Welsh",da:"Danish",de:"German",el:"Greek",en:"English","en-au":"English (Australia)","en-ca":"English (Canadian)","en-gb":"English (United Kingdom)",eo:"Esperanto",es:"Spanish",et:"Estonian",eu:"Basque",fa:"Persian",fi:"Finnish",fo:"Faroese",fr:"French","fr-ca":"French (Canada)",gl:"Galician",gu:"Gujarati",he:"Hebrew",hi:"Hindi",hr:"Croatian",hu:"Hungarian",id:"Indonesian", 6 | is:"Icelandic",it:"Italian",ja:"Japanese",ka:"Georgian",km:"Khmer",ko:"Korean",ku:"Kurdish",lt:"Lithuanian",lv:"Latvian",mk:"Macedonian",mn:"Mongolian",ms:"Malay",nb:"Norwegian Bokmal",nl:"Dutch",no:"Norwegian",pl:"Polish",pt:"Portuguese (Portugal)","pt-br":"Portuguese (Brazil)",ro:"Romanian",ru:"Russian",si:"Sinhala",sk:"Slovak",sq:"Albanian",sl:"Slovenian",sr:"Serbian (Cyrillic)","sr-latn":"Serbian (Latin)",sv:"Swedish",th:"Thai",tr:"Turkish",tt:"Tatar",ug:"Uighur",uk:"Ukrainian",vi:"Vietnamese", 7 | zh:"Chinese Traditional","zh-cn":"Chinese Simplified"},b=[],a;for(a in CKEDITOR.lang.languages)b.push({code:a,name:c[a]||a});b.sort(function(a,b){return a.name 0 && token.Hits > token.Times { 39 | return nil, fmt.Errorf("hit times exceed.") 40 | } 41 | 42 | if token.ExpiredAt.Before(time.Now()) { 43 | return nil, fmt.Errorf("token expired.") 44 | } 45 | tx := db.Begin() 46 | if err := tx.Model(&token).Update("hits", token.Hits).Error; err != nil { 47 | tx.Rollback() 48 | return nil, err 49 | } 50 | tx.Commit() 51 | return &token, nil 52 | } 53 | -------------------------------------------------------------------------------- /templates/portal/app/views/view.[[.table.Name | module]]/detail.html: -------------------------------------------------------------------------------- 1 | [[set . "t_module" (.table.Name | module)]] 2 | 3 | {{set . "title" "[[.t_module]].detail"}} 4 | {{template "header" .}} 5 | 6 |
7 | 12 |
13 |
14 | 15 |
16 | [[.t_module]].detail 17 |
18 | {{with .obj}} 19 |
20 | [[range .table.Columns]] 21 | [[if ne (.Tag "ignore") "y"]] 22 |
[[.Tag "caption"]]
23 |
24 | {{widget "[[.Tag "widget"]]" "r" "detail.[[.Field]]" .[[.Field | camel | lint]] [[if ne (.Tag "relation") ""]] "[[.Tag "relation"]]"[[end]] [[if ne (.Tag "field") ""]] "[[.Tag "field"]]"[[end]]}} 25 |
26 | [[end]] 27 | [[end]] 28 | 29 | [[range .tables]] 30 | [[if eq (.Tag "belong") $.table.Name]] 31 |
[[.Tag "caption"]]
32 |
33 | [[if ne (.Tag "many") ""]] 34 | {{many "[[.Tag "belong"]]" "[[.Tag "many"]]" "[[.Name]]" "r" .ID .[[.Tag "many" | camel | lint]]}} 35 | [[end]] 36 |
37 | [[end]] 38 | [[end]] 39 |
40 | {{end}} 41 |
42 |
43 |
44 | 45 | {{template "footer" .}} -------------------------------------------------------------------------------- /templates/portal/app/views/detail.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{set . "title" "option.detail"}} 4 | {{template "header" .}} 5 | 6 |
7 | 12 |
13 |
14 | 15 |
16 | option.detail 17 |
18 | {{with .obj}} 19 |
20 | 21 |
编号
22 |
23 | {{widget "" "id" .ID "r" ""}} 24 |
25 | 26 |
名称
27 |
28 | {{widget "text" "name" .Name "r" ""}} 29 |
30 | 31 |
代码
32 |
33 | {{widget "text" "code" .Code "r" ""}} 34 |
35 | 36 |
选项名称
37 |
38 | {{widget "text" "option_name" .OptionName "r" ""}} 39 |
40 | 41 |
选项代码
42 |
43 | {{widget "text" "option_code" .OptionCode "r" ""}} 44 |
45 | 46 |
选项值
47 |
48 | {{widget "number" "option_value" .OptionValue "r" ""}} 49 |
50 | 51 |
描述
52 |
53 | {{widget "text" "description" .Description "r" ""}} 54 |
55 | 56 |
57 | {{end}} 58 |
59 |
60 |
61 | 62 | {{template "footer" .}} -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/README.md: -------------------------------------------------------------------------------- 1 | CKEditor 4 2 | ========== 3 | 4 | Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. 5 | http://ckeditor.com - See LICENSE.md for license information. 6 | 7 | CKEditor is a text editor to be used inside web pages. It's not a replacement 8 | for desktop text editors like Word or OpenOffice, but a component to be used as 9 | part of web applications and websites. 10 | 11 | ## Documentation 12 | 13 | The full editor documentation is available online at the following address: 14 | http://docs.ckeditor.com 15 | 16 | ## Installation 17 | 18 | Installing CKEditor is an easy task. Just follow these simple steps: 19 | 20 | 1. **Download** the latest version from the CKEditor website: 21 | http://ckeditor.com. You should have already completed this step, but be 22 | sure you have the very latest version. 23 | 2. **Extract** (decompress) the downloaded file into the root of your website. 24 | 25 | **Note:** CKEditor is by default installed in the `ckeditor` folder. You can 26 | place the files in whichever you want though. 27 | 28 | ## Checking Your Installation 29 | 30 | The editor comes with a few sample pages that can be used to verify that 31 | installation proceeded properly. Take a look at the `samples` directory. 32 | 33 | To test your installation, just call the following page at your website: 34 | 35 | http:////samples/index.html 36 | 37 | For example: 38 | 39 | http://www.example.com/ckeditor/samples/index.html 40 | -------------------------------------------------------------------------------- /templates/portal/app/views/debug.html: -------------------------------------------------------------------------------- 1 | 20 | 44 | 45 | 46 | 65 | -------------------------------------------------------------------------------- /templates/portal/app/models/base.fns.validator.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "reflect" 5 | "regexp" 6 | 7 | "github.com/revel/revel" 8 | ) 9 | 10 | var emailPattern = regexp.MustCompile("^[\\w!#$%&'*+/=?^_`{|}~-]+(?:\\.[\\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\\w](?:[\\w-]*[\\w])?\\.)+[a-zA-Z0-9](?:[\\w-]*[\\w])?$") 11 | 12 | func required() revel.Validator { 13 | return revel.Required{} 14 | } 15 | 16 | func min(size int) revel.Validator { 17 | return revel.MinSize{size} 18 | } 19 | 20 | func max(size int) revel.Validator { 21 | return revel.MaxSize{size} 22 | } 23 | 24 | func length(size int) revel.Validator { 25 | return revel.Length{size} 26 | } 27 | 28 | func email() revel.Validator { 29 | return revel.Match{emailPattern} 30 | } 31 | 32 | func match(exp string) revel.Validator { 33 | return revel.Match{regexp.MustCompile(exp)} 34 | } 35 | 36 | func IsZero(v reflect.Value) bool { 37 | valid := true 38 | switch v.Kind() { 39 | case reflect.String: 40 | valid = len(v.String()) != 0 41 | case reflect.Ptr, reflect.Interface: 42 | valid = !v.IsNil() 43 | case reflect.Slice, reflect.Map, reflect.Array: 44 | valid = v.Len() != 0 45 | case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: 46 | valid = v.Int() != 0 47 | case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: 48 | valid = v.Uint() != 0 49 | case reflect.Float32, reflect.Float64: 50 | valid = v.Float() != 0 51 | case reflect.Bool: 52 | valid = v.Bool() 53 | case reflect.Invalid: 54 | valid = false // always invalid 55 | } 56 | return !valid 57 | } 58 | -------------------------------------------------------------------------------- /templates/portal/app/models/base.db.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "reflect" 5 | 6 | "github.com/jinzhu/gorm" 7 | _ "github.com/jinzhu/gorm/dialects/mssql" 8 | _ "github.com/jinzhu/gorm/dialects/mysql" 9 | _ "github.com/jinzhu/gorm/dialects/postgres" 10 | _ "github.com/jinzhu/gorm/dialects/sqlite" 11 | ) 12 | 13 | const ( 14 | DefaultPageSize = 20 15 | DefaultMaxIdleConnections = 10 16 | DefaultMaxOpenConnections = 128 17 | ) 18 | 19 | func DB(driver, dsn string) (*gorm.DB, error) { 20 | db, err := gorm.Open(driver, dsn) 21 | if err != nil { 22 | return nil, err 23 | } 24 | 25 | db.DB().SetMaxOpenConns(DefaultMaxOpenConnections) 26 | db.DB().SetMaxIdleConns(DefaultMaxIdleConnections) 27 | return db, nil 28 | } 29 | 30 | func Columns(obj interface{}) []string { 31 | var columns []string 32 | 33 | t := reflect.TypeOf(obj) 34 | for i := 0; i < t.NumField(); i++ { 35 | field := t.Field(i) 36 | if field.Tag.Get("db") != "" && field.Tag.Get("db") != "-" { 37 | columns = append(columns, field.Tag.Get("db")) 38 | } 39 | } 40 | return columns 41 | } 42 | 43 | func TableObject(db *gorm.DB, table string, id int64) interface{} { 44 | switch table { 45 | [[range .tables]] 46 | case "[[.Name]]": 47 | var obj [[.Name | class]] 48 | if err := db.Find(&obj, id).Error; err != nil { 49 | return nil 50 | } 51 | return obj 52 | [[end]] 53 | } 54 | return nil 55 | } 56 | 57 | func DefaultTableObject(table string) interface{} { 58 | switch table { 59 | [[range .tables]] 60 | case "[[.Name]]": 61 | return Default[[.Name | class]] 62 | [[end]] 63 | } 64 | return nil 65 | } 66 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/wsc/LICENSE.md: -------------------------------------------------------------------------------- 1 | Software License Agreement 2 | ========================== 3 | 4 | **CKEditor WSC Plugin** 5 | Copyright © 2012, [CKSource](http://cksource.com) - Frederico Knabben. All rights reserved. 6 | 7 | Licensed under the terms of any of the following licenses at your choice: 8 | 9 | * GNU General Public License Version 2 or later (the "GPL"): 10 | http://www.gnu.org/licenses/gpl.html 11 | 12 | * GNU Lesser General Public License Version 2.1 or later (the "LGPL"): 13 | http://www.gnu.org/licenses/lgpl.html 14 | 15 | * Mozilla Public License Version 1.1 or later (the "MPL"): 16 | http://www.mozilla.org/MPL/MPL-1.1.html 17 | 18 | You are not required to, but if you want to explicitly declare the license you have chosen to be bound to when using, reproducing, modifying and distributing this software, just include a text file titled "legal.txt" in your version of this software, indicating your license choice. 19 | 20 | Sources of Intellectual Property Included in this plugin 21 | -------------------------------------------------------- 22 | 23 | Where not otherwise indicated, all plugin content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, the plugin will incorporate work done by developers outside of CKSource with their express permission. 24 | 25 | Trademarks 26 | ---------- 27 | 28 | CKEditor is a trademark of CKSource - Frederico Knabben. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders. 29 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/scayt/LICENSE.md: -------------------------------------------------------------------------------- 1 | Software License Agreement 2 | ========================== 3 | 4 | **CKEditor SCAYT Plugin** 5 | Copyright © 2012, [CKSource](http://cksource.com) - Frederico Knabben. All rights reserved. 6 | 7 | Licensed under the terms of any of the following licenses at your choice: 8 | 9 | * GNU General Public License Version 2 or later (the "GPL"): 10 | http://www.gnu.org/licenses/gpl.html 11 | 12 | * GNU Lesser General Public License Version 2.1 or later (the "LGPL"): 13 | http://www.gnu.org/licenses/lgpl.html 14 | 15 | * Mozilla Public License Version 1.1 or later (the "MPL"): 16 | http://www.mozilla.org/MPL/MPL-1.1.html 17 | 18 | You are not required to, but if you want to explicitly declare the license you have chosen to be bound to when using, reproducing, modifying and distributing this software, just include a text file titled "legal.txt" in your version of this software, indicating your license choice. 19 | 20 | Sources of Intellectual Property Included in this plugin 21 | -------------------------------------------------------- 22 | 23 | Where not otherwise indicated, all plugin content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, the plugin will incorporate work done by developers outside of CKSource with their express permission. 24 | 25 | Trademarks 26 | ---------- 27 | 28 | CKEditor is a trademark of CKSource - Frederico Knabben. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders. 29 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/wsc/dialogs/wsc.css: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | 6 | html, body 7 | { 8 | background-color: transparent; 9 | margin: 0px; 10 | padding: 0px; 11 | } 12 | 13 | body 14 | { 15 | padding: 10px; 16 | } 17 | 18 | body, td, input, select, textarea 19 | { 20 | font-size: 11px; 21 | font-family: 'Microsoft Sans Serif' , Arial, Helvetica, Verdana; 22 | } 23 | 24 | .midtext 25 | { 26 | padding:0px; 27 | margin:10px; 28 | } 29 | 30 | .midtext p 31 | { 32 | padding:0px; 33 | margin:10px; 34 | } 35 | 36 | .Button 37 | { 38 | border: #737357 1px solid; 39 | color: #3b3b1f; 40 | background-color: #c7c78f; 41 | } 42 | 43 | .PopupTabArea 44 | { 45 | color: #737357; 46 | background-color: #e3e3c7; 47 | } 48 | 49 | .PopupTitleBorder 50 | { 51 | border-bottom: #d5d59d 1px solid; 52 | } 53 | .PopupTabEmptyArea 54 | { 55 | padding-left: 10px; 56 | border-bottom: #d5d59d 1px solid; 57 | } 58 | 59 | .PopupTab, .PopupTabSelected 60 | { 61 | border-right: #d5d59d 1px solid; 62 | border-top: #d5d59d 1px solid; 63 | border-left: #d5d59d 1px solid; 64 | padding: 3px 5px 3px 5px; 65 | color: #737357; 66 | } 67 | 68 | .PopupTab 69 | { 70 | margin-top: 1px; 71 | border-bottom: #d5d59d 1px solid; 72 | cursor: pointer; 73 | } 74 | 75 | .PopupTabSelected 76 | { 77 | font-weight: bold; 78 | cursor: default; 79 | padding-top: 4px; 80 | border-bottom: #f1f1e3 1px solid; 81 | background-color: #f1f1e3; 82 | } 83 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/link/dialogs/anchor.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.dialog.add("anchor",function(c){function d(a,b){return a.createFakeElement(a.document.createElement("a",{attributes:b}),"cke_anchor","anchor")}return{title:c.lang.link.anchor.title,minWidth:300,minHeight:60,onOk:function(){var a=CKEDITOR.tools.trim(this.getValueOf("info","txtName")),a={id:a,name:a,"data-cke-saved-name":a};if(this._.selectedElement)this._.selectedElement.data("cke-realelement")?(a=d(c,a),a.replace(this._.selectedElement),CKEDITOR.env.ie&&c.getSelection().selectElement(a)): 6 | this._.selectedElement.setAttributes(a);else{var b=c.getSelection(),b=b&&b.getRanges()[0];b.collapsed?(a=d(c,a),b.insertNode(a)):(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(a["class"]="cke_anchor"),a=new CKEDITOR.style({element:"a",attributes:a}),a.type=CKEDITOR.STYLE_INLINE,c.applyStyle(a))}},onHide:function(){delete this._.selectedElement},onShow:function(){var a=c.getSelection(),b=a.getSelectedElement(),d=b&&b.data("cke-realelement"),e=d?CKEDITOR.plugins.link.tryRestoreFakeAnchor(c,b):CKEDITOR.plugins.link.getSelectedLink(c); 7 | if(e){this._.selectedElement=e;var f=e.data("cke-saved-name");this.setValueOf("info","txtName",f||"");!d&&a.selectElement(e);b&&(this._.selectedElement=b)}this.getContentElement("info","txtName").focus()},contents:[{id:"info",label:c.lang.link.anchor.title,accessKey:"I",elements:[{type:"text",id:"txtName",label:c.lang.link.anchor.name,required:!0,validate:function(){return this.getValue()?!0:(alert(c.lang.link.anchor.errorName),!1)}}]}]}}); -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/scayt/dialogs/toolbar.css: -------------------------------------------------------------------------------- 1 | a 2 | { 3 | text-decoration:none; 4 | padding: 2px 4px 4px 6px; 5 | display : block; 6 | border-width: 1px; 7 | border-style: solid; 8 | margin : 0px; 9 | } 10 | 11 | a.cke_scayt_toogle:hover, 12 | a.cke_scayt_toogle:focus, 13 | a.cke_scayt_toogle:active 14 | { 15 | border-color: #316ac5; 16 | background-color: #dff1ff; 17 | color : #000; 18 | cursor: pointer; 19 | margin : 0px; 20 | } 21 | a.cke_scayt_toogle { 22 | color : #316ac5; 23 | border-color: #fff; 24 | } 25 | .scayt_enabled a.cke_scayt_item { 26 | color : #316ac5; 27 | border-color: #fff; 28 | margin : 0px; 29 | } 30 | .scayt_disabled a.cke_scayt_item { 31 | color : gray; 32 | border-color : #fff; 33 | } 34 | .scayt_enabled a.cke_scayt_item:hover, 35 | .scayt_enabled a.cke_scayt_item:focus, 36 | .scayt_enabled a.cke_scayt_item:active 37 | { 38 | border-color: #316ac5; 39 | background-color: #dff1ff; 40 | color : #000; 41 | cursor: pointer; 42 | } 43 | .scayt_disabled a.cke_scayt_item:hover, 44 | .scayt_disabled a.cke_scayt_item:focus, 45 | .scayt_disabled a.cke_scayt_item:active 46 | { 47 | border-color: gray; 48 | background-color: #dff1ff; 49 | color : gray; 50 | cursor: no-drop; 51 | } 52 | .cke_scayt_set_on, .cke_scayt_set_off 53 | { 54 | display: none; 55 | } 56 | .scayt_enabled .cke_scayt_set_on 57 | { 58 | display: none; 59 | } 60 | .scayt_disabled .cke_scayt_set_on 61 | { 62 | display: inline; 63 | } 64 | .scayt_disabled .cke_scayt_set_off 65 | { 66 | display: none; 67 | } 68 | .scayt_enabled .cke_scayt_set_off 69 | { 70 | display: inline; 71 | } 72 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/forms/dialogs/hiddenfield.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.dialog.add("hiddenfield",function(d){return{title:d.lang.forms.hidden.title,hiddenField:null,minWidth:350,minHeight:110,onShow:function(){delete this.hiddenField;var a=this.getParentEditor(),b=a.getSelection(),c=b.getSelectedElement();c&&c.data("cke-real-element-type")&&"hiddenfield"==c.data("cke-real-element-type")&&(this.hiddenField=c,c=a.restoreRealElement(this.hiddenField),this.setupContent(c),b.selectElement(this.hiddenField))},onOk:function(){var a=this.getValueOf("info","_cke_saved_name"), 6 | b=this.getParentEditor(),a=CKEDITOR.env.ie&&8>CKEDITOR.document.$.documentMode?b.document.createElement('\x3cinput name\x3d"'+CKEDITOR.tools.htmlEncode(a)+'"\x3e'):b.document.createElement("input");a.setAttribute("type","hidden");this.commitContent(a);a=b.createFakeElement(a,"cke_hidden","hiddenfield");this.hiddenField?(a.replace(this.hiddenField),b.getSelection().selectElement(a)):b.insertElement(a);return!0},contents:[{id:"info",label:d.lang.forms.hidden.title,title:d.lang.forms.hidden.title,elements:[{id:"_cke_saved_name", 7 | type:"text",label:d.lang.forms.hidden.name,"default":"",accessKey:"N",setup:function(a){this.setValue(a.data("cke-saved-name")||a.getAttribute("name")||"")},commit:function(a){this.getValue()?a.setAttribute("name",this.getValue()):a.removeAttribute("name")}},{id:"value",type:"text",label:d.lang.forms.hidden.value,"default":"",accessKey:"V",setup:function(a){this.setValue(a.getAttribute("value")||"")},commit:function(a){this.getValue()?a.setAttribute("value",this.getValue()):a.removeAttribute("value")}}]}]}}); -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/samples/old/assets/posteddata.php: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | Sample — CKEditor 12 | 13 | 14 | 15 |

16 | CKEditor — Posted Data 17 |

18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | $value ) 31 | { 32 | if ( ( !is_string($value) && !is_numeric($value) ) || !is_string($key) ) 33 | continue; 34 | 35 | if ( get_magic_quotes_gpc() ) 36 | $value = htmlspecialchars( stripslashes((string)$value) ); 37 | else 38 | $value = htmlspecialchars( (string)$value ); 39 | ?> 40 | 41 | 42 | 43 | 44 | 48 |
Field NameValue
49 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /templates/portal/app/views/auth/password.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{set . "title" "application"}} 4 | {{template "header" .}} 5 | 6 |
7 | 11 |
12 |
13 | 14 |
15 |
16 | auth.password 17 |
18 | 19 |
20 | 21 |
22 | {{widget "password" "w" "old_password" "" ""}} 23 |
24 |
25 | {{.errors.old_password.Message}} 26 |
27 |
28 |
29 | 30 |
31 | {{widget "password" "w" "new_password" "" ""}} 32 |
33 |
34 | {{.errors.new_password.Message}} 35 |
36 |
37 |
38 | 39 |
40 | {{widget "password" "w" "new_password2" "" ""}} 41 |
42 |
43 | {{.errors.new_password2.Message}} 44 |
45 |
46 | 47 | 48 |
49 |
50 | 51 |
52 |
53 |
54 | 55 |
56 |
57 |
58 | 59 | {{template "footer" .}} 60 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/samples/toolbarconfigurator/font/fontello.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Copyright (C) 2014 by original authors @ fontello.com 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/about/dialogs/about.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.dialog.add("about",function(a){a=a.lang.about;var b=CKEDITOR.getUrl(CKEDITOR.plugins.get("about").path+"dialogs/"+(CKEDITOR.env.hidpi?"hidpi/":"")+"logo_ckeditor.png");return{title:CKEDITOR.env.ie?a.dlgTitle:a.title,minWidth:390,minHeight:230,contents:[{id:"tab1",label:"",title:"",expand:!0,padding:0,elements:[{type:"html",html:'\x3cstyle type\x3d"text/css"\x3e.cke_about_container{color:#000 !important;padding:10px 10px 0;margin-top:5px}.cke_about_container p{margin: 0 0 10px;}.cke_about_container .cke_about_logo{height:81px;background-color:#fff;background-image:url('+ 6 | b+");"+(CKEDITOR.env.hidpi?"background-size:163px 58px;":"")+'background-position:center; background-repeat:no-repeat;margin-bottom:10px;}.cke_about_container a{cursor:pointer !important;color:#00B2CE !important;text-decoration:underline !important;}\x3c/style\x3e\x3cdiv class\x3d"cke_about_container"\x3e\x3cdiv class\x3d"cke_about_logo"\x3e\x3c/div\x3e\x3cp\x3eCKEditor '+CKEDITOR.version+" (revision "+CKEDITOR.revision+')\x3cbr\x3e\x3ca target\x3d"_blank" href\x3d"http://ckeditor.com/"\x3ehttp://ckeditor.com\x3c/a\x3e\x3c/p\x3e\x3cp\x3e'+ 7 | a.help.replace("$1",'\x3ca target\x3d"_blank" href\x3d"http://docs.ckeditor.com/user"\x3e'+a.userGuide+"\x3c/a\x3e")+"\x3c/p\x3e\x3cp\x3e"+a.moreInfo+'\x3cbr\x3e\x3ca target\x3d"_blank" href\x3d"http://ckeditor.com/about/license"\x3ehttp://ckeditor.com/about/license\x3c/a\x3e\x3c/p\x3e\x3cp\x3e'+a.copy.replace("$1",'\x3ca target\x3d"_blank" href\x3d"http://cksource.com/"\x3eCKSource\x3c/a\x3e - Frederico Knabben')+"\x3c/p\x3e\x3c/div\x3e"}]}],buttons:[CKEDITOR.dialog.cancelButton]}}); -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/forms/dialogs/button.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.dialog.add("button",function(b){function d(a){var b=this.getValue();b?(a.attributes[this.id]=b,"name"==this.id&&(a.attributes["data-cke-saved-name"]=b)):(delete a.attributes[this.id],"name"==this.id&&delete a.attributes["data-cke-saved-name"])}return{title:b.lang.forms.button.title,minWidth:350,minHeight:150,onShow:function(){delete this.button;var a=this.getParentEditor().getSelection().getSelectedElement();a&&a.is("input")&&a.getAttribute("type")in{button:1,reset:1,submit:1}&&(this.button= 6 | a,this.setupContent(a))},onOk:function(){var a=this.getParentEditor(),b=this.button,d=!b,c=b?CKEDITOR.htmlParser.fragment.fromHtml(b.getOuterHtml()).children[0]:new CKEDITOR.htmlParser.element("input");this.commitContent(c);var e=new CKEDITOR.htmlParser.basicWriter;c.writeHtml(e);c=CKEDITOR.dom.element.createFromHtml(e.getHtml(),a.document);d?a.insertElement(c):(c.replace(b),a.getSelection().selectElement(c))},contents:[{id:"info",label:b.lang.forms.button.title,title:b.lang.forms.button.title,elements:[{id:"name", 7 | type:"text",bidi:!0,label:b.lang.common.name,"default":"",setup:function(a){this.setValue(a.data("cke-saved-name")||a.getAttribute("name")||"")},commit:d},{id:"value",type:"text",label:b.lang.forms.button.text,accessKey:"V","default":"",setup:function(a){this.setValue(a.getAttribute("value")||"")},commit:d},{id:"type",type:"select",label:b.lang.forms.button.type,"default":"button",accessKey:"T",items:[[b.lang.forms.button.typeBtn,"button"],[b.lang.forms.button.typeSbm,"submit"],[b.lang.forms.button.typeRst, 8 | "reset"]],setup:function(a){this.setValue(a.getAttribute("type")||"")},commit:d}]}]}}); -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/samples/js/sample.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. 3 | * For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | 6 | /* exported initSample */ 7 | 8 | if ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 ) 9 | CKEDITOR.tools.enableHtml5Elements( document ); 10 | 11 | // The trick to keep the editor in the sample quite small 12 | // unless user specified own height. 13 | CKEDITOR.config.height = 150; 14 | CKEDITOR.config.width = 'auto'; 15 | 16 | var initSample = ( function() { 17 | var wysiwygareaAvailable = isWysiwygareaAvailable(), 18 | isBBCodeBuiltIn = !!CKEDITOR.plugins.get( 'bbcode' ); 19 | 20 | return function() { 21 | var editorElement = CKEDITOR.document.getById( 'editor' ); 22 | 23 | // :((( 24 | if ( isBBCodeBuiltIn ) { 25 | editorElement.setHtml( 26 | 'Hello world!\n\n' + 27 | 'I\'m an instance of [url=http://ckeditor.com]CKEditor[/url].' 28 | ); 29 | } 30 | 31 | // Depending on the wysiwygare plugin availability initialize classic or inline editor. 32 | if ( wysiwygareaAvailable ) { 33 | CKEDITOR.replace( 'editor' ); 34 | } else { 35 | editorElement.setAttribute( 'contenteditable', 'true' ); 36 | CKEDITOR.inline( 'editor' ); 37 | 38 | // TODO we can consider displaying some info box that 39 | // without wysiwygarea the classic editor may not work. 40 | } 41 | }; 42 | 43 | function isWysiwygareaAvailable() { 44 | // If in development mode, then the wysiwygarea must be available. 45 | // Split REV into two strings so builder does not replace it :D. 46 | if ( CKEDITOR.revision == ( '%RE' + 'V%' ) ) { 47 | return true; 48 | } 49 | 50 | return !!CKEDITOR.plugins.get( 'wysiwygarea' ); 51 | } 52 | } )(); 53 | 54 | -------------------------------------------------------------------------------- /templates/portal/app/init.go: -------------------------------------------------------------------------------- 1 | package app 2 | 3 | import "github.com/revel/revel" 4 | 5 | func init() { 6 | // Filters is the default set of global filters. 7 | revel.Filters = []revel.Filter{ 8 | revel.PanicFilter, // Recover from panics and display an error page instead. 9 | revel.RouterFilter, // Use the routing table to select the right Action 10 | revel.FilterConfiguringFilter, // A hook for adding or removing per-Action filters. 11 | revel.ParamsFilter, // Parse parameters into Controller.Params. 12 | revel.SessionFilter, // Restore and write the session cookie. 13 | revel.FlashFilter, // Restore and write the flash cookie. 14 | revel.ValidationFilter, // Restore kept validation errors and save new ones from cookie. 15 | revel.I18nFilter, // Resolve the requested language 16 | HeaderFilter, // Add some security based headers 17 | revel.InterceptorFilter, // Run interceptors around the action. 18 | revel.CompressFilter, // Compress the result. 19 | revel.ActionInvoker, // Invoke the action. 20 | } 21 | 22 | // register startup functions with OnAppStart 23 | // ( order dependent ) 24 | // revel.OnAppStart(InitDB) 25 | // revel.OnAppStart(FillCache) 26 | } 27 | 28 | // TODO turn this into revel.HeaderFilter 29 | // should probably also have a filter for CSRF 30 | // not sure if it can go in the same filter or not 31 | var HeaderFilter = func(c *revel.Controller, fc []revel.Filter) { 32 | // Add some common security headers 33 | c.Response.Out.Header().Add("X-Frame-Options", "SAMEORIGIN") 34 | c.Response.Out.Header().Add("X-XSS-Protection", "1; mode=block") 35 | c.Response.Out.Header().Add("X-Content-Type-Options", "nosniff") 36 | 37 | fc[0](c, fc[1:]) // Execute the next filter stage. 38 | } 39 | -------------------------------------------------------------------------------- /symbol/fs.go: -------------------------------------------------------------------------------- 1 | package symbol 2 | 3 | import ( 4 | "io" 5 | "log" 6 | "os" 7 | "path" 8 | ) 9 | 10 | func IsFileExist(s string) bool { 11 | if _, err := os.Stat(s); os.IsNotExist(err) { 12 | return false 13 | } 14 | 15 | return true 16 | } 17 | 18 | func CopyFile(source string, dest string, force bool) (err error) { 19 | if IsFileExist(dest) && force == false { 20 | return nil 21 | } 22 | 23 | sourcefile, err := os.Open(source) 24 | if err != nil { 25 | return err 26 | } 27 | 28 | defer sourcefile.Close() 29 | 30 | destfile, err := os.Create(dest) 31 | if err != nil { 32 | return err 33 | } 34 | 35 | defer destfile.Close() 36 | 37 | _, err = io.Copy(destfile, sourcefile) 38 | if err == nil { 39 | sourceinfo, err := os.Stat(source) 40 | if err != nil { 41 | err = os.Chmod(dest, sourceinfo.Mode()) 42 | } 43 | log.Println("copy file => ", dest) 44 | } 45 | 46 | return 47 | } 48 | 49 | func CopyDir(source string, dest string, force bool) (err error) { 50 | 51 | // get properties of source dir 52 | sourceinfo, err := os.Stat(source) 53 | if err != nil { 54 | return err 55 | } 56 | 57 | // create dest dir 58 | 59 | err = os.MkdirAll(dest, sourceinfo.Mode()) 60 | if err != nil { 61 | return err 62 | } 63 | 64 | directory, _ := os.Open(source) 65 | 66 | objects, err := directory.Readdir(-1) 67 | 68 | for _, obj := range objects { 69 | 70 | sourcefilepointer := path.Join(source, obj.Name()) 71 | 72 | destinationfilepointer := path.Join(dest, obj.Name()) 73 | 74 | if obj.IsDir() { 75 | // create sub-directories - recursively 76 | err = CopyDir(sourcefilepointer, destinationfilepointer, force) 77 | if err != nil { 78 | return err 79 | } 80 | } else { 81 | // perform copy 82 | err = CopyFile(sourcefilepointer, destinationfilepointer, force) 83 | if err != nil { 84 | return err 85 | } 86 | } 87 | 88 | } 89 | 90 | return 91 | } 92 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/samples/old/sample.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. 3 | * For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | 6 | // Tool scripts for the sample pages. 7 | // This file can be ignored and is not required to make use of CKEditor. 8 | 9 | ( function() { 10 | CKEDITOR.on( 'instanceReady', function( ev ) { 11 | // Check for sample compliance. 12 | var editor = ev.editor, 13 | meta = CKEDITOR.document.$.getElementsByName( 'ckeditor-sample-required-plugins' ), 14 | requires = meta.length ? CKEDITOR.dom.element.get( meta[ 0 ] ).getAttribute( 'content' ).split( ',' ) : [], 15 | missing = [], 16 | i; 17 | 18 | if ( requires.length ) { 19 | for ( i = 0; i < requires.length; i++ ) { 20 | if ( !editor.plugins[ requires[ i ] ] ) 21 | missing.push( '' + requires[ i ] + '' ); 22 | } 23 | 24 | if ( missing.length ) { 25 | var warn = CKEDITOR.dom.element.createFromHtml( 26 | '
' + 27 | 'To fully experience this demo, the ' + missing.join( ', ' ) + ' plugin' + ( missing.length > 1 ? 's are' : ' is' ) + ' required.' + 28 | '
' 29 | ); 30 | warn.insertBefore( editor.container ); 31 | } 32 | } 33 | 34 | // Set icons. 35 | var doc = new CKEDITOR.dom.document( document ), 36 | icons = doc.find( '.button_icon' ); 37 | 38 | for ( i = 0; i < icons.count(); i++ ) { 39 | var icon = icons.getItem( i ), 40 | name = icon.getAttribute( 'data-icon' ), 41 | style = CKEDITOR.skin.getIconStyle( name, ( CKEDITOR.lang.dir == 'rtl' ) ); 42 | 43 | icon.addClass( 'cke_button_icon' ); 44 | icon.addClass( 'cke_button__' + name + '_icon' ); 45 | icon.setAttribute( 'style', style ); 46 | icon.setStyle( 'float', 'none' ); 47 | 48 | } 49 | } ); 50 | } )(); 51 | -------------------------------------------------------------------------------- /templates/portal/app/views/auth/login.html: -------------------------------------------------------------------------------- 1 | {{set . "title" "index"}} 2 | {{template "header" .}} 3 |
4 | 8 |
9 |
10 |
11 |
12 |
13 | {{if .flash.error}} 14 |
15 | 18 | Warning! {{.flash.error}} 19 |
20 | {{end}} 21 |
22 |
账号登录
23 |
24 |
25 |
26 | 27 | 28 | {{.errors.name.Message}} 29 |
30 |
31 | 32 | 33 | {{.errors.password.Message}} 34 |
35 |
36 | 39 |
40 | 41 |
42 |
43 |
44 |
45 |
46 | 47 |
48 | {{template "footer" .}} 49 | -------------------------------------------------------------------------------- /templates/portal/app/views/widget/selection.html: -------------------------------------------------------------------------------- 1 | {{set . "flag" false}} 2 | {{if eq .mode "r"}} 3 | {{range ((index .options 0) | selection)}} 4 | {{if eq $.flag false}} 5 | {{if eq .OptionValue $.value}}{{raw .OptionName}}{{end}} 6 | {{set $ "flag" true}} 7 | {{end}} 8 | {{end}} 9 | {{end}} 10 | {{if eq .mode "w"}} 11 | 25 | {{if ge (len .options) 2}} 26 | 44 | {{end}} 45 | {{end}} -------------------------------------------------------------------------------- /templates/portal/app/views/view.[[.table.Name | module]]/finder.query.html: -------------------------------------------------------------------------------- 1 | 2 | {{if .flash.success}} 3 |
4 | 7 | Success! {{.flash.success}} 8 |
9 | {{end}} 10 | 11 | {{if .flash.error}} 12 |
13 | 16 | Warning! {{.flash.error}} 17 |
18 | {{end}} 19 | 20 | 21 |
22 |
23 | {{if not .items}} 24 |

暂无有效记录。

25 | {{else}} 26 | 27 | 28 | 29 | [[range .table.Columns]][[if eq (.Tag "column") "y"]] 30 | [[end]][[end]] 31 | 32 | 33 | {{range $k, $v := .items}} 34 | 35 | [[with .table.PrimaryColumn]] 36 | 37 | [[end]] 38 | [[range .table.Columns]][[if eq (.Tag "column") "y"]] 39 | 42 | [[end]][[end]] 43 | 44 | {{end}} 45 | 46 | 47 | 48 | 49 | 50 | 51 |
[[.Tag "caption"]]
{{widget "checkbox" "w" "id[]" (json .)}} 40 | {{widget "[[.Tag "widget"]]" "r" (printf "finder.query.[[.Field]].%d" $k) $v.[[.Field | camel | lint]] [[if ne (.Tag "relation") ""]] "[[.Tag "relation"]]"[[end]] [[if ne (.Tag "field") ""]] "[[.Tag "field"]]"[[end]]}} 41 |
一共有{{.total}}记录。
52 | {{.pagination}} 53 | {{end}} 54 |
55 |
56 | -------------------------------------------------------------------------------- /templates/portal/app/views/view.[[.table.Name | module]]/create.html: -------------------------------------------------------------------------------- 1 | [[set . "t_module" (.table.Name | module)]] 2 | {{set . "title" "[[.t_module]].create"}} 3 | {{template "header" .}} 4 | 5 |
6 | 11 |
12 |
13 | 14 |
15 |
16 | [[.t_module]].create 17 |
18 | 19 | [[range .table.Columns]] 20 | [[if not .IsPrimary]] 21 | [[if ne (.Tag "ignore") "y"]] 22 | {{with $field := field "obj.[[.Field | camel | lint]]" .}} 23 |
24 | 25 |
26 | [[if eq (.Tag "widget") "selection"]] 27 | {{widget "[[.Tag "widget"]]" "w" $field.Name $field.Value [[if ne (.Tag "relation") ""]] "[[.Tag "relation"]]"[[end]] [[if ne (.Tag "field") ""]] "obj.[[.Tag "field" | camel | lint]]"[[end]]}} 28 | [[else]] 29 | {{widget "[[.Tag "widget"]]" "w" $field.Name $field.Value [[if ne (.Tag "relation") ""]] "[[.Tag "relation"]]"[[end]] [[if ne (.Tag "field") ""]] "[[.Tag "field"]]"[[end]]}} 30 | [[end]] 31 |
32 |
33 | {{$field.Error}} 34 |
35 |
36 | {{end}} 37 | [[end]] 38 | [[end]] 39 | [[end]] 40 | 41 |
42 |
43 | 44 |
45 |
46 |
47 | 48 |
49 |
50 |
51 | 52 | {{template "footer" .}} 53 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/templates/templates/default.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.addTemplates("default",{imagesPath:CKEDITOR.getUrl(CKEDITOR.plugins.getPath("templates")+"templates/images/"),templates:[{title:"Image and Title",image:"template1.gif",description:"One main image with a title and text that surround the image.",html:'\x3ch3\x3e\x3cimg src\x3d" " alt\x3d"" style\x3d"margin-right: 10px" height\x3d"100" width\x3d"100" align\x3d"left" /\x3eType the title here\x3c/h3\x3e\x3cp\x3eType the text here\x3c/p\x3e'},{title:"Strange Template",image:"template2.gif",description:"A template that defines two colums, each one with a title, and some text.", 6 | html:'\x3ctable cellspacing\x3d"0" cellpadding\x3d"0" style\x3d"width:100%" border\x3d"0"\x3e\x3ctr\x3e\x3ctd style\x3d"width:50%"\x3e\x3ch3\x3eTitle 1\x3c/h3\x3e\x3c/td\x3e\x3ctd\x3e\x3c/td\x3e\x3ctd style\x3d"width:50%"\x3e\x3ch3\x3eTitle 2\x3c/h3\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3eText 1\x3c/td\x3e\x3ctd\x3e\x3c/td\x3e\x3ctd\x3eText 2\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3cp\x3eMore text goes here.\x3c/p\x3e'},{title:"Text and Table",image:"template3.gif",description:"A title with some text and a table.", 7 | html:'\x3cdiv style\x3d"width: 80%"\x3e\x3ch3\x3eTitle goes here\x3c/h3\x3e\x3ctable style\x3d"width:150px;float: right" cellspacing\x3d"0" cellpadding\x3d"0" border\x3d"1"\x3e\x3ccaption style\x3d"border:solid 1px black"\x3e\x3cstrong\x3eTable title\x3c/strong\x3e\x3c/caption\x3e\x3ctr\x3e\x3ctd\x3e\x26nbsp;\x3c/td\x3e\x3ctd\x3e\x26nbsp;\x3c/td\x3e\x3ctd\x3e\x26nbsp;\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e\x26nbsp;\x3c/td\x3e\x3ctd\x3e\x26nbsp;\x3c/td\x3e\x3ctd\x3e\x26nbsp;\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e\x26nbsp;\x3c/td\x3e\x3ctd\x3e\x26nbsp;\x3c/td\x3e\x3ctd\x3e\x26nbsp;\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3cp\x3eType the text here\x3c/p\x3e\x3c/div\x3e'}]}); -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/templates/dialogs/templates.css: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | 6 | .cke_tpl_list 7 | { 8 | border: #dcdcdc 2px solid; 9 | background-color: #ffffff; 10 | overflow-y: auto; 11 | overflow-x: hidden; 12 | width: 100%; 13 | height: 220px; 14 | } 15 | 16 | .cke_tpl_item 17 | { 18 | margin: 5px; 19 | padding: 7px; 20 | border: #eeeeee 1px solid; 21 | *width: 88%; 22 | } 23 | 24 | .cke_tpl_preview 25 | { 26 | border-collapse: separate; 27 | text-indent:0; 28 | width: 100%; 29 | } 30 | .cke_tpl_preview td 31 | { 32 | padding: 2px; 33 | vertical-align: middle; 34 | } 35 | .cke_tpl_preview .cke_tpl_preview_img 36 | { 37 | width: 100px; 38 | } 39 | .cke_tpl_preview span 40 | { 41 | white-space: normal; 42 | } 43 | 44 | .cke_tpl_title 45 | { 46 | font-weight: bold; 47 | } 48 | 49 | .cke_tpl_list a:hover .cke_tpl_item, 50 | .cke_tpl_list a:focus .cke_tpl_item, 51 | .cke_tpl_list a:active .cke_tpl_item 52 | { 53 | border: #ff9933 1px solid; 54 | background-color: #fffacd; 55 | } 56 | 57 | .cke_tpl_list a:hover *, 58 | .cke_tpl_list a:focus *, 59 | .cke_tpl_list a:active * 60 | { 61 | cursor: pointer; 62 | } 63 | 64 | /* IE Quirks contextual selectors children will not get :hover transition until 65 | the hover style of the link itself contains certain CSS declarations. */ 66 | .cke_browser_quirks .cke_tpl_list a:active, 67 | .cke_browser_quirks .cke_tpl_list a:hover, 68 | .cke_browser_quirks .cke_tpl_list a:focus 69 | { 70 | background-position: 0 0; 71 | } 72 | 73 | .cke_hc .cke_tpl_list a:hover .cke_tpl_item, 74 | .cke_hc .cke_tpl_list a:focus .cke_tpl_item, 75 | .cke_hc .cke_tpl_list a:active .cke_tpl_item 76 | { 77 | border-width: 3px; 78 | } 79 | 80 | .cke_tpl_empty, .cke_tpl_loading 81 | { 82 | text-align: center; 83 | padding: 5px; 84 | } 85 | -------------------------------------------------------------------------------- /templates/portal/app/models/base.fns.cipher.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "crypto/md5" 5 | "fmt" 6 | "strconv" 7 | "strings" 8 | 9 | "github.com/satori/go.uuid" 10 | ) 11 | 12 | func cipher_md5(str string) string { 13 | hash := md5.New() 14 | hash.Write([]byte(str)) 15 | return fmt.Sprintf("%x", hash.Sum(nil)) 16 | } 17 | 18 | func cipher_uuid(str string) string { 19 | return uuid.NewV4().String() 20 | } 21 | 22 | func EncodeID(number int64) string { 23 | if number == 0 { 24 | return "" 25 | } 26 | a := mix(uint64(number)) 27 | return strings.ToUpper(strconv.FormatInt(setVersion(a), 36)) 28 | } 29 | 30 | func DecodeID(str string) int64 { 31 | if str == "" || str == "74" { 32 | return 0 33 | } 34 | number, _ := strconv.ParseUint(str, 36, 64) 35 | return int64(demix(number)) 36 | } 37 | 38 | func mix(number uint64) []uint64 { 39 | var ver uint64 = 1 40 | ret := number 41 | digit := 0 42 | 43 | for ret > 0 { 44 | digit++ 45 | ret = ret >> 3 46 | } 47 | 48 | var i uint64 49 | md := uint64((digit-1)/5 + 1) 50 | mix := uint64(number & ((1 << (3 * md)) - 1)) 51 | 52 | for digit > 0 { 53 | 54 | md-- 55 | ret += (((number & ((1 << 15) - 1)) + ((mix & (((1 << 3) - 1) << (3 * md))) << (15 - 3*md))) << i) 56 | 57 | number = number >> 15 58 | digit -= 5 59 | i += 18 60 | } 61 | number = ret 62 | return []uint64{ver, number} 63 | } 64 | 65 | func setVersion(mixed []uint64) int64 { 66 | return int64(((mixed[1] >> 8) << 12) + (mixed[0] << 8) + (mixed[1] & 255)) 67 | } 68 | 69 | func getVersion(number uint64) []uint64 { 70 | return []uint64{(number >> 8) & 15, ((number >> 12) << 8) + (number & 255)} 71 | } 72 | 73 | func demix(number uint64) uint64 { 74 | vs := getVersion(number) 75 | number = vs[1] 76 | switch vs[0] { 77 | case 1: 78 | var dig uint64 79 | var ret uint64 80 | for number > 0 { 81 | ret += ((number & ((1 << 15) - 1)) << dig) 82 | number = number >> 18 83 | dig += 15 84 | } 85 | number = ret 86 | } 87 | return number 88 | } 89 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/wsc/dialogs/ciframe.html: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 64 | 65 |

66 | 67 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/samples/toolbarconfigurator/css/fontello.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'fontello'; 3 | src: url('../font/fontello.eot?89024372'); 4 | src: url('../font/fontello.eot?89024372#iefix') format('embedded-opentype'), 5 | url('../font/fontello.woff?89024372') format('woff'), 6 | url('../font/fontello.ttf?89024372') format('truetype'), 7 | url('../font/fontello.svg?89024372#fontello') format('svg'); 8 | font-weight: normal; 9 | font-style: normal; 10 | } 11 | /* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */ 12 | /* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */ 13 | /* 14 | @media screen and (-webkit-min-device-pixel-ratio:0) { 15 | @font-face { 16 | font-family: 'fontello'; 17 | src: url('../font/fontello.svg?89024372#fontello') format('svg'); 18 | } 19 | } 20 | */ 21 | 22 | [class^="icon-"]:before, [class*=" icon-"]:before { 23 | font-family: "fontello"; 24 | font-style: normal; 25 | font-weight: normal; 26 | speak: none; 27 | 28 | display: inline-block; 29 | text-decoration: inherit; 30 | width: 1em; 31 | margin-right: .2em; 32 | text-align: center; 33 | /* opacity: .8; */ 34 | 35 | /* For safety - reset parent styles, that can break glyph codes*/ 36 | font-variant: normal; 37 | text-transform: none; 38 | 39 | /* fix buttons height, for twitter bootstrap */ 40 | line-height: 1em; 41 | 42 | /* Animation center compensation - margins should be symmetric */ 43 | /* remove if not needed */ 44 | margin-left: .2em; 45 | 46 | /* you can be more comfortable with increased icons size */ 47 | /* font-size: 120%; */ 48 | 49 | /* Uncomment for 3D effect */ 50 | /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */ 51 | } 52 | 53 | .icon-trash:before { content: '\e802'; } /* '' */ 54 | .icon-down-big:before { content: '\e800'; } /* '' */ 55 | .icon-up-big:before { content: '\e801'; } /* '' */ 56 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/forms/dialogs/form.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.dialog.add("form",function(a){var d={action:1,id:1,method:1,enctype:1,target:1};return{title:a.lang.forms.form.title,minWidth:350,minHeight:200,onShow:function(){delete this.form;var b=this.getParentEditor().elementPath().contains("form",1);b&&(this.form=b,this.setupContent(b))},onOk:function(){var b,a=this.form,c=!a;c&&(b=this.getParentEditor(),a=b.document.createElement("form"),a.appendBogus());c&&b.insertElement(a);this.commitContent(a)},onLoad:function(){function a(b){this.setValue(b.getAttribute(this.id)|| 6 | "")}function e(a){this.getValue()?a.setAttribute(this.id,this.getValue()):a.removeAttribute(this.id)}this.foreach(function(c){d[c.id]&&(c.setup=a,c.commit=e)})},contents:[{id:"info",label:a.lang.forms.form.title,title:a.lang.forms.form.title,elements:[{id:"txtName",bidi:!0,type:"text",label:a.lang.common.name,"default":"",accessKey:"N",setup:function(a){this.setValue(a.data("cke-saved-name")||a.getAttribute("name")||"")},commit:function(a){this.getValue()?a.data("cke-saved-name",this.getValue()): 7 | (a.data("cke-saved-name",!1),a.removeAttribute("name"))}},{id:"action",type:"text",label:a.lang.forms.form.action,"default":"",accessKey:"T"},{type:"hbox",widths:["45%","55%"],children:[{id:"id",type:"text",label:a.lang.common.id,"default":"",accessKey:"I"},{id:"enctype",type:"select",label:a.lang.forms.form.encoding,style:"width:100%",accessKey:"E","default":"",items:[[""],["text/plain"],["multipart/form-data"],["application/x-www-form-urlencoded"]]}]},{type:"hbox",widths:["45%","55%"],children:[{id:"target", 8 | type:"select",label:a.lang.common.target,style:"width:100%",accessKey:"M","default":"",items:[[a.lang.common.notSet,""],[a.lang.common.targetNew,"_blank"],[a.lang.common.targetTop,"_top"],[a.lang.common.targetSelf,"_self"],[a.lang.common.targetParent,"_parent"]]},{id:"method",type:"select",label:a.lang.forms.form.method,accessKey:"M","default":"GET",items:[["GET","get"],["POST","post"]]}]}]}]}}); -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | scaffold 2 | === 3 | 4 | 一款基于数据库定义的代码生成器。 5 | 6 | ### 它是如何工作的? 7 | 8 | 正如我们所知, go 中进行 json 字符串的编码/解码过程中, 可以通过对象定义时字段的tag定义, 对字段进行补充说明。如下例: 9 | 10 | ````go 11 | type JsonSomething struct{ 12 | AField int64 `json:"x"` 13 | BField string `json:"y"` 14 | } 15 | ```` 16 | 同样的方法, scaffold 通过数据库定义中的字段(或表)的 COMMENT 定义来对相应字段(或表)进行补充说明, 在根据模板进行代码生成。如: 17 | 18 | ````sql 19 | CREATE TABLE `users` ( 20 | `id` INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT COMMENT 'caption:"编号"', 21 | `name` VARCHAR(32) NOT NULL DEFAULT '' COMMENT 'caption:"名称"', 22 | `mailbox` VARCHAR(128) NOT NULL DEFAULT '' COMMENT 'caption:"邮箱"', 23 | `sex` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'caption:"性别"', 24 | `description` VARCHAR(256) NOT NULL DEFAULT '' COMMENT 'caption:"描述"', 25 | `password` VARCHAR(32) NOT NULL DEFAULT '' COMMENT 'caption:"密码"', 26 | `head_url` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'caption:"头像"', 27 | `status` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'caption:"状态"', 28 | `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'caption:"创建时间"' 29 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT 'caption:"会员"'; 30 | 31 | ```` 32 | 如定义表结构后, scaffold 就可以通过 模板函数读取到 comment 中的 caption 字段, 并根据模板生成代码了。 33 | 34 | ### 快速开始 35 | 36 | ##### 安装 37 | 38 | ````shell 39 | $: go get github.com/liujianping/scaffold 40 | 41 | ```` 42 | 43 | ##### 生成model代码 44 | 45 | [表定义详解](/doc/model.md) 46 | 47 | ````shell 48 | $: scaffold -i=.go -t=model generate -d="database" -u="root" -p="pass" github.com/yourname/model 49 | 50 | ```` 51 | 52 | ##### 生成管理平台 53 | 54 | [表定义例子](/doc/portal.sql) 55 | 56 | [表定义详解](/doc/portal.md) 57 | 58 | ````shell 59 | # 生成项目 60 | $: scaffold -i=.go -i=.html -i=routes -t=portal generate -d="database" -u="root" -p="pass" github.com/yourname/portal 61 | 62 | # 修改数据库配置 github.com/yourname/portal/conf/app.conf 63 | 64 | # 运行项目 65 | $: revel run github.com/yourname/portal 66 | ```` 67 | 68 | ##### 自定义模板 69 | 70 | [模版定义详解](/doc/template.md) 71 | 72 | #### Thanks 73 | 74 | [jaywcjlove](https://github.com/jaywcjlove) 提供的datetime控件js脚本 -------------------------------------------------------------------------------- /symbol/tag.go: -------------------------------------------------------------------------------- 1 | package symbol 2 | 3 | import "strconv" 4 | 5 | // A StructTag is the tag string in a struct field. 6 | // 7 | // By convention, tag strings are a concatenation of 8 | // optionally space-separated key:"value" pairs. 9 | // Each key is a non-empty string consisting of non-control 10 | // characters other than space (U+0020 ' '), quote (U+0022 '"'), 11 | // and colon (U+003A ':'). Each value is quoted using U+0022 '"' 12 | // characters and Go string literal syntax. 13 | type StructTag string 14 | 15 | // Get returns the value associated with key in the tag string. 16 | // If there is no such key in the tag, Get returns the empty string. 17 | // If the tag does not have the conventional format, the value 18 | // returned by Get is unspecified. 19 | func (tag StructTag) Get(key string) string { 20 | // When modifying this code, also update the validateStructTag code 21 | // in golang.org/x/tools/cmd/vet/structtag.go. 22 | 23 | for tag != "" { 24 | // Skip leading space. 25 | i := 0 26 | for i < len(tag) && tag[i] == ' ' { 27 | i++ 28 | } 29 | tag = tag[i:] 30 | if tag == "" { 31 | break 32 | } 33 | 34 | // Scan to colon. A space, a quote or a control character is a syntax error. 35 | // Strictly speaking, control chars include the range [0x7f, 0x9f], not just 36 | // [0x00, 0x1f], but in practice, we ignore the multi-byte control characters 37 | // as it is simpler to inspect the tag's bytes than the tag's runes. 38 | i = 0 39 | for i < len(tag) && tag[i] > ' ' && tag[i] != ':' && tag[i] != '"' && tag[i] != 0x7f { 40 | i++ 41 | } 42 | if i == 0 || i+1 >= len(tag) || tag[i] != ':' || tag[i+1] != '"' { 43 | break 44 | } 45 | name := string(tag[:i]) 46 | tag = tag[i+1:] 47 | 48 | // Scan quoted string to find value. 49 | i = 1 50 | for i < len(tag) && tag[i] != '"' { 51 | if tag[i] == '\\' { 52 | i++ 53 | } 54 | i++ 55 | } 56 | if i >= len(tag) { 57 | break 58 | } 59 | qvalue := string(tag[:i+1]) 60 | tag = tag[i+1:] 61 | 62 | if key == name { 63 | value, err := strconv.Unquote(qvalue) 64 | if err != nil { 65 | break 66 | } 67 | return value 68 | } 69 | } 70 | return "" 71 | } 72 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/wsc/dialogs/tmpFrameset.html: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/specialchar/dialogs/lang/ja.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang("specialchar","ja",{euro:"ユーロ記号",lsquo:"左シングル引用符",rsquo:"右シングル引用符",ldquo:"左ダブル引用符",rdquo:"右ダブル引用符",ndash:"半角ダッシュ",mdash:"全角ダッシュ",iexcl:"逆さ感嘆符",cent:"セント記号",pound:"ポンド記号",curren:"通貨記号",yen:"円記号",brvbar:"上下に分かれた縦棒",sect:"節記号",uml:"分音記号(ウムラウト)",copy:"著作権表示記号",ordf:"女性序数標識",laquo:" 始め二重山括弧引用記号",not:"論理否定記号",reg:"登録商標記号",macr:"長音符",deg:"度記号",sup2:"上つき2, 2乗",sup3:"上つき3, 3乗",acute:"揚音符",micro:"ミクロン記号",para:"段落記号",middot:"中黒",cedil:"セディラ",sup1:"上つき1",ordm:"男性序数標識",raquo:"終わり二重山括弧引用記号", 6 | frac14:"四分の一",frac12:"二分の一",frac34:"四分の三",iquest:"逆疑問符",Agrave:"抑音符つき大文字A",Aacute:"揚音符つき大文字A",Acirc:"曲折アクセントつき大文字A",Atilde:"チルダつき大文字A",Auml:"分音記号つき大文字A",Aring:"リングつき大文字A",AElig:"AとEの合字",Ccedil:"セディラつき大文字C",Egrave:"抑音符つき大文字E",Eacute:"揚音符つき大文字E",Ecirc:"曲折アクセントつき大文字E",Euml:"分音記号つき大文字E",Igrave:"抑音符つき大文字I",Iacute:"揚音符つき大文字I",Icirc:"曲折アクセントつき大文字I",Iuml:"分音記号つき大文字I",ETH:"[アイスランド語]大文字ETH",Ntilde:"チルダつき大文字N",Ograve:"抑音符つき大文字O",Oacute:"揚音符つき大文字O",Ocirc:"曲折アクセントつき大文字O",Otilde:"チルダつき大文字O",Ouml:" 分音記号つき大文字O", 7 | times:"乗算記号",Oslash:"打ち消し線つき大文字O",Ugrave:"抑音符つき大文字U",Uacute:"揚音符つき大文字U",Ucirc:"曲折アクセントつき大文字U",Uuml:"分音記号つき大文字U",Yacute:"揚音符つき大文字Y",THORN:"[アイスランド語]大文字THORN",szlig:"ドイツ語エスツェット",agrave:"抑音符つき小文字a",aacute:"揚音符つき小文字a",acirc:"曲折アクセントつき小文字a",atilde:"チルダつき小文字a",auml:"分音記号つき小文字a",aring:"リングつき小文字a",aelig:"aとeの合字",ccedil:"セディラつき小文字c",egrave:"抑音符つき小文字e",eacute:"揚音符つき小文字e",ecirc:"曲折アクセントつき小文字e",euml:"分音記号つき小文字e",igrave:"抑音符つき小文字i",iacute:"揚音符つき小文字i",icirc:"曲折アクセントつき小文字i",iuml:"分音記号つき小文字i",eth:"アイスランド語小文字eth", 8 | ntilde:"チルダつき小文字n",ograve:"抑音符つき小文字o",oacute:"揚音符つき小文字o",ocirc:"曲折アクセントつき小文字o",otilde:"チルダつき小文字o",ouml:"分音記号つき小文字o",divide:"除算記号",oslash:"打ち消し線つき小文字o",ugrave:"抑音符つき小文字u",uacute:"揚音符つき小文字u",ucirc:"曲折アクセントつき小文字u",uuml:"分音記号つき小文字u",yacute:"揚音符つき小文字y",thorn:"アイスランド語小文字thorn",yuml:"分音記号つき小文字y",OElig:"OとEの合字",oelig:"oとeの合字",372:"曲折アクセントつき大文字W",374:"曲折アクセントつき大文字Y",373:"曲折アクセントつき小文字w",375:"曲折アクセントつき小文字y",sbquo:"シングル下引用符",8219:"左右逆の左引用符",bdquo:"ダブル下引用符",hellip:"三点リーダ",trade:"商標記号",9658:"右黒三角ポインタ",bull:"黒丸", 9 | rarr:"右矢印",rArr:"右二重矢印",hArr:"左右二重矢印",diams:"ダイヤ",asymp:"漸近"}); -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/forms/dialogs/textarea.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.dialog.add("textarea",function(b){return{title:b.lang.forms.textarea.title,minWidth:350,minHeight:220,onShow:function(){delete this.textarea;var a=this.getParentEditor().getSelection().getSelectedElement();a&&"textarea"==a.getName()&&(this.textarea=a,this.setupContent(a))},onOk:function(){var a,b=this.textarea,c=!b;c&&(a=this.getParentEditor(),b=a.document.createElement("textarea"));this.commitContent(b);c&&a.insertElement(b)},contents:[{id:"info",label:b.lang.forms.textarea.title,title:b.lang.forms.textarea.title, 6 | elements:[{id:"_cke_saved_name",type:"text",label:b.lang.common.name,"default":"",accessKey:"N",setup:function(a){this.setValue(a.data("cke-saved-name")||a.getAttribute("name")||"")},commit:function(a){this.getValue()?a.data("cke-saved-name",this.getValue()):(a.data("cke-saved-name",!1),a.removeAttribute("name"))}},{type:"hbox",widths:["50%","50%"],children:[{id:"cols",type:"text",label:b.lang.forms.textarea.cols,"default":"",accessKey:"C",style:"width:50px",validate:CKEDITOR.dialog.validate.integer(b.lang.common.validateNumberFailed), 7 | setup:function(a){a=a.hasAttribute("cols")&&a.getAttribute("cols");this.setValue(a||"")},commit:function(a){this.getValue()?a.setAttribute("cols",this.getValue()):a.removeAttribute("cols")}},{id:"rows",type:"text",label:b.lang.forms.textarea.rows,"default":"",accessKey:"R",style:"width:50px",validate:CKEDITOR.dialog.validate.integer(b.lang.common.validateNumberFailed),setup:function(a){a=a.hasAttribute("rows")&&a.getAttribute("rows");this.setValue(a||"")},commit:function(a){this.getValue()?a.setAttribute("rows", 8 | this.getValue()):a.removeAttribute("rows")}}]},{id:"value",type:"textarea",label:b.lang.forms.textfield.value,"default":"",setup:function(a){this.setValue(a.$.defaultValue)},commit:function(a){a.$.value=a.$.defaultValue=this.getValue()}},{id:"required",type:"checkbox",label:b.lang.forms.textfield.required,"default":"",accessKey:"Q",value:"required",setup:function(a){this.setValue(a.getAttribute("required"))},commit:function(a){this.getValue()?a.setAttribute("required","required"):a.removeAttribute("required")}}]}]}}); -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/forms/dialogs/radio.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.dialog.add("radio",function(b){return{title:b.lang.forms.checkboxAndRadio.radioTitle,minWidth:350,minHeight:140,onShow:function(){delete this.radioButton;var a=this.getParentEditor().getSelection().getSelectedElement();a&&"input"==a.getName()&&"radio"==a.getAttribute("type")&&(this.radioButton=a,this.setupContent(a))},onOk:function(){var a,c=this.radioButton,b=!c;b&&(a=this.getParentEditor(),c=a.document.createElement("input"),c.setAttribute("type","radio"));b&&a.insertElement(c);this.commitContent({element:c})}, 6 | contents:[{id:"info",label:b.lang.forms.checkboxAndRadio.radioTitle,title:b.lang.forms.checkboxAndRadio.radioTitle,elements:[{id:"name",type:"text",label:b.lang.common.name,"default":"",accessKey:"N",setup:function(a){this.setValue(a.data("cke-saved-name")||a.getAttribute("name")||"")},commit:function(a){a=a.element;this.getValue()?a.data("cke-saved-name",this.getValue()):(a.data("cke-saved-name",!1),a.removeAttribute("name"))}},{id:"value",type:"text",label:b.lang.forms.checkboxAndRadio.value,"default":"", 7 | accessKey:"V",setup:function(a){this.setValue(a.getAttribute("value")||"")},commit:function(a){a=a.element;this.getValue()?a.setAttribute("value",this.getValue()):a.removeAttribute("value")}},{id:"checked",type:"checkbox",label:b.lang.forms.checkboxAndRadio.selected,"default":"",accessKey:"S",value:"checked",setup:function(a){this.setValue(a.getAttribute("checked"))},commit:function(a){var c=a.element;if(CKEDITOR.env.ie){var d=c.getAttribute("checked"),e=!!this.getValue();d!=e&&(d=CKEDITOR.dom.element.createFromHtml('\x3cinput type\x3d"radio"'+ 8 | (e?' checked\x3d"checked"':"")+"\x3e\x3c/input\x3e",b.document),c.copyAttributes(d,{type:1,checked:1}),d.replace(c),b.getSelection().selectElement(d),a.element=d)}else this.getValue()?c.setAttribute("checked","checked"):c.removeAttribute("checked")}},{id:"required",type:"checkbox",label:b.lang.forms.checkboxAndRadio.required,"default":"",accessKey:"Q",value:"required",setup:function(a){this.setValue(a.getAttribute("required"))},commit:function(a){a=a.element;this.getValue()?a.setAttribute("required", 9 | "required"):a.removeAttribute("required")}}]}]}}); -------------------------------------------------------------------------------- /commands/commands.go: -------------------------------------------------------------------------------- 1 | package commands 2 | 3 | import ( 4 | "github.com/codegangsta/cli" 5 | ) 6 | 7 | const version = "1.0.1" 8 | const author = "" 9 | const support = "liujianping.itech@qq.com" 10 | 11 | func App() *cli.App { 12 | app := cli.NewApp() 13 | 14 | //! app settings 15 | app.Name = "scaffold" 16 | app.Usage = "scaffolding, generate code by database schema definitions" 17 | app.Version = version 18 | app.Author = author 19 | app.Email = support 20 | 21 | app.Flags = []cli.Flag{ 22 | cli.BoolFlag{ 23 | Name: "force, f", 24 | Usage: "force to replace file by generated", 25 | }, 26 | cli.StringFlag{ 27 | Name: "template, t", 28 | Value: "portal", 29 | Usage: "template directory(default: portal)", 30 | }, 31 | cli.StringFlag{ 32 | Name: "template-folder", 33 | Value: "", 34 | Usage: "custom template abosolute folder path", 35 | }, 36 | cli.StringSliceFlag{ 37 | Name: "include-template-suffix, i", 38 | Value: &cli.StringSlice{}, 39 | Usage: "include template suffix or template name", 40 | }, 41 | cli.StringSliceFlag{ 42 | Name: "exclude-template-suffix, x", 43 | Value: &cli.StringSlice{}, 44 | Usage: "exclude template suffix or template name", 45 | }, 46 | } 47 | //! app commands 48 | app.Commands = []cli.Command{ 49 | { 50 | Name: "generate", 51 | Usage: "generate code from templates", 52 | Flags: []cli.Flag{ 53 | cli.StringFlag{ 54 | Name: "driver, D", 55 | Value: "mysql", 56 | Usage: "database driver, now only support mysql", 57 | }, 58 | cli.StringFlag{ 59 | Name: "database, d", 60 | Value: "", 61 | Usage: "database name", 62 | }, 63 | cli.StringFlag{ 64 | Name: "host, H", 65 | Value: "localhost", 66 | Usage: "database host(default: localhost)", 67 | }, 68 | cli.IntFlag{ 69 | Name: "port, P", 70 | Value: 3306, 71 | Usage: "database port(default: 3306)", 72 | }, 73 | cli.StringFlag{ 74 | Name: "username, u", 75 | Value: "root", 76 | Usage: "database user name(default: root)", 77 | }, 78 | cli.StringFlag{ 79 | Name: "password, p", 80 | Value: "", 81 | Usage: "database user password", 82 | }, 83 | }, 84 | Action: func(ctx *cli.Context) { 85 | Generate(ctx) 86 | }, 87 | }, 88 | } 89 | 90 | return app 91 | } 92 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/specialchar/dialogs/lang/zh.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang("specialchar","zh",{euro:"歐元符號",lsquo:"左單引號",rsquo:"右單引號",ldquo:"左雙引號",rdquo:"右雙引號",ndash:"短破折號",mdash:"長破折號",iexcl:"倒置的驚嘆號",cent:"美分符號",pound:"英鎊符號",curren:"貨幣符號",yen:"日圓符號",brvbar:"破折號",sect:"章節符號",uml:"分音符號",copy:"版權符號",ordf:"雌性符號",laquo:"左雙角括號",not:"Not 符號",reg:"註冊商標符號",macr:"長音符號",deg:"度數符號",sup2:"上標字 2",sup3:"上標字 3",acute:"尖音符號",micro:"微",para:"段落符號",middot:"中間點",cedil:"字母 C 下面的尾型符號 ",sup1:"上標",ordm:"雄性符號",raquo:"右雙角括號",frac14:"四分之一符號",frac12:"二分之一符號",frac34:"四分之三符號", 6 | iquest:"倒置的問號",Agrave:"拉丁大寫字母 A 帶抑音符號",Aacute:"拉丁大寫字母 A 帶尖音符號",Acirc:"拉丁大寫字母 A 帶揚抑符",Atilde:"拉丁大寫字母 A 帶波浪號",Auml:"拉丁大寫字母 A 帶分音符號",Aring:"拉丁大寫字母 A 帶上圓圈",AElig:"拉丁大寫字母 Æ",Ccedil:"拉丁大寫字母 C 帶下尾符號",Egrave:"拉丁大寫字母 E 帶抑音符號",Eacute:"拉丁大寫字母 E 帶尖音符號",Ecirc:"拉丁大寫字母 E 帶揚抑符",Euml:"拉丁大寫字母 E 帶分音符號",Igrave:"拉丁大寫字母 I 帶抑音符號",Iacute:"拉丁大寫字母 I 帶尖音符號",Icirc:"拉丁大寫字母 I 帶揚抑符",Iuml:"拉丁大寫字母 I 帶分音符號",ETH:"拉丁大寫字母 Eth",Ntilde:"拉丁大寫字母 N 帶波浪號",Ograve:"拉丁大寫字母 O 帶抑音符號",Oacute:"拉丁大寫字母 O 帶尖音符號",Ocirc:"拉丁大寫字母 O 帶揚抑符",Otilde:"拉丁大寫字母 O 帶波浪號", 7 | Ouml:"拉丁大寫字母 O 帶分音符號",times:"乘號",Oslash:"拉丁大寫字母 O 帶粗線符號",Ugrave:"拉丁大寫字母 U 帶抑音符號",Uacute:"拉丁大寫字母 U 帶尖音符號",Ucirc:"拉丁大寫字母 U 帶揚抑符",Uuml:"拉丁大寫字母 U 帶分音符號",Yacute:"拉丁大寫字母 Y 帶尖音符號",THORN:"拉丁大寫字母 Thorn",szlig:"拉丁小寫字母 s",agrave:"拉丁小寫字母 a 帶抑音符號",aacute:"拉丁小寫字母 a 帶尖音符號",acirc:"拉丁小寫字母 a 帶揚抑符",atilde:"拉丁小寫字母 a 帶波浪號",auml:"拉丁小寫字母 a 帶分音符號",aring:"拉丁小寫字母 a 帶上圓圈",aelig:"拉丁小寫字母 æ",ccedil:"拉丁小寫字母 c 帶下尾符號",egrave:"拉丁小寫字母 e 帶抑音符號",eacute:"拉丁小寫字母 e 帶尖音符號",ecirc:"拉丁小寫字母 e 帶揚抑符",euml:"拉丁小寫字母 e 帶分音符號",igrave:"拉丁小寫字母 i 帶抑音符號", 8 | iacute:"拉丁小寫字母 i 帶尖音符號",icirc:"拉丁小寫字母 i 帶揚抑符",iuml:"拉丁小寫字母 i 帶分音符號",eth:"拉丁小寫字母 eth",ntilde:"拉丁小寫字母 n 帶波浪號",ograve:"拉丁小寫字母 o 帶抑音符號",oacute:"拉丁小寫字母 o 帶尖音符號",ocirc:"拉丁小寫字母 o 帶揚抑符",otilde:"拉丁小寫字母 o 帶波浪號",ouml:"拉丁小寫字母 o 帶分音符號",divide:"除號",oslash:"拉丁小寫字母 o 帶粗線符號",ugrave:"拉丁小寫字母 u 帶抑音符號",uacute:"拉丁小寫字母 u 帶尖音符號",ucirc:"拉丁小寫字母 u 帶揚抑符",uuml:"拉丁小寫字母 u 帶分音符號",yacute:"拉丁小寫字母 y 帶尖音符號",thorn:"拉丁小寫字母 thorn",yuml:"拉丁小寫字母 y 帶分音符號",OElig:"拉丁大寫字母 OE",oelig:"拉丁小寫字母 oe",372:"拉丁大寫字母 W 帶揚抑符",374:"拉丁大寫字母 Y 帶揚抑符",373:"拉丁小寫字母 w 帶揚抑符", 9 | 375:"拉丁小寫字母 y 帶揚抑符",sbquo:"低 9 單引號",8219:"高 9 反轉單引號",bdquo:"低 9 雙引號",hellip:"水平刪節號",trade:"商標符號",9658:"黑色向右指箭號",bull:"項目符號",rarr:"向右箭號",rArr:"向右雙箭號",hArr:"左右雙箭號",diams:"黑鑽套裝",asymp:"約等於"}); -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang("specialchar","zh-cn",{euro:"欧元符号",lsquo:"左单引号",rsquo:"右单引号",ldquo:"左双引号",rdquo:"右双引号",ndash:"短划线",mdash:"长划线",iexcl:"竖翻叹号",cent:"分币符号",pound:"英镑符号",curren:"货币符号",yen:"日元符号",brvbar:"间断条",sect:"节标记",uml:"分音符",copy:"版权所有标记",ordf:"阴性顺序指示符",laquo:"左指双尖引号",not:"非标记",reg:"注册标记",macr:"长音符",deg:"度标记",sup2:"上标二",sup3:"上标三",acute:"锐音符",micro:"微符",para:"段落标记",middot:"中间点",cedil:"下加符",sup1:"上标一",ordm:"阳性顺序指示符",raquo:"右指双尖引号",frac14:"普通分数四分之一",frac12:"普通分数二分之一",frac34:"普通分数四分之三",iquest:"竖翻问号", 6 | Agrave:"带抑音符的拉丁文大写字母 A",Aacute:"带锐音符的拉丁文大写字母 A",Acirc:"带扬抑符的拉丁文大写字母 A",Atilde:"带颚化符的拉丁文大写字母 A",Auml:"带分音符的拉丁文大写字母 A",Aring:"带上圆圈的拉丁文大写字母 A",AElig:"拉丁文大写字母 Ae",Ccedil:"带下加符的拉丁文大写字母 C",Egrave:"带抑音符的拉丁文大写字母 E",Eacute:"带锐音符的拉丁文大写字母 E",Ecirc:"带扬抑符的拉丁文大写字母 E",Euml:"带分音符的拉丁文大写字母 E",Igrave:"带抑音符的拉丁文大写字母 I",Iacute:"带锐音符的拉丁文大写字母 I",Icirc:"带扬抑符的拉丁文大写字母 I",Iuml:"带分音符的拉丁文大写字母 I",ETH:"拉丁文大写字母 Eth",Ntilde:"带颚化符的拉丁文大写字母 N",Ograve:"带抑音符的拉丁文大写字母 O",Oacute:"带锐音符的拉丁文大写字母 O",Ocirc:"带扬抑符的拉丁文大写字母 O",Otilde:"带颚化符的拉丁文大写字母 O", 7 | Ouml:"带分音符的拉丁文大写字母 O",times:"乘号",Oslash:"带粗线的拉丁文大写字母 O",Ugrave:"带抑音符的拉丁文大写字母 U",Uacute:"带锐音符的拉丁文大写字母 U",Ucirc:"带扬抑符的拉丁文大写字母 U",Uuml:"带分音符的拉丁文大写字母 U",Yacute:"带抑音符的拉丁文大写字母 Y",THORN:"拉丁文大写字母 Thorn",szlig:"拉丁文小写字母清音 S",agrave:"带抑音符的拉丁文小写字母 A",aacute:"带锐音符的拉丁文小写字母 A",acirc:"带扬抑符的拉丁文小写字母 A",atilde:"带颚化符的拉丁文小写字母 A",auml:"带分音符的拉丁文小写字母 A",aring:"带上圆圈的拉丁文小写字母 A",aelig:"拉丁文小写字母 Ae",ccedil:"带下加符的拉丁文小写字母 C",egrave:"带抑音符的拉丁文小写字母 E",eacute:"带锐音符的拉丁文小写字母 E",ecirc:"带扬抑符的拉丁文小写字母 E",euml:"带分音符的拉丁文小写字母 E",igrave:"带抑音符的拉丁文小写字母 I", 8 | iacute:"带锐音符的拉丁文小写字母 I",icirc:"带扬抑符的拉丁文小写字母 I",iuml:"带分音符的拉丁文小写字母 I",eth:"拉丁文小写字母 Eth",ntilde:"带颚化符的拉丁文小写字母 N",ograve:"带抑音符的拉丁文小写字母 O",oacute:"带锐音符的拉丁文小写字母 O",ocirc:"带扬抑符的拉丁文小写字母 O",otilde:"带颚化符的拉丁文小写字母 O",ouml:"带分音符的拉丁文小写字母 O",divide:"除号",oslash:"带粗线的拉丁文小写字母 O",ugrave:"带抑音符的拉丁文小写字母 U",uacute:"带锐音符的拉丁文小写字母 U",ucirc:"带扬抑符的拉丁文小写字母 U",uuml:"带分音符的拉丁文小写字母 U",yacute:"带抑音符的拉丁文小写字母 Y",thorn:"拉丁文小写字母 Thorn",yuml:"带分音符的拉丁文小写字母 Y",OElig:"拉丁文大写连字 Oe",oelig:"拉丁文小写连字 Oe",372:"带扬抑符的拉丁文大写字母 W",374:"带扬抑符的拉丁文大写字母 Y", 9 | 373:"带扬抑符的拉丁文小写字母 W",375:"带扬抑符的拉丁文小写字母 Y",sbquo:"单下 9 形引号",8219:"单高横翻 9 形引号",bdquo:"双下 9 形引号",hellip:"水平省略号",trade:"商标标志",9658:"实心右指指针",bull:"加重号",rarr:"向右箭头",rArr:"向右双线箭头",hArr:"左右双线箭头",diams:"实心方块纸牌",asymp:"约等于"}); -------------------------------------------------------------------------------- /templates/portal/app/controllers/base.fns.upload.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import ( 4 | "fmt" 5 | goio "io" 6 | "os" 7 | "path" 8 | "time" 9 | 10 | cf "github.com/qiniu/api.v6/conf" 11 | io "github.com/qiniu/api.v6/io" 12 | rs "github.com/qiniu/api.v6/rs" 13 | "github.com/revel/revel" 14 | ) 15 | 16 | var ( 17 | QiniuEnable bool 18 | QiniuAccess string 19 | QiniuSecret string 20 | QiniuBucket string 21 | QiniuDomain string 22 | ) 23 | 24 | func QiniuToken(bucket string) string { 25 | putPolicy := rs.PutPolicy{ 26 | Scope: bucket, 27 | //CallbackUrl: callbackUrl, 28 | //CallbackBody:callbackBody, 29 | //ReturnUrl: returnUrl, 30 | //ReturnBody: returnBody, 31 | //AsyncOps: asyncOps, 32 | //EndUser: endUser, 33 | //Expires: expires, 34 | } 35 | return putPolicy.Token(nil) 36 | } 37 | 38 | func Upload(file_name string, rd goio.Reader) (string, error) { 39 | var url string 40 | if !QiniuEnable { 41 | sub := fmt.Sprintf("%d", time.Now().Unix()%31) 42 | dir := path.Join(revel.BasePath, "upload", sub) 43 | os.MkdirAll(dir, os.ModePerm) 44 | 45 | fname := fmt.Sprintf("%s%s", time.Now().Format("20060102150405"), file_name) 46 | wr, err := os.Create(path.Join(dir, fname)) 47 | if err != nil { 48 | return "", err 49 | } 50 | defer wr.Close() 51 | 52 | if _, err := goio.Copy(wr, rd); err != nil { 53 | return "", err 54 | } 55 | 56 | url = fmt.Sprintf("/upload/%s/%s", sub, fname) 57 | } else { 58 | var ret io.PutRet 59 | var extra = &io.PutExtra{} 60 | 61 | uptoken := QiniuToken(QiniuBucket) 62 | if file_name != "" { 63 | if err := io.Put(nil, &ret, uptoken, file_name, rd, extra); err != nil { 64 | return "", err 65 | } 66 | } else { 67 | if err := io.PutWithoutKey(nil, &ret, uptoken, rd, extra); err != nil { 68 | return "", err 69 | } 70 | } 71 | url = fmt.Sprintf("http://%s/%s", QiniuDomain, ret.Key) 72 | } 73 | return url, nil 74 | } 75 | 76 | func InitWidget() { 77 | QiniuEnable = revel.Config.BoolDefault("qiniu.enable", false) 78 | QiniuAccess = revel.Config.StringDefault("qiniu.access", "") 79 | QiniuSecret = revel.Config.StringDefault("qiniu.secret", "") 80 | QiniuBucket = revel.Config.StringDefault("qiniu.bucket", "") 81 | QiniuDomain = revel.Config.StringDefault("qiniu.domain", "") 82 | 83 | cf.ACCESS_KEY = QiniuAccess 84 | cf.SECRET_KEY = QiniuSecret 85 | } 86 | 87 | func init() { 88 | revel.OnAppStart(InitWidget) 89 | } 90 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/forms/dialogs/checkbox.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.dialog.add("checkbox",function(d){return{title:d.lang.forms.checkboxAndRadio.checkboxTitle,minWidth:350,minHeight:140,onShow:function(){delete this.checkbox;var a=this.getParentEditor().getSelection().getSelectedElement();a&&"checkbox"==a.getAttribute("type")&&(this.checkbox=a,this.setupContent(a))},onOk:function(){var a,b=this.checkbox;b||(a=this.getParentEditor(),b=a.document.createElement("input"),b.setAttribute("type","checkbox"),a.insertElement(b));this.commitContent({element:b})},contents:[{id:"info", 6 | label:d.lang.forms.checkboxAndRadio.checkboxTitle,title:d.lang.forms.checkboxAndRadio.checkboxTitle,startupFocus:"txtName",elements:[{id:"txtName",type:"text",label:d.lang.common.name,"default":"",accessKey:"N",setup:function(a){this.setValue(a.data("cke-saved-name")||a.getAttribute("name")||"")},commit:function(a){a=a.element;this.getValue()?a.data("cke-saved-name",this.getValue()):(a.data("cke-saved-name",!1),a.removeAttribute("name"))}},{id:"txtValue",type:"text",label:d.lang.forms.checkboxAndRadio.value, 7 | "default":"",accessKey:"V",setup:function(a){a=a.getAttribute("value");this.setValue(CKEDITOR.env.ie&&"on"==a?"":a)},commit:function(a){var b=a.element,c=this.getValue();!c||CKEDITOR.env.ie&&"on"==c?CKEDITOR.env.ie?(c=new CKEDITOR.dom.element("input",b.getDocument()),b.copyAttributes(c,{value:1}),c.replace(b),d.getSelection().selectElement(c),a.element=c):b.removeAttribute("value"):b.setAttribute("value",c)}},{id:"cmbSelected",type:"checkbox",label:d.lang.forms.checkboxAndRadio.selected,"default":"", 8 | accessKey:"S",value:"checked",setup:function(a){this.setValue(a.getAttribute("checked"))},commit:function(a){var b=a.element;if(CKEDITOR.env.ie){var c=!!b.getAttribute("checked"),e=!!this.getValue();c!=e&&(c=CKEDITOR.dom.element.createFromHtml('\x3cinput type\x3d"checkbox"'+(e?' checked\x3d"checked"':"")+"/\x3e",d.document),b.copyAttributes(c,{type:1,checked:1}),c.replace(b),d.getSelection().selectElement(c),a.element=c)}else this.getValue()?b.setAttribute("checked","checked"):b.removeAttribute("checked")}}, 9 | {id:"required",type:"checkbox",label:d.lang.forms.checkboxAndRadio.required,"default":"",accessKey:"Q",value:"required",setup:function(a){this.setValue(a.getAttribute("required"))},commit:function(a){a=a.element;this.getValue()?a.setAttribute("required","required"):a.removeAttribute("required")}}]}]}}); -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/samples/old/appendto.html: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | Append To Page Element Using JavaScript Code — CKEditor Sample 10 | 11 | 12 | 13 | 14 |

15 | CKEditor Samples » Append To Page Element Using JavaScript Code 16 |

17 |
18 | This sample is not maintained anymore. Check out the brand new samples in CKEditor SDK. 19 |
20 |
21 |
22 |

23 | The CKEDITOR.appendTo() method serves to to place editors inside existing DOM elements. Unlike CKEDITOR.replace(), 24 | a target container to be replaced is no longer necessary. A new editor 25 | instance is inserted directly wherever it is desired. 26 |

27 |
CKEDITOR.appendTo( 'container_id',
28 | 	{ /* Configuration options to be used. */ }
29 | 	'Editor content to be used.'
30 | );
31 |
32 | 46 |
47 |
48 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang("a11yhelp","zh-cn",{title:"辅助功能说明",contents:"帮助内容。要关闭此对话框请按 ESC 键。",legend:[{name:"常规",items:[{name:"编辑器工具栏",legend:"按 ${toolbarFocus} 切换到工具栏,使用 TAB 键和 SHIFT+TAB 组合键移动到上一个和下一个工具栏组。使用左右箭头键移动到上一个或下一个工具栏按钮。按空格键或回车键以选中工具栏按钮。"},{name:"编辑器对话框",legend:"在对话框内,按 TAB 键移动到下一个字段,按 SHIFT + TAB 组合键移动到上一个字段,按 ENTER 键提交对话框,按 ESC 键取消对话框。对于有多选项卡的对话框,可以按 ALT + F10 直接切换到或者按 TAB 键逐步移到选项卡列表,当焦点移到选项卡列表时可以用左右箭头键来移动到前后的选项卡。"},{name:"编辑器上下文菜单",legend:"用 ${contextMenu} 或者“应用程序键”打开上下文菜单。然后用 TAB 键或者下箭头键来移动到下一个菜单项;SHIFT + TAB 组合键或者上箭头键移动到上一个菜单项。用 SPACE 键或者 ENTER 键选择菜单项。用 SPACE 键,ENTER 键或者右箭头键打开子菜单。返回菜单用 ESC 键或者左箭头键。用 ESC 键关闭上下文菜单。"}, 6 | {name:"编辑器列表框",legend:"在列表框中,移到下一列表项用 TAB 键或者下箭头键。移到上一列表项用SHIFT+TAB 组合键或者上箭头键,用 SPACE 键或者 ENTER 键选择列表项。用 ESC 键收起列表框。"},{name:"编辑器元素路径栏",legend:"按 ${elementsPathFocus} 以导航到元素路径栏,使用 TAB 键或右箭头键选择下一个元素,使用 SHIFT+TAB 组合键或左箭头键选择上一个元素,按空格键或回车键以选定编辑器里的元素。"}]},{name:"命令",items:[{name:" 撤消命令",legend:"按 ${undo}"},{name:" 重做命令",legend:"按 ${redo}"},{name:" 加粗命令",legend:"按 ${bold}"},{name:" 倾斜命令",legend:"按 ${italic}"},{name:" 下划线命令",legend:"按 ${underline}"},{name:" 链接命令",legend:"按 ${link}"},{name:" 工具栏折叠命令",legend:"按 ${toolbarCollapse}"}, 7 | {name:"访问前一个焦点区域的命令",legend:"按 ${accessPreviousSpace} 访问^符号前最近的不可访问的焦点区域,例如:两个相邻的 HR 元素。重复此组合按键可以到达远处的焦点区域。"},{name:"访问下一个焦点区域命令",legend:"按 ${accessNextSpace} 以访问^符号后最近的不可访问的焦点区域。例如:两个相邻的 HR 元素。重复此组合按键可以到达远处的焦点区域。"},{name:"辅助功能帮助",legend:"按 ${a11yHelp}"}]}],backspace:"退格键",tab:"Tab 键",enter:"回车键",shift:"Shift 键",ctrl:"Ctrl 键",alt:"Alt 键",pause:"暂停键",capslock:"大写锁定键",escape:"Esc 键",pageUp:"上翻页键",pageDown:"下翻页键",end:"行尾键",home:"行首键",leftArrow:"向左箭头键",upArrow:"向上箭头键",rightArrow:"向右箭头键",downArrow:"向下箭头键", 8 | insert:"插入键","delete":"删除键",leftWindowKey:"左 WIN 键",rightWindowKey:"右 WIN 键",selectKey:"选择键",numpad0:"小键盘 0 键",numpad1:"小键盘 1 键",numpad2:"小键盘 2 键",numpad3:"小键盘 3 键",numpad4:"小键盘 4 键",numpad5:"小键盘 5 键",numpad6:"小键盘 6 键",numpad7:"小键盘 7 键",numpad8:"小键盘 8 键",numpad9:"小键盘 9 键",multiply:"星号键",add:"加号键",subtract:"减号键",decimalPoint:"小数点键",divide:"除号键",f1:"F1 键",f2:"F2 键",f3:"F3 键",f4:"F4 键",f5:"F5 键",f6:"F6 键",f7:"F7 键",f8:"F8 键",f9:"F9 键",f10:"F10 键",f11:"F11 键",f12:"F12 键",numLock:"数字锁定键",scrollLock:"滚动锁定键", 9 | semiColon:"分号键",equalSign:"等号键",comma:"逗号键",dash:"短划线键",period:"句号键",forwardSlash:"斜杠键",graveAccent:"重音符键",openBracket:"左中括号键",backSlash:"反斜杠键",closeBracket:"右中括号键",singleQuote:"单引号键"}); -------------------------------------------------------------------------------- /templates/portal/app/views/view.[[.table.Name | module]]/update.html: -------------------------------------------------------------------------------- 1 | [[set . "t_module" (.table.Name | module)]] 2 | 3 | {{set . "title" "[[.t_module]]"}} 4 | {{template "header" .}} 5 | 6 |
7 | 12 |
13 |
14 | 15 |
16 |
17 | [[.t_module]].update 18 |
19 | 20 | [[range .table.Columns]] 21 | [[if .IsPrimary]] 22 | {{with $field := field "obj.[[.Field | camel | lint]]" .}} 23 | 24 | {{end}} 25 | [[else if eq (.Tag "update") "y"]] 26 | {{with $field := field "obj.[[.Field | camel | lint]]" .}} 27 |
28 | 29 |
30 | [[if eq (.Tag "widget") "selection"]] 31 | {{widget "[[.Tag "widget"]]" "w" $field.Name $field.Value [[if ne (.Tag "relation") ""]] "[[.Tag "relation"]]"[[end]] [[if ne (.Tag "field") ""]] "obj.[[.Tag "field" | camel | lint]]"[[end]]}} 32 | [[else]] 33 | {{widget "[[.Tag "widget"]]" "w" $field.Name $field.Value [[if ne (.Tag "relation") ""]] "[[.Tag "relation"]]"[[end]] [[if ne (.Tag "field") ""]] "[[.Tag "field"]]"[[end]]}} 34 | [[end]] 35 |
36 |
37 | {{$field.Error}} 38 |
39 |
40 | {{end}} 41 | [[end]] 42 | [[end]] 43 | 44 | [[range .tables]] 45 | [[if eq (.Tag "belong") $.table.Name]] 46 |
47 | 48 |
49 | [[if ne (.Tag "many") ""]] 50 | {{many "[[.Tag "belong"]]" "[[.Tag "many"]]" "[[.Name]]" "w" .obj.ID .obj.[[.Tag "many" | camel | lint]]}} 51 | [[end]] 52 |
53 |
54 |
55 |
56 | [[end]] 57 | [[end]] 58 | 59 |
60 |
61 | 62 |
63 |
64 |
65 | 66 |
67 |
68 |
69 | 70 | {{template "footer" .}} 71 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/a11yhelp/dialogs/lang/zh.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang("a11yhelp","zh",{title:"輔助工具指南",contents:"說明內容。若要關閉此對話框請按「ESC」。",legend:[{name:"一般",items:[{name:"編輯器工具列",legend:"請按 ${toolbarFocus} 以導覽到工具列。利用 TAB 或 SHIFT+TAB 以便移動到下一個及前一個工具列群組。利用右方向鍵或左方向鍵以便移動到下一個及上一個工具列按鈕。按下空白鍵或 ENTER 鍵啟用工具列按鈕。"},{name:"編輯器對話方塊",legend:"在對話框中,按下 TAB 鍵以導覽到下一個對話框元素,按下 SHIFT+TAB 以移動到上一個對話框元素,按下 ENTER 以遞交對話框,按下 ESC 以取消對話框。當對話框有多個分頁時,可以使用 ALT+F10 或是在對話框分頁順序中的一部份按下 TAB 以使用分頁列表。焦點在分頁列表上時,分別使用右方向鍵及左方向鍵移動到下一個及上一個分頁。"},{name:"編輯器內容功能表",legend:"請按下「${contextMenu}」或是「應用程式鍵」以開啟內容選單。以「TAB」或是「↓」鍵移動到下一個選單選項。以「SHIFT + TAB」或是「↑」鍵移動到上一個選單選項。按下「空白鍵」或是「ENTER」鍵以選取選單選項。以「空白鍵」或「ENTER」或「→」開啟目前選項之子選單。以「ESC」或「←」回到父選單。以「ESC」鍵關閉內容選單」。"}, 6 | {name:"編輯器清單方塊",legend:"在清單方塊中,使用 TAB 或下方向鍵移動到下一個列表項目。使用 SHIFT+TAB 或上方向鍵移動到上一個列表項目。按下空白鍵或 ENTER 以選取列表選項。按下 ESC 以關閉清單方塊。"},{name:"編輯器元件路徑工具列",legend:"請按 ${elementsPathFocus} 以瀏覽元素路徑列。利用 TAB 或右方向鍵以便移動到下一個元素按鈕。利用 SHIFT 或左方向鍵以便移動到上一個按鈕。按下空白鍵或 ENTER 鍵來選取在編輯器中的元素。"}]},{name:"命令",items:[{name:"復原命令",legend:"請按下「${undo}」"},{name:"重複命令",legend:"請按下「 ${redo}」"},{name:"粗體命令",legend:"請按下「${bold}」"},{name:"斜體",legend:"請按下「${italic}」"},{name:"底線命令",legend:"請按下「${underline}」"},{name:"連結",legend:"請按下「${link}」"}, 7 | {name:"隱藏工具列",legend:"請按下「${toolbarCollapse}」"},{name:"存取前一個焦點空間命令",legend:"請按下 ${accessPreviousSpace} 以存取最近但無法靠近之插字符號前的焦點空間。舉例:二個相鄰的 HR 元素。\r\n重複按鍵以存取較遠的焦點空間。"},{name:"存取下一個焦點空間命令",legend:"請按下 ${accessNextSpace} 以存取最近但無法靠近之插字符號後的焦點空間。舉例:二個相鄰的 HR 元素。\r\n重複按鍵以存取較遠的焦點空間。"},{name:"協助工具說明",legend:"請按下「${a11yHelp}」"}]}],backspace:"退格鍵",tab:"Tab",enter:"Enter",shift:"Shift",ctrl:"Ctrl",alt:"Alt",pause:"Pause",capslock:"Caps Lock",escape:"Esc",pageUp:"Page Up",pageDown:"Page Down",end:"End",home:"Home", 8 | leftArrow:"向左箭號",upArrow:"向上鍵號",rightArrow:"向右鍵號",downArrow:"向下鍵號",insert:"插入","delete":"刪除",leftWindowKey:"左方 Windows 鍵",rightWindowKey:"右方 Windows 鍵",selectKey:"選擇鍵",numpad0:"Numpad 0",numpad1:"Numpad 1",numpad2:"Numpad 2",numpad3:"Numpad 3",numpad4:"Numpad 4",numpad5:"Numpad 5",numpad6:"Numpad 6",numpad7:"Numpad 7",numpad8:"Numpad 8",numpad9:"Numpad 9",multiply:"乘號",add:"新增",subtract:"減號",decimalPoint:"小數點",divide:"除號",f1:"F1",f2:"F2",f3:"F3",f4:"F4",f5:"F5",f6:"F6",f7:"F7",f8:"F8",f9:"F9",f10:"F10", 9 | f11:"F11",f12:"F12",numLock:"Num Lock",scrollLock:"Scroll Lock",semiColon:"分號",equalSign:"等號",comma:"逗號",dash:"虛線",period:"句點",forwardSlash:"斜線",graveAccent:"抑音符號",openBracket:"左方括號",backSlash:"反斜線",closeBracket:"右方括號",singleQuote:"單引號"}); -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/skins/moono/readme.md: -------------------------------------------------------------------------------- 1 | "Moono" Skin 2 | ==================== 3 | 4 | This skin has been chosen for the **default skin** of CKEditor 4.x, elected from the CKEditor 5 | [skin contest](http://ckeditor.com/blog/new_ckeditor_4_skin) and further shaped by 6 | the CKEditor team. "Moono" is maintained by the core developers. 7 | 8 | For more information about skins, please check the [CKEditor Skin SDK](http://docs.cksource.com/CKEditor_4.x/Skin_SDK) 9 | documentation. 10 | 11 | Features 12 | ------------------- 13 | "Moono" is a monochromatic skin, which offers a modern look coupled with gradients and transparency. 14 | It comes with the following features: 15 | 16 | - Chameleon feature with brightness, 17 | - high-contrast compatibility, 18 | - graphics source provided in SVG. 19 | 20 | Directory Structure 21 | ------------------- 22 | 23 | CSS parts: 24 | - **editor.css**: the main CSS file. It's simply loading several other files, for easier maintenance, 25 | - **mainui.css**: the file contains styles of entire editor outline structures, 26 | - **toolbar.css**: the file contains styles of the editor toolbar space (top), 27 | - **richcombo.css**: the file contains styles of the rich combo ui elements on toolbar, 28 | - **panel.css**: the file contains styles of the rich combo drop-down, it's not loaded 29 | until the first panel open up, 30 | - **elementspath.css**: the file contains styles of the editor elements path bar (bottom), 31 | - **menu.css**: the file contains styles of all editor menus including context menu and button drop-down, 32 | it's not loaded until the first menu open up, 33 | - **dialog.css**: the CSS files for the dialog UI, it's not loaded until the first dialog open, 34 | - **reset.css**: the file defines the basis of style resets among all editor UI spaces, 35 | - **preset.css**: the file defines the default styles of some UI elements reflecting the skin preference, 36 | - **editor_XYZ.css** and **dialog_XYZ.css**: browser specific CSS hacks. 37 | 38 | Other parts: 39 | - **skin.js**: the only JavaScript part of the skin that registers the skin, its browser specific files and its icons and defines the Chameleon feature, 40 | - **icons/**: contains all skin defined icons, 41 | - **images/**: contains a fill general used images, 42 | - **dev/**: contains SVG source of the skin icons. 43 | 44 | License 45 | ------- 46 | 47 | Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. 48 | 49 | For licensing, see LICENSE.md or [http://ckeditor.com/license](http://ckeditor.com/license) 50 | -------------------------------------------------------------------------------- /symbol/template.go: -------------------------------------------------------------------------------- 1 | package symbol 2 | 3 | import ( 4 | "bytes" 5 | "log" 6 | "os" 7 | "os/exec" 8 | "path" 9 | "reflect" 10 | "strconv" 11 | "text/template" 12 | ) 13 | 14 | var ( 15 | delimeter_begin = "[[" 16 | delimeter_end = "]]" 17 | extends = map[string]interface{}{ 18 | "set": func(renderArgs map[string]interface{}, key string, value interface{}) string { 19 | renderArgs[key] = value 20 | return "" 21 | }, 22 | } 23 | ) 24 | 25 | func Template(fpath string) (*template.Template, error) { 26 | _, name := path.Split(fpath) 27 | return template.New(name).Funcs(extends).Delims(delimeter_begin, delimeter_end).ParseFiles(fpath) 28 | } 29 | 30 | func RenderString(src string, data interface{}) (string, error) { 31 | t, err := template.New("str").Funcs(extends).Delims(delimeter_begin, delimeter_end).Parse(src) 32 | if err != nil { 33 | return "", err 34 | } 35 | 36 | b := bytes.NewBufferString("") 37 | if err := t.Execute(b, data); err != nil { 38 | return "", err 39 | } 40 | 41 | return b.String(), nil 42 | } 43 | 44 | func RenderTemplate(src, dest string, data interface{}, force bool) error { 45 | if IsFileExist(dest) && force == false { 46 | return nil 47 | } 48 | 49 | t, err := Template(src) 50 | if err != nil { 51 | return err 52 | } 53 | 54 | dir, _ := path.Split(dest) 55 | if err := os.MkdirAll(dir, os.ModePerm); err != nil { 56 | return err 57 | } 58 | 59 | tmp := dest + ".tmp" 60 | fd, err := os.Create(tmp) 61 | if err != nil { 62 | return err 63 | } 64 | defer fd.Close() 65 | 66 | if err = t.Execute(fd, data); err != nil { 67 | return err 68 | } 69 | 70 | if err := os.Rename(tmp, dest); err != nil { 71 | return err 72 | } 73 | 74 | log.Println("render file => ", dest) 75 | //goimports 76 | gofmt := exec.Command("gofmt", "-w", dest) 77 | gofmt.Run() 78 | 79 | goimports := exec.Command("goimports", "-w", dest) 80 | goimports.Run() 81 | return nil 82 | } 83 | 84 | func Extend(name string, fn interface{}) { 85 | if reflect.TypeOf(fn).Kind() == reflect.Func { 86 | extends[name] = fn 87 | } 88 | } 89 | 90 | func init() { 91 | Extend("camel", Camel) 92 | Extend("plural", Plural) 93 | Extend("singular", Singular) 94 | Extend("separate", Separate) 95 | Extend("lint", Lint) 96 | Extend("quote", strconv.Quote) 97 | Extend("convert", Convert) 98 | Extend("module", ModuleName) 99 | Extend("class", ClassName) 100 | Extend("add", Add) 101 | Extend("sub", Sub) 102 | Extend("divide", Divide) 103 | Extend("multiply", Multiply) 104 | } 105 | -------------------------------------------------------------------------------- /README.en.md: -------------------------------------------------------------------------------- 1 | scaffold 2 | === 3 | 4 | code generator for go, based on database schema definitions. 5 | 6 | ### How does it work? 7 | 8 | Just like golang json encoding, when you want to marshal/unmarshal an object to json string, we add tag description for the object field. As an example: 9 | 10 | ````go 11 | type JsonSomething struct{ 12 | AField int64 `json:"x"` 13 | BField string `json:"y"` 14 | } 15 | ```` 16 | Similarly, scaffold use database table schemas' field comment as the tag description for generating code. For example, 17 | 18 | ````sql 19 | CREATE TABLE `user_accounts` ( 20 | `id` INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT COMMENT 'caption:"No"', 21 | `name` VARCHAR(32) NOT NULL DEFAULT '' COMMENT 'caption:"Name" column:"y" update:"y" query:"like" widget:"text" valid:"required(),min(6),max(16)"', 22 | `mailbox` VARCHAR(128) NOT NULL DEFAULT '' COMMENT 'caption:"Email" column:"y" query:"like" widget:"email" valid:"required(),email()"', 23 | `sex` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'caption:"Sex" column:"y" update:"y" widget:"selection" relation:"user_accounts_sex"', 24 | `description` VARCHAR(256) NOT NULL DEFAULT '' COMMENT 'caption:"Description" update:"y" widget:"textarea"', 25 | `password` VARCHAR(32) NOT NULL DEFAULT '' COMMENT 'caption:"Password" update:"y" widget:"password" valid:"required()"', 26 | `head_url` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'caption:"Header Image" update:"y" widget:"file"', 27 | `status` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'caption:"Status" column:"y" update:"y" query:"eq" widget:"selection" relation:"user_accounts_status"', 28 | `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'caption:"Create Time" widget:"datetime"', 29 | `updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'caption:"Update Time" column:"y" widget:"datetime"', 30 | `deleted_at` TIMESTAMP NULL DEFAULT NULL COMMENT 'caption:"Delete Time" gotype:"*time.Time" ignore:"y" widget:"datetime"' 31 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT 'caption:"Members" index:"y" import:"y" export:"y"'; 32 | 33 | ```` 34 | This looks a little more complex, it's for the portal templates which can read all tags for generating a portal project, which is an administrator dash board project providing CRUD functions for management. 35 | 36 | This is one table schema definition with comments. scaffold can use these comments to generate codes now. Of course, scaffold generate code must use some templates, now scaffold project provide the following -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/contents.css: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | 6 | body 7 | { 8 | /* Font */ 9 | font-family: sans-serif, Arial, Verdana, "Trebuchet MS"; 10 | font-size: 12px; 11 | 12 | /* Text color */ 13 | color: #333; 14 | 15 | /* Remove the background color to make it transparent */ 16 | background-color: #fff; 17 | 18 | margin: 20px; 19 | } 20 | 21 | .cke_editable 22 | { 23 | font-size: 13px; 24 | line-height: 1.6; 25 | } 26 | 27 | blockquote 28 | { 29 | font-style: italic; 30 | font-family: Georgia, Times, "Times New Roman", serif; 31 | padding: 2px 0; 32 | border-style: solid; 33 | border-color: #ccc; 34 | border-width: 0; 35 | } 36 | 37 | .cke_contents_ltr blockquote 38 | { 39 | padding-left: 20px; 40 | padding-right: 8px; 41 | border-left-width: 5px; 42 | } 43 | 44 | .cke_contents_rtl blockquote 45 | { 46 | padding-left: 8px; 47 | padding-right: 20px; 48 | border-right-width: 5px; 49 | } 50 | 51 | a 52 | { 53 | color: #0782C1; 54 | } 55 | 56 | ol,ul,dl 57 | { 58 | /* IE7: reset rtl list margin. (#7334) */ 59 | *margin-right: 0px; 60 | /* preserved spaces for list items with text direction other than the list. (#6249,#8049)*/ 61 | padding: 0 40px; 62 | } 63 | 64 | h1,h2,h3,h4,h5,h6 65 | { 66 | font-weight: normal; 67 | line-height: 1.2; 68 | } 69 | 70 | hr 71 | { 72 | border: 0px; 73 | border-top: 1px solid #ccc; 74 | } 75 | 76 | img.right 77 | { 78 | border: 1px solid #ccc; 79 | float: right; 80 | margin-left: 15px; 81 | padding: 5px; 82 | } 83 | 84 | img.left 85 | { 86 | border: 1px solid #ccc; 87 | float: left; 88 | margin-right: 15px; 89 | padding: 5px; 90 | } 91 | 92 | pre 93 | { 94 | white-space: pre-wrap; /* CSS 2.1 */ 95 | word-wrap: break-word; /* IE7 */ 96 | -moz-tab-size: 4; 97 | tab-size: 4; 98 | } 99 | 100 | .marker 101 | { 102 | background-color: Yellow; 103 | } 104 | 105 | span[lang] 106 | { 107 | font-style: italic; 108 | } 109 | 110 | figure 111 | { 112 | text-align: center; 113 | border: solid 1px #ccc; 114 | border-radius: 2px; 115 | background: rgba(0,0,0,0.05); 116 | padding: 10px; 117 | margin: 10px 20px; 118 | display: inline-block; 119 | } 120 | 121 | figure > figcaption 122 | { 123 | text-align: center; 124 | display: block; /* For IE8 */ 125 | } 126 | 127 | a > img { 128 | padding: 1px; 129 | margin: 1px; 130 | border: none; 131 | outline: 1px solid #0782C1; 132 | } 133 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/samples/old/tabindex.html: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | TAB Key-Based Navigation — CKEditor Sample 10 | 11 | 12 | 22 | 42 | 43 | 44 |

45 | CKEditor Samples » TAB Key-Based Navigation 46 |

47 |
48 | This sample is not maintained anymore. Check out its brand new version in CKEditor SDK. 49 |
50 |
51 |

52 | This sample shows how tab key navigation among editor instances is 53 | affected by the tabIndex attribute from 54 | the original page element. Use TAB key to move between the editors. 55 |

56 |
57 |

58 | 59 |

60 |
61 |

62 | 63 |

64 |

65 | 66 |

67 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /doc/template.md: -------------------------------------------------------------------------------- 1 | ### 模板定义 2 | 3 | scaffold 模板支持所有 golang 中 text/template 包提供的模版功能。同时还增加了以下特性: 4 | 5 | - 模板分割符 6 | 7 | 使用"[["与"]]". 8 | 9 | - 模板函数: 10 | 11 | - 驼峰函数(camel) 12 | ````go 13 | 转化例子: users => Users 14 | ```` 15 | - 复数函数(plural) 16 | ````go 17 | user => users 18 | ```` 19 | - 单数函数(singular) 20 | ````go 21 | users => user 22 | ```` 23 | - 函数(lint) 24 | 25 | - 函数(quote) 26 | ````go 27 | users => "users" 28 | ```` 29 | - 函数(convert) 30 | 31 | 主要用于数据库字段类型的转化 32 | ````go 33 | covert("mysql", "tinyint", "") => int64 34 | ```` 35 | - 函数(module) 36 | ````go 37 | user_accounts => user.account 38 | ```` 39 | - 函数(class) 40 | ````go 41 | user_accounts => UserAccount 42 | ```` 43 | - 加函数(add) 44 | - 减函数(sub) 45 | - 乘函数(multiply) 46 | - 除函数(divide) 47 | 48 | - 模板数据 49 | 50 | - 表对象接口 51 | 52 | ```` 53 | table.Name() => 返回表格名 54 | table.Columns() => 返回表格所有列表对象 55 | table.Column(name string) => 返回表格指定列表对象 56 | table.Comment() => 返回表格注释 57 | table.Tag(tag string) => 返回表格注释中指定tag 58 | ```` 59 | 60 | - 列表对象接口 61 | ```` 62 | column.Name() => 返回列表名 63 | column.Type() => 返回列表类型 64 | column.Comment() => 返回列表注释 65 | column.Tag(tag string) => 返回表格注释中指定tag 66 | ```` 67 | 68 | ````go 69 | data := map[string]interface{}{ 70 | "project": "path/to/project", //!用户调用命令输入的生成项目路径, 71 | "tables": tables, //!用户定义的所有数据库表结构定义数组, 72 | "table": table, //!当前模板使用的表结构定义, 73 | "index": index, //!当前模板使用的表结构位置, 74 | } 75 | ```` 76 | 77 | 例子: 根据数据库表定义生成model定义代码,模板定义如下: 78 | 79 | 生成单个文件模板: 80 | 81 | 模板名: models.go 82 | 83 | 模板内容: 84 | 85 | ````go 86 | package model 87 | 88 | import ( 89 | "time" 90 | ) 91 | 92 | [[range .tables]] 93 | //! [[.Tag "caption"]] 94 | type [[.Name | singular | camel]] struct { 95 | [[range .Columns]] 96 | [[.Field | camel | lint]] [[convert "mysql" .Type (.Tag "gotype")]] `db:"[[.Field]]" json:"[[.Field]]"`[[end]] 97 | } 98 | 99 | func (obj [[.Name | singular | camel]]) TableName() string { 100 | return "[[.Name]]" 101 | } 102 | [[end]] 103 | 104 | ```` 105 | 106 | 生成多个文件模板: 107 | 108 | 模板名: model.[[.table.Name | module]].go 109 | 110 | 模板内容: 111 | 112 | ````go 113 | package model 114 | [[set . "t_class" (.table.Name | singular | camel)]] 115 | import ( 116 | "time" 117 | ) 118 | 119 | //! [[.table.Tag "caption"]] 120 | type [[.t_class]] struct { 121 | [[range .table.Columns]] 122 | [[.Field | camel | lint]] [[convert "mysql" .Type (.Tag "gotype")]] `db:"[[.Field]]" json:"[[.Field]]"`[[end]] 123 | } 124 | 125 | func (obj [[.t_class]]) TableName() string { 126 | return "[[.table.Name]]" 127 | } 128 | 129 | ```` -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/specialchar/dialogs/lang/ko.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang("specialchar","ko",{euro:"유로화 기호",lsquo:"왼쪽 외 따옴표",rsquo:"오른쪽 외 따옴표",ldquo:"왼쪽 쌍 따옴표",rdquo:"오른쪽 쌍 따옴표",ndash:"반각 대시",mdash:"전각 대시",iexcl:"반전된 느낌표",cent:"센트 기호",pound:"파운드화 기호",curren:"커런시 기호",yen:"위안화 기호",brvbar:"Broken bar",sect:"섹션 기호",uml:"분음 부호",copy:"저작권 기호",ordf:"Feminine ordinal indicator",laquo:"왼쪽 쌍꺽쇠 인용 부호",not:"금지 기호",reg:"등록 기호",macr:"장음 기호",deg:"도 기호",sup2:"위첨자 2",sup3:"위첨자 3",acute:"양음 악센트 부호",micro:"마이크로 기호",para:"단락 기호",middot:"가운데 점",cedil:"세디유",sup1:"위첨자 1", 6 | ordm:"Masculine ordinal indicator",raquo:"오른쪽 쌍꺽쇠 인용 부호",frac14:"분수 사분의 일",frac12:"분수 이분의 일",frac34:"분수 사분의 삼",iquest:"뒤집힌 물음표",Agrave:"억음 부호가 있는 라틴 대문자 A",Aacute:"양음 악센트 부호가 있는 라틴 대문자 A",Acirc:"곡절 악센트 부호가 있는 라틴 대문자 A",Atilde:"틸데가 있는 라틴 대문자 A",Auml:"분음 기호가 있는 라틴 대문자 A",Aring:"윗고리가 있는 라틴 대문자 A",AElig:"라틴 대문자 Æ",Ccedil:"세디유가 있는 라틴 대문자 C",Egrave:"억음 부호가 있는 라틴 대문자 E",Eacute:"양음 악센트 부호가 있는 라틴 대문자 E",Ecirc:"곡절 악센트 부호가 있는 라틴 대문자 E",Euml:"분음 기호가 있는 라틴 대문자 E",Igrave:"억음 부호가 있는 라틴 대문자 I",Iacute:"양음 악센트 부호가 있는 라틴 대문자 I", 7 | Icirc:"곡절 악센트 부호가 있는 라틴 대문자 I",Iuml:"분음 기호가 있는 라틴 대문자 I",ETH:"라틴 대문자 Eth",Ntilde:"틸데가 있는 라틴 대문자 N",Ograve:"억음 부호가 있는 라틴 대문자 O",Oacute:"양음 부호가 있는 라틴 대문자 O",Ocirc:"곡절 악센트 부호가 있는 라틴 대문자 O",Otilde:"틸데가 있는 라틴 대문자 O",Ouml:"분음 기호가 있는 라틴 대문자 O",times:"곱하기 기호",Oslash:"사선이 있는 라틴 대문자 O",Ugrave:"억음 부호가 있는 라틴 대문자 U",Uacute:"양음 부호가 있는 라틴 대문자 U",Ucirc:"곡절 악센트 부호가 있는 라틴 대문자 U",Uuml:"분음 기호가 있는 라틴 대문자 U",Yacute:"양음 부호가 있는 라틴 대문자 Y",THORN:"라틴 대문자 Thorn",szlig:"라틴 소문자 sharp s",agrave:"억음 부호가 있는 라틴 소문자 a",aacute:"양음 부호가 있는 라틴 소문자 a", 8 | acirc:"곡절 악센트 부호가 있는 라틴 소문자 a",atilde:"틸데가 있는 라틴 소문자 a",auml:"분음 기호가 있는 라틴 소문자 a",aring:"윗고리가 있는 라틴 소문자 a",aelig:"라틴 소문자 æ",ccedil:"세디유가 있는 라틴 소문자 c",egrave:"억음 부호가 있는 라틴 소문자 e",eacute:"양음 부호가 있는 라틴 소문자 e",ecirc:"곡절 악센트 부호가 있는 라틴 소문자 e",euml:"분음 기호가 있는 라틴 소문자 e",igrave:"억음 부호가 있는 라틴 소문자 i",iacute:"양음 부호가 있는 라틴 소문자 i",icirc:"곡절 악센트 부호가 있는 라틴 소문자 i",iuml:"분음 기호가 있는 라틴 소문자 i",eth:"라틴 소문자 eth",ntilde:"틸데가 있는 라틴 소문자 n",ograve:"억음 부호가 있는 라틴 소문자 o",oacute:"양음 부호가 있는 라틴 소문자 o",ocirc:"곡절 악센트 부호가 있는 라틴 소문자 o", 9 | otilde:"틸데가 있는 라틴 소문자 o",ouml:"분음 기호가 있는 라틴 소문자 o",divide:"나누기 기호",oslash:"사선이 있는 라틴 소문자 o",ugrave:"억음 부호가 있는 라틴 소문자 u",uacute:"양음 부호가 있는 라틴 소문자 u",ucirc:"곡절 악센트 부호가 있는 라틴 소문자 u",uuml:"분음 기호가 있는 라틴 소문자 u",yacute:"양음 부호가 있는 라틴 소문자 y",thorn:"라틴 소문자 thorn",yuml:"분음 기호가 있는 라틴 소문자 y",OElig:"라틴 대문합자 OE",oelig:"라틴 소문합자 oe",372:"곡절 악센트 부호가 있는 라틴 대문자 W",374:"곡절 악센트 부호가 있는 라틴 대문자 Y",373:"곡절 악센트 부호가 있는 라틴 소문자 w",375:"곡절 악센트 부호가 있는 라틴 소문자 y",sbquo:"외 아래-9 인용 부호",8219:"외 위쪽-뒤집힌-9 인용 부호",bdquo:"쌍 아래-9 인용 부호",hellip:"수평 생략 부호", 10 | trade:"상표 기호",9658:"검정 오른쪽 포인터",bull:"큰 점",rarr:"오른쪽 화살표",rArr:"오른쪽 두 줄 화살표",hArr:"양쪽 두 줄 화살표",diams:"검정 다이아몬드",asymp:"근사"}); -------------------------------------------------------------------------------- /templates/portal/conf/routes: -------------------------------------------------------------------------------- 1 | # routes 2 | module:testrunner 3 | 4 | # static 5 | GET /favicon.ico 404 6 | GET /public/*filepath Static.Serve("public") 7 | GET /upload/*filepath Static.Serve("upload") 8 | 9 | # portal 10 | GET / PortalController.Index 11 | 12 | # auth 13 | GET /auth.logout AuthController.Logout 14 | GET /auth.login AuthController.Login 15 | POST /auth.login AuthController.LoginPost 16 | GET /auth.password AuthController.Password 17 | POST /auth.password AuthController.PasswordPost 18 | 19 | # widget 20 | GET /widget.index WidgetController.Index 21 | GET /widget.upload WidgetController.Upload 22 | POST /widget.upload WidgetController.UploadPost 23 | GET /widget.editor WidgetController.Editor 24 | POST /widget.editor WidgetController.EditorPost 25 | POST /widget.system.option WidgetController.SystemOptionPost 26 | POST /widget.table.object WidgetController.TableObjectPost 27 | POST /widget.many.create WidgetController.ManyCreatePost 28 | POST /widget.many.remove WidgetController.ManyRemovePost 29 | POST /widget.many.append WidgetController.ManyAppendPost 30 | 31 | [[range .tables]] 32 | # [[.Name | module]] 33 | GET /[[.Name | module]].index [[.Name | class]]Controller.Index 34 | POST /[[.Name | module]].query [[.Name | class]]Controller.Query 35 | POST /[[.Name | module]].finder.index [[.Name | class]]Controller.FinderIndex 36 | POST /[[.Name | module]].finder.query [[.Name | class]]Controller.FinderQuery 37 | GET /[[.Name | module]].detail/:id [[.Name | class]]Controller.Detail 38 | GET /[[.Name | module]].create [[.Name | class]]Controller.Create 39 | POST /[[.Name | module]].create [[.Name | class]]Controller.CreatePost 40 | GET /[[.Name | module]].update/:id [[.Name | class]]Controller.Update 41 | POST /[[.Name | module]].update [[.Name | class]]Controller.UpdatePost 42 | GET /[[.Name | module]].remove/:id [[.Name | class]]Controller.Remove 43 | POST /[[.Name | module]].remove [[.Name | class]]Controller.RemovePost 44 | [[if eq (.Tag "import") "y"]] 45 | POST /[[.Name | module]].import [[.Name | class]]Controller.ImportPost 46 | [[end]] 47 | [[if eq (.Tag "export") "y"]] 48 | POST /[[.Name | module]].export [[.Name | class]]Controller.ExportPost 49 | [[end]] 50 | [[end]] 51 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.dialog.add("a11yHelp",function(l){var a=l.lang.a11yhelp,n=CKEDITOR.tools.getNextId(),e={8:a.backspace,9:a.tab,13:a.enter,16:a.shift,17:a.ctrl,18:a.alt,19:a.pause,20:a.capslock,27:a.escape,33:a.pageUp,34:a.pageDown,35:a.end,36:a.home,37:a.leftArrow,38:a.upArrow,39:a.rightArrow,40:a.downArrow,45:a.insert,46:a["delete"],91:a.leftWindowKey,92:a.rightWindowKey,93:a.selectKey,96:a.numpad0,97:a.numpad1,98:a.numpad2,99:a.numpad3,100:a.numpad4,101:a.numpad5,102:a.numpad6,103:a.numpad7,104:a.numpad8, 6 | 105:a.numpad9,106:a.multiply,107:a.add,109:a.subtract,110:a.decimalPoint,111:a.divide,112:a.f1,113:a.f2,114:a.f3,115:a.f4,116:a.f5,117:a.f6,118:a.f7,119:a.f8,120:a.f9,121:a.f10,122:a.f11,123:a.f12,144:a.numLock,145:a.scrollLock,186:a.semiColon,187:a.equalSign,188:a.comma,189:a.dash,190:a.period,191:a.forwardSlash,192:a.graveAccent,219:a.openBracket,220:a.backSlash,221:a.closeBracket,222:a.singleQuote};e[CKEDITOR.ALT]=a.alt;e[CKEDITOR.SHIFT]=a.shift;e[CKEDITOR.CTRL]=a.ctrl;var f=[CKEDITOR.ALT,CKEDITOR.SHIFT, 7 | CKEDITOR.CTRL],p=/\$\{(.*?)\}/g,t=function(){var a=l.keystrokeHandler.keystrokes,g={},c;for(c in a)g[a[c]]=c;return function(a,c){var b;if(g[c]){b=g[c];for(var h,k,m=[],d=0;d=h&&(b-=k,m.push(e[k]));m.push(e[b]||String.fromCharCode(b));b=m.join("+")}else b=a;return b}}();return{title:a.title,minWidth:600,minHeight:400,contents:[{id:"info",label:l.lang.common.generalTab,expand:!0,elements:[{type:"html",id:"legends",style:"white-space:normal;",focus:function(){this.getElement().focus()}, 8 | html:function(){for(var e='\x3cdiv class\x3d"cke_accessibility_legend" role\x3d"document" aria-labelledby\x3d"'+n+'_arialbl" tabIndex\x3d"-1"\x3e%1\x3c/div\x3e\x3cspan id\x3d"'+n+'_arialbl" class\x3d"cke_voice_label"\x3e'+a.contents+" \x3c/span\x3e",g=[],c=a.legend,l=c.length,f=0;f--help for options. 12 | 13 | ### Go to http://localhost:9000/ and you'll see: 14 | 15 | "It works" 16 | 17 | ### Description of Contents 18 | 19 | The default directory structure of a generated Revel application: 20 | 21 | myapp App root 22 | app App sources 23 | controllers App controllers 24 | init.go Interceptor registration 25 | models App domain models 26 | routes Reverse routes (generated code) 27 | views Templates 28 | tests Test suites 29 | conf Configuration files 30 | app.conf Main configuration file 31 | routes Routes definition 32 | messages Message files 33 | public Public assets 34 | css CSS files 35 | js Javascript files 36 | images Image files 37 | 38 | app 39 | 40 | The app directory contains the source code and templates for your application. 41 | 42 | conf 43 | 44 | The conf directory contains the application’s configuration files. There are two main configuration files: 45 | 46 | * app.conf, the main configuration file for the application, which contains standard configuration parameters 47 | * routes, the routes definition file. 48 | 49 | 50 | messages 51 | 52 | The messages directory contains all localized message files. 53 | 54 | public 55 | 56 | Resources stored in the public directory are static assets that are served directly by the Web server. Typically it is split into three standard sub-directories for images, CSS stylesheets and JavaScript files. 57 | 58 | The names of these directories may be anything; the developer need only update the routes. 59 | 60 | test 61 | 62 | Tests are kept in the tests directory. Revel provides a testing framework that makes it easy to write and run functional tests against your application. 63 | 64 | ### Follow the guidelines to start developing your application: 65 | 66 | * The README file created within your application. 67 | * The [Getting Started with Revel](http://revel.github.io/tutorial/index.html). 68 | * The [Revel guides](http://revel.github.io/manual/index.html). 69 | * The [Revel sample apps](http://revel.github.io/samples/index.html). 70 | * The [API documentation](http://revel.github.io/docs/godoc/index.html). 71 | 72 | ## Contributing 73 | We encourage you to contribute to Revel! Please check out the [Contributing to Revel 74 | guide](https://github.com/revel/revel/blob/master/CONTRIBUTING.md) for guidelines about how 75 | to proceed. [Join us](https://groups.google.com/forum/#!forum/revel-framework)! 76 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/samples/old/uicolor.html: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | UI Color Picker — CKEditor Sample 10 | 11 | 12 | 13 | 14 |

15 | CKEditor Samples » UI Color 16 |

17 |
18 | This sample is not maintained anymore. Check out its brand new version in CKEditor SDK. 19 |
20 |
21 |

22 | This sample shows how to automatically replace <textarea> elements 23 | with a CKEditor instance with an option to change the color of its user interface.
24 | Note:The UI skin color feature depends on the CKEditor skin 25 | compatibility. The Moono and Kama skins are examples of skins that work with it. 26 |

27 |
28 |
29 |

30 | This editor instance has a UI color value defined in configuration to change the skin color, 31 | To specify the color of the user interface, set the uiColor property: 32 |

33 |
34 | CKEDITOR.replace( 'textarea_id', {
35 | 	uiColor: '#14B8C4'
36 | });
37 |

38 | Note that textarea_id in the code above is the id attribute of 39 | the <textarea> element to be replaced. 40 |

41 |

42 | 43 | 56 |

57 |

58 | 59 |

60 |
61 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/liststyle/dialogs/liststyle.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | (function(){function d(c,d){var b;try{b=c.getSelection().getRanges()[0]}catch(f){return null}b.shrink(CKEDITOR.SHRINK_TEXT);return c.elementPath(b.getCommonAncestor()).contains(d,1)}function e(c,e){var b=c.lang.liststyle;if("bulletedListStyle"==e)return{title:b.bulletedTitle,minWidth:300,minHeight:50,contents:[{id:"info",accessKey:"I",elements:[{type:"select",label:b.type,id:"type",align:"center",style:"width:150px",items:[[b.notset,""],[b.circle,"circle"],[b.disc,"disc"],[b.square,"square"]],setup:function(a){a= 6 | a.getStyle("list-style-type")||h[a.getAttribute("type")]||a.getAttribute("type")||"";this.setValue(a)},commit:function(a){var b=this.getValue();b?a.setStyle("list-style-type",b):a.removeStyle("list-style-type")}}]}],onShow:function(){var a=this.getParentEditor();(a=d(a,"ul"))&&this.setupContent(a)},onOk:function(){var a=this.getParentEditor();(a=d(a,"ul"))&&this.commitContent(a)}};if("numberedListStyle"==e){var g=[[b.notset,""],[b.lowerRoman,"lower-roman"],[b.upperRoman,"upper-roman"],[b.lowerAlpha, 7 | "lower-alpha"],[b.upperAlpha,"upper-alpha"],[b.decimal,"decimal"]];(!CKEDITOR.env.ie||7 4 | 8 |
9 |
text
10 |
11 | 12 | {{widget "text" "w" "foo-text" "123456"}} 13 |
14 |
15 |
16 |
number
17 |
18 | 19 | {{widget "number" "w" "foo-number" 8}} 20 |
21 |
22 |
23 |
currency
24 |
25 | 26 | {{widget "currency" "w" "foo-currency" 8}} 27 |
28 |
29 |
30 |
password
31 |
32 | 33 | {{widget "password" "w" "foo-password" "123456"}} 34 |
35 |
36 |
37 |
email
38 |
39 | 40 | {{widget "email" "w" "foo-email" "bar@sina.com"}} 41 |
42 |
43 |
44 |
datetime
45 |
46 | 47 | {{widget "datetime" "w" "foo-datetime" ""}} 48 |
49 |
50 |
51 |
finder
52 |
53 | 54 | {{widget "finder" "w" "foo-finder" "bar" "order"}} 55 |
56 |
57 |
58 |
file
59 |
60 | 61 | {{widget "file" "w" "foo-file" "bar"}} 62 |
63 |
64 |
65 |
textarea
66 |
67 | 68 | {{widget "textarea" "w" "foo-textarea" "bar"}} 69 |
70 |
71 |
72 |
unknown
73 |
74 | 75 | {{widget "unknown" "w" "foo" "bar"}} 76 |
77 |
78 |
79 | {{template "footer" .}} 80 | -------------------------------------------------------------------------------- /templates/portal/app/models/base.db.expression.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "fmt" 5 | "strings" 6 | ) 7 | 8 | type Expression struct { 9 | field string 10 | symbol string 11 | value interface{} 12 | } 13 | 14 | func BinaryExpression(field, symbol string, value interface{}) Expression { 15 | switch strings.ToUpper(symbol) { 16 | case "LIKE": 17 | return LIKE(field, value) 18 | case "LLIKE": 19 | return LLIKE(field, value) 20 | case "RLIKE": 21 | return RLIKE(field, value) 22 | case "EQ": 23 | return EQ(field, value) 24 | case "NE": 25 | return NE(field, value) 26 | case "IN": 27 | return IN(field, value) 28 | case "GT": 29 | return GT(field, value) 30 | case "GE": 31 | return GE(field, value) 32 | case "LT": 33 | return LT(field, value) 34 | case "LE": 35 | return LE(field, value) 36 | } 37 | return NONE(field, value) 38 | } 39 | 40 | func (exp Expression) Statment() (format string, data interface{}) { 41 | format = fmt.Sprintf("%s %s ?", exp.field, exp.symbol) 42 | data = exp.value 43 | return 44 | } 45 | 46 | func NONE(field string, value interface{}) Expression { 47 | return Expression{ 48 | field: "", 49 | symbol: "", 50 | value: "", 51 | } 52 | } 53 | 54 | func LIKE(field string, value interface{}) Expression { 55 | return Expression{ 56 | field: field, 57 | symbol: "LIKE", 58 | value: fmt.Sprintf("%%%s%%", value), 59 | } 60 | } 61 | 62 | func LLIKE(field string, value interface{}) Expression { 63 | return Expression{ 64 | field: field, 65 | symbol: "LIKE", 66 | value: fmt.Sprintf("%%%s", value), 67 | } 68 | } 69 | 70 | func RLIKE(field string, value interface{}) Expression { 71 | return Expression{ 72 | field: field, 73 | symbol: "LIKE", 74 | value: fmt.Sprintf("%s%%", value), 75 | } 76 | } 77 | 78 | func EQ(field string, value interface{}) Expression { 79 | return Expression{ 80 | field: field, 81 | symbol: "=", 82 | value: value, 83 | } 84 | } 85 | 86 | func NE(field string, value interface{}) Expression { 87 | return Expression{ 88 | field: field, 89 | symbol: "!=", 90 | value: value, 91 | } 92 | } 93 | 94 | func IN(field string, value interface{}) Expression { 95 | return Expression{ 96 | field: field, 97 | symbol: "IN", 98 | value: value, 99 | } 100 | } 101 | 102 | func GT(field string, value interface{}) Expression { 103 | return Expression{ 104 | field: field, 105 | symbol: ">", 106 | value: value, 107 | } 108 | } 109 | 110 | func GE(field string, value interface{}) Expression { 111 | return Expression{ 112 | field: field, 113 | symbol: ">=", 114 | value: value, 115 | } 116 | } 117 | 118 | func LT(field string, value interface{}) Expression { 119 | return Expression{ 120 | field: field, 121 | symbol: "<", 122 | value: value, 123 | } 124 | } 125 | 126 | func LE(field string, value interface{}) Expression { 127 | return Expression{ 128 | field: field, 129 | symbol: "<=", 130 | value: value, 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /templates/portal/app/views/view.[[.table.Name | module]]/query.html: -------------------------------------------------------------------------------- 1 | [[set . "t_module" (.table.Name | module)]] 2 | [[set . "t_class" (.table.Name | class)]] 3 | 4 | {{if .flash.success}} 5 |
6 | 9 | Success! {{.flash.success}} 10 |
11 | {{end}} 12 | 13 | {{if .flash.error}} 14 |
15 | 18 | Warning! {{.flash.error}} 19 |
20 | {{end}} 21 | 22 | 23 | 24 |
25 |
26 | 27 | {{if not .items}} 28 |

暂无有效记录。

29 | {{else}} 30 | 31 | 32 | 33 | 34 | [[range .table.Columns]][[if eq (.Tag "column") "y"]] 35 | [[end]][[end]] 36 | 37 | 38 | 39 | {{range $k, $v := .items}} 40 | 41 | [[with .table.PrimaryColumn]] 42 | 44 | 49 | [[end]] 50 | [[range .table.Columns]][[if eq (.Tag "column") "y"]] 51 | 54 | [[end]][[end]] 55 | 65 | 66 | {{end}} 67 | 68 | 69 | 70 | 71 | 72 | 73 |
[[.table.PrimaryColumn.Tag "caption"]][[.Tag "caption"]]操作
{{widget "checkbox" "w" "[[.Field]][]" .[[.Field | camel | lint]] [[if ne (.Tag "relation") ""]] "[[.Tag "relation"]]"[[end]] [[if ne (.Tag "field") ""]] "[[.Tag "field"]]"[[end]]}} 43 | 45 | 46 | {{.[[.Field | camel | lint]]}} 47 | 48 | 52 | {{widget "[[.Tag "widget"]]" "r" (printf "query.[[.Field]].%d" $k) $v.[[.Field | camel | lint]] [[if ne (.Tag "relation") ""]] "[[.Tag "relation"]]"[[end]] [[if ne (.Tag "field") ""]] "[[.Tag "field"]]"[[end]]}} 53 | 56 |
57 | 60 | 63 |
64 |
一共有{{.total}}记录。
74 | {{.pagination}} 75 | {{end}} 76 |
77 |
78 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/samples/old/ajax.html: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | Ajax — CKEditor Sample 10 | 11 | 12 | 40 | 41 | 42 |

43 | CKEditor Samples » Create and Destroy Editor Instances for Ajax Applications 44 |

45 |
46 | This sample is not maintained anymore. Check out its brand new version in CKEditor SDK. 47 |
48 |
49 |

50 | This sample shows how to create and destroy CKEditor instances on the fly. After the removal of CKEditor the content created inside the editing 51 | area will be displayed in a <div> element. 52 |

53 |

54 | For details of how to create this setup check the source code of this sample page 55 | for JavaScript code responsible for the creation and destruction of a CKEditor instance. 56 |

57 |
58 |

Click the buttons to create and remove a CKEditor instance.

59 |

60 | 61 | 62 |

63 | 64 |
65 |
66 | 74 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang("a11yhelp","ja",{title:"ユーザー補助の説明",contents:"ヘルプ このダイアログを閉じるには ESCを押してください。",legend:[{name:"全般",items:[{name:"エディターツールバー",legend:"${toolbarFocus} を押すとツールバーのオン/オフ操作ができます。カーソルをツールバーのグループで移動させるにはTabかSHIFT+Tabを押します。グループ内でカーソルを移動させるには、右カーソルか左カーソルを押します。スペースキーやエンターを押すとボタンを有効/無効にすることができます。"},{name:"編集ダイアログ",legend:"Inside a dialog, press TAB to navigate to the next dialog element, press SHIFT+TAB to move to the previous dialog element, press ENTER to submit the dialog, press ESC to cancel the dialog. When a dialog has multiple tabs, the tab list can be reached either with ALT+F10 or with TAB as part of the dialog tabbing order. With tab list focused, move to the next and previous tab with RIGHT and LEFT ARROW, respectively."}, 6 | {name:"エディターのメニュー",legend:"${contextMenu} キーかAPPLICATION KEYを押すとコンテキストメニューが開きます。Tabか下カーソルでメニューのオプション選択が下に移動します。戻るには、SHIFT+Tabか上カーソルです。スペースもしくはENTERキーでメニューオプションを決定できます。現在選んでいるオプションのサブメニューを開くには、スペース、もしくは右カーソルを押します。サブメニューから親メニューに戻るには、ESCか左カーソルを押してください。ESCでコンテキストメニュー自体をキャンセルできます。"},{name:"エディターリストボックス",legend:"リストボックス内で移動するには、Tabか下カーソルで次のアイテムへ移動します。SHIFT+Tabで前のアイテムに戻ります。リストのオプションを選択するには、スペースもしくは、ENTERを押してください。リストボックスを閉じるには、ESCを押してください。"},{name:"エディター要素パスバー",legend:"${elementsPathFocus} を押すとエレメントパスバーを操作出来ます。Tabか右カーソルで次のエレメントを選択できます。前のエレメントを選択するには、SHIFT+Tabか左カーソルです。スペースもしくは、ENTERでエディタ内の対象エレメントを選択出来ます。"}]}, 7 | {name:"コマンド",items:[{name:"元に戻す",legend:"${undo} をクリック"},{name:"やり直し",legend:"${redo} をクリック"},{name:"太字",legend:"${bold} をクリック"},{name:"斜体 ",legend:"${italic} をクリック"},{name:"下線",legend:"${underline} をクリック"},{name:"リンク",legend:"${link} をクリック"},{name:"ツールバーを縮める",legend:"${toolbarCollapse} をクリック"},{name:"前のカーソル移動のできないポイントへ",legend:"${accessPreviousSpace} を押すとカーソルより前にあるカーソルキーで入り込めないスペースへ移動できます。例えば、HRエレメントが2つ接している場合などです。離れた場所へは、複数回キーを押します。"},{name:"次のカーソル移動のできないポイントへ",legend:"${accessNextSpace} を押すとカーソルより後ろにあるカーソルキーで入り込めないスペースへ移動できます。例えば、HRエレメントが2つ接している場合などです。離れた場所へは、複数回キーを押します。"}, 8 | {name:"ユーザー補助ヘルプ",legend:"${a11yHelp} をクリック"}]}],backspace:"Backspace",tab:"Tab",enter:"Enter",shift:"Shift",ctrl:"Ctrl",alt:"Alt",pause:"Pause",capslock:"Caps Lock",escape:"Escape",pageUp:"Page Up",pageDown:"Page Down",end:"End",home:"Home",leftArrow:"左矢印",upArrow:"上矢印",rightArrow:"右矢印",downArrow:"下矢印",insert:"Insert","delete":"Delete",leftWindowKey:"左Windowキー",rightWindowKey:"右のWindowキー",selectKey:"Select",numpad0:"Num 0",numpad1:"Num 1",numpad2:"Num 2",numpad3:"Num 3",numpad4:"Num 4",numpad5:"Num 5", 9 | numpad6:"Num 6",numpad7:"Num 7",numpad8:"Num 8",numpad9:"Num 9",multiply:"掛ける",add:"足す",subtract:"引く",decimalPoint:"小数点",divide:"割る",f1:"F1",f2:"F2",f3:"F3",f4:"F4",f5:"F5",f6:"F6",f7:"F7",f8:"F8",f9:"F9",f10:"F10",f11:"F11",f12:"F12",numLock:"Num Lock",scrollLock:"Scroll Lock",semiColon:"セミコロン",equalSign:"イコール記号",comma:"カンマ",dash:"ダッシュ",period:"ピリオド",forwardSlash:"フォワードスラッシュ",graveAccent:"グレイヴアクセント",openBracket:"開きカッコ",backSlash:"バックスラッシュ",closeBracket:"閉じカッコ",singleQuote:"シングルクォート"}); -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/adapters/jquery.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | (function(a){if("undefined"==typeof a)throw Error("jQuery should be loaded before CKEditor jQuery adapter.");if("undefined"==typeof CKEDITOR)throw Error("CKEditor should be loaded before CKEditor jQuery adapter.");CKEDITOR.config.jqueryOverrideVal="undefined"==typeof CKEDITOR.config.jqueryOverrideVal?!0:CKEDITOR.config.jqueryOverrideVal;a.extend(a.fn,{ckeditorGet:function(){var a=this.eq(0).data("ckeditorInstance");if(!a)throw"CKEditor is not initialized yet, use ckeditor() with a callback.";return a}, 6 | ckeditor:function(g,d){if(!CKEDITOR.env.isCompatible)throw Error("The environment is incompatible.");if(!a.isFunction(g)){var m=d;d=g;g=m}var k=[];d=d||{};this.each(function(){var b=a(this),c=b.data("ckeditorInstance"),f=b.data("_ckeditorInstanceLock"),h=this,l=new a.Deferred;k.push(l.promise());if(c&&!f)g&&g.apply(c,[this]),l.resolve();else if(f)c.once("instanceReady",function(){setTimeout(function(){c.element?(c.element.$==h&&g&&g.apply(c,[h]),l.resolve()):setTimeout(arguments.callee,100)},0)}, 7 | null,null,9999);else{if(d.autoUpdateElement||"undefined"==typeof d.autoUpdateElement&&CKEDITOR.config.autoUpdateElement)d.autoUpdateElementJquery=!0;d.autoUpdateElement=!1;b.data("_ckeditorInstanceLock",!0);c=a(this).is("textarea")?CKEDITOR.replace(h,d):CKEDITOR.inline(h,d);b.data("ckeditorInstance",c);c.on("instanceReady",function(d){var e=d.editor;setTimeout(function(){if(e.element){d.removeListener();e.on("dataReady",function(){b.trigger("dataReady.ckeditor",[e])});e.on("setData",function(a){b.trigger("setData.ckeditor", 8 | [e,a.data])});e.on("getData",function(a){b.trigger("getData.ckeditor",[e,a.data])},999);e.on("destroy",function(){b.trigger("destroy.ckeditor",[e])});e.on("save",function(){a(h.form).submit();return!1},null,null,20);if(e.config.autoUpdateElementJquery&&b.is("textarea")&&a(h.form).length){var c=function(){b.ckeditor(function(){e.updateElement()})};a(h.form).submit(c);a(h.form).bind("form-pre-serialize",c);b.bind("destroy.ckeditor",function(){a(h.form).unbind("submit",c);a(h.form).unbind("form-pre-serialize", 9 | c)})}e.on("destroy",function(){b.removeData("ckeditorInstance")});b.removeData("_ckeditorInstanceLock");b.trigger("instanceReady.ckeditor",[e]);g&&g.apply(e,[h]);l.resolve()}else setTimeout(arguments.callee,100)},0)},null,null,9999)}});var f=new a.Deferred;this.promise=f.promise();a.when.apply(this,k).then(function(){f.resolve()});this.editor=this.eq(0).data("ckeditorInstance");return this}});CKEDITOR.config.jqueryOverrideVal&&(a.fn.val=CKEDITOR.tools.override(a.fn.val,function(g){return function(d){if(arguments.length){var m= 10 | this,k=[],f=this.each(function(){var b=a(this),c=b.data("ckeditorInstance");if(b.is("textarea")&&c){var f=new a.Deferred;c.setData(d,function(){f.resolve()});k.push(f.promise());return!0}return g.call(b,d)});if(k.length){var b=new a.Deferred;a.when.apply(this,k).done(function(){b.resolveWith(m)});return b.promise()}return f}var f=a(this).eq(0),c=f.data("ckeditorInstance");return f.is("textarea")&&c?c.getData():g.call(f)}}))})(window.jQuery); -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/iframe/dialogs/iframe.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | (function(){function c(b){var c=this instanceof CKEDITOR.ui.dialog.checkbox;b.hasAttribute(this.id)&&(b=b.getAttribute(this.id),c?this.setValue(e[this.id]["true"]==b.toLowerCase()):this.setValue(b))}function d(b){var c=""===this.getValue(),a=this instanceof CKEDITOR.ui.dialog.checkbox,d=this.getValue();c?b.removeAttribute(this.att||this.id):a?b.setAttribute(this.id,e[this.id][d]):b.setAttribute(this.att||this.id,d)}var e={scrolling:{"true":"yes","false":"no"},frameborder:{"true":"1","false":"0"}}; 6 | CKEDITOR.dialog.add("iframe",function(b){var f=b.lang.iframe,a=b.lang.common,e=b.plugins.dialogadvtab;return{title:f.title,minWidth:350,minHeight:260,onShow:function(){this.fakeImage=this.iframeNode=null;var a=this.getSelectedElement();a&&a.data("cke-real-element-type")&&"iframe"==a.data("cke-real-element-type")&&(this.fakeImage=a,this.iframeNode=a=b.restoreRealElement(a),this.setupContent(a))},onOk:function(){var a;a=this.fakeImage?this.iframeNode:new CKEDITOR.dom.element("iframe");var c={},d={}; 7 | this.commitContent(a,c,d);a=b.createFakeElement(a,"cke_iframe","iframe",!0);a.setAttributes(d);a.setStyles(c);this.fakeImage?(a.replace(this.fakeImage),b.getSelection().selectElement(a)):b.insertElement(a)},contents:[{id:"info",label:a.generalTab,accessKey:"I",elements:[{type:"vbox",padding:0,children:[{id:"src",type:"text",label:a.url,required:!0,validate:CKEDITOR.dialog.validate.notEmpty(f.noUrl),setup:c,commit:d}]},{type:"hbox",children:[{id:"width",type:"text",requiredContent:"iframe[width]", 8 | style:"width:100%",labelLayout:"vertical",label:a.width,validate:CKEDITOR.dialog.validate.htmlLength(a.invalidHtmlLength.replace("%1",a.width)),setup:c,commit:d},{id:"height",type:"text",requiredContent:"iframe[height]",style:"width:100%",labelLayout:"vertical",label:a.height,validate:CKEDITOR.dialog.validate.htmlLength(a.invalidHtmlLength.replace("%1",a.height)),setup:c,commit:d},{id:"align",type:"select",requiredContent:"iframe[align]","default":"",items:[[a.notSet,""],[a.alignLeft,"left"],[a.alignRight, 9 | "right"],[a.alignTop,"top"],[a.alignMiddle,"middle"],[a.alignBottom,"bottom"]],style:"width:100%",labelLayout:"vertical",label:a.align,setup:function(a,b){c.apply(this,arguments);if(b){var d=b.getAttribute("align");this.setValue(d&&d.toLowerCase()||"")}},commit:function(a,b,c){d.apply(this,arguments);this.getValue()&&(c.align=this.getValue())}}]},{type:"hbox",widths:["50%","50%"],children:[{id:"scrolling",type:"checkbox",requiredContent:"iframe[scrolling]",label:f.scrolling,setup:c,commit:d},{id:"frameborder", 10 | type:"checkbox",requiredContent:"iframe[frameborder]",label:f.border,setup:c,commit:d}]},{type:"hbox",widths:["50%","50%"],children:[{id:"name",type:"text",requiredContent:"iframe[name]",label:a.name,setup:c,commit:d},{id:"title",type:"text",requiredContent:"iframe[title]",label:a.advisoryTitle,setup:c,commit:d}]},{id:"longdesc",type:"text",requiredContent:"iframe[longdesc]",label:a.longDescr,setup:c,commit:d}]},e&&e.createAdvancedTab(b,{id:1,classes:1,styles:1},"iframe")]}})})(); -------------------------------------------------------------------------------- /templates/portal/public/ckeditor/plugins/specialchar/dialogs/lang/fr-ca.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.plugins.setLang("specialchar","fr-ca",{euro:"Symbole Euro",lsquo:"Guillemet simple ouvrant",rsquo:"Guillemet simple fermant",ldquo:"Guillemet double ouvrant",rdquo:"Guillemet double fermant",ndash:"Tiret haut",mdash:"Tiret",iexcl:"Point d'exclamation inversé",cent:"Symbole de cent",pound:"Symbole de Livre Sterling",curren:"Symbole monétaire",yen:"Symbole du Yen",brvbar:"Barre scindée",sect:"Symbole de section",uml:"Tréma",copy:"Symbole de copyright",ordf:"Indicateur ordinal féminin",laquo:"Guillemet français ouvrant", 6 | not:"Indicateur de négation",reg:"Symbole de marque déposée",macr:"Macron",deg:"Degré",sup2:"Exposant 2",sup3:"Exposant 3",acute:"Accent aigüe",micro:"Symbole micro",para:"Paragraphe",middot:"Point médian",cedil:"Cédille",sup1:"Exposant 1",ordm:"Indicateur ordinal masculin",raquo:"Guillemet français fermant",frac14:"Un quart",frac12:"Une demi",frac34:"Trois quart",iquest:"Point d'interrogation inversé",Agrave:"A accent grave",Aacute:"A accent aigüe",Acirc:"A circonflexe",Atilde:"A tilde",Auml:"A tréma", 7 | Aring:"A avec un rond au dessus",AElig:"Æ majuscule",Ccedil:"C cédille",Egrave:"E accent grave",Eacute:"E accent aigüe",Ecirc:"E accent circonflexe",Euml:"E tréma",Igrave:"I accent grave",Iacute:"I accent aigüe",Icirc:"I accent circonflexe",Iuml:"I tréma",ETH:"Lettre majuscule islandaise ED",Ntilde:"N tilde",Ograve:"O accent grave",Oacute:"O accent aigüe",Ocirc:"O accent circonflexe",Otilde:"O tilde",Ouml:"O tréma",times:"Symbole de multiplication",Oslash:"O barré",Ugrave:"U accent grave",Uacute:"U accent aigüe", 8 | Ucirc:"U accent circonflexe",Uuml:"U tréma",Yacute:"Y accent aigüe",THORN:"Lettre islandaise Thorn majuscule",szlig:"Lettre minuscule allemande s dur",agrave:"a accent grave",aacute:"a accent aigüe",acirc:"a accent circonflexe",atilde:"a tilde",auml:"a tréma",aring:"a avec un cercle au dessus",aelig:"æ",ccedil:"c cédille",egrave:"e accent grave",eacute:"e accent aigüe",ecirc:"e accent circonflexe",euml:"e tréma",igrave:"i accent grave",iacute:"i accent aigüe",icirc:"i accent circonflexe",iuml:"i tréma", 9 | eth:"Lettre minuscule islandaise ED",ntilde:"n tilde",ograve:"o accent grave",oacute:"o accent aigüe",ocirc:"O accent circonflexe",otilde:"O tilde",ouml:"O tréma",divide:"Symbole de division",oslash:"o barré",ugrave:"u accent grave",uacute:"u accent aigüe",ucirc:"u accent circonflexe",uuml:"u tréma",yacute:"y accent aigüe",thorn:"Lettre islandaise thorn minuscule",yuml:"y tréma",OElig:"ligature majuscule latine Œ",oelig:"ligature minuscule latine œ",372:"W accent circonflexe",374:"Y accent circonflexe", 10 | 373:"w accent circonflexe",375:"y accent circonflexe",sbquo:"Guillemet simple fermant",8219:"Guillemet-virgule supérieur culbuté",bdquo:"Guillemet-virgule double inférieur",hellip:"Points de suspension",trade:"Symbole de marque déposée",9658:"Flèche noire pointant vers la droite",bull:"Puce",rarr:"Flèche vers la droite",rArr:"Flèche double vers la droite",hArr:"Flèche double vers la gauche",diams:"Carreau",asymp:"Presque égal"}); --------------------------------------------------------------------------------