[%# entry.tt Page to post and edit entries Authors: Afuna Copyright (c) 2011-2014 by Dreamwidth Studios, LLC. This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself. For a copy of the license, please reference 'perldoc perlartistic' or 'perldoc perlgpl'. %] [%- CALL dw.active_resource_group( "foundation" ) -%] [%- dw.need_res( "stc/css/pages/entry/new.css" "stc/css/components/button-groups.css" "stc/display_none.css" ) -%] [%- dw.need_res( { group => "foundation" }, ## tags (autocomplete) "js/vendor/jquery.vertigro.js" "js/jquery/jquery.ui.menu.js" "js/jquery/jquery.ui.autocomplete.js" "js/components/jquery.autocompletewithunknown.js" "stc/jquery/jquery.ui.menu.css" "stc/jquery/jquery.ui.autocomplete.css" "stc/css/components/autocompletewithunknown.css" ## collapsing "js/components/jquery.collapse.js" "stc/css/components/collapse.css" ## date "js/vendor/pickadate.js/picker.js" "js/vendor/pickadate.js/picker.date.js" "js/vendor/pickadate.js/picker.time.js" "js/vendor/pickadate.js/legacy.js" "stc/css/components/pickadate/datetime.css" # page-specific "js/pages/entry/new.js" # code required for old RTE "js/6alib/httpreq.js" "js/6alib/core.js" "js/6alib/dom.js" "js/livejournal.js" "js/6alib/ippu.js" "js/lj_ippu.js" "js/poll.js" "stc/fck/fckeditor.js" "js/pages/entry/rte.js" # old drafts functionality "js/pages/entry/drafts.js" ) -%] [% sections.title = action.edit ? dw.ml( '.title.edit' ) : dw.ml( '.title' ) %] [% sections.contentopts = '' %] [% sections.head = BLOCK %] [%- chalresp_js -%] [% END # sections.head %]
[% ".beta.on" | ml( aopts = "href='$site.root/betafeatures'", user = betacommunity.ljuser_display ) %]
[%- IF warnings.exist -%] [%- FOREACH warning IN warnings.get_all -%]
[%- warning.message -%]
[%- END -%] [%- END -%]
[%- dw.form_auth -%]
[%- IF remote -%]
[%- IF remote.can_create_polls OR journalu.can_create_polls -%] [%- INCLUDE "components/icon-link-decorative.tt" link = { url = site.root _ "/poll/create" newwindow = 1 } icon = "graph-horizontal" text = "Create Poll" -%] [%- END -%] [%- INCLUDE "components/icon-link-decorative.tt" link = { url = site.root _ "/entry/options" newwindow = 1 } icon = "widget" text = "Rearrange Panels" -%]
[%- END -%]
[%- form.textbox( label = dw.ml(".subject.label") name = "subject" maxlength = limits.subject_length size = "50" labelclass = "hidden" class = "draft-autosave" placeholder = dw.ml(".subject.placeholder") ) -%]
[%- form.select( label = 'Formatting type' labelclass = 'invisible' name = 'editor' id = 'editor' select = editors.selected items = editors.items class = "draft-autosave" ) -%] [%- dw.img('help', '', { alt => dw.ml('markup.helplink.alttext'), title => dw.ml('markup.helplink.alttext'), style => 'box-sizing: content-box;' } ) -%]
[%- form.textarea( label = dw.ml(".event.label") name = "event" id = "entry-body" cols = "50" rows = "18" wrap = "soft" labelclass = "hidden" class = "draft-autosave" placeholder = dw.ml(".event.placeholder") ) -%]
  • [%- form.submit( value = dw.ml('talk.btn.preview') name = "action:preview" id = "js-preview-button" class = "secondary button" ) -%]
[%- BLOCK components forCommunity = 0 %] [% FOREACH component = items %] [%- IF forCommunity -%]
[%- END -%]
[%- file = forCommunity || editable.$component ? "entry/module-${component}.tt" : "entry/display/module-${component}.tt" -%] [%- dw.scoped_include( file ); %]
[%- IF forCommunity -%]
[%- END -%] [%- END -%] [% END -%]
[% PROCESS components items = panels.order.shift %]
[% PROCESS components items = panels.order.shift %]
[% PROCESS components items = panels.order.shift %]
[%- IF remote -%]

Community Administration

[%- PROCESS components forCommunity = 1 items = [ "community-flags", "sticky" ] -%]
[%- END -%]
[%- dw.scoped_include( "entry/module-access.tt" ) %] [%- UNLESS remote -%] [%- dw.scoped_include( "entry/login.tt" ) -%] [%- END -%]
[%- form.submit( value = dw.ml(action.edit ? '.button.edit' : '.button.post') name = "action:post" class = "button left" ) -%] [% IF action.edit %] [%- form.submit( value = dw.ml( '.button.delete' ) name = "action:delete" id = "js-delete-button" class = "button secondary right" ) -%] [% END %]
[% js_for_rte %]