app/views/lessonplans/new.html.haml
.container.content
%nav.breadcrumb
%ul
%li
%a{ :href => "#" } 首页
%li
%a{ :href => "#" } 案例
%li.active
%a{ :href => "#" } 精品
%article.plan.edit
= form_for :lessonplan, :url => { :action => 'create' } do |f|
%section.title-section
%h3 教案名称
= f.text_field :title, :placeholder => '给你的教案起一个名字...', class: "large"
%section
%h3 教案介绍
.multi-column-section
.preview-uploader-wrapper{ 'ng-controller' => 'PreviewController', 'on-load' => 'init();' }
%a.reset-btn{ 'ng-click' => 'reset();', 'ng-show' => 'previewImageUrl' } ×
%span.uploder-placeholder
%a{ href: "javascript:;" } 设置封面
%input.jquery-file-uploader{ type: "file", name: "file", :accept => "image/*" }
%img{ 'ng-src' => "{{previewImageUrl}}", 'ng-show' => "previewImageUrl" }
= f.text_field :symbol_img_url, 'ng-model' => 'previewImageUrl', class: 'hide'
.description-wrapper
= label_tag 'lessonplan[short_description]', '说出这个教案的亮点(140字)'
= f.text_area :short_description, :rows => 4, :maxlength => 140, :cols => 60
%section
%h3.clearfix 详细内容
%label 简要说明年级、学科、学生情况、可能的困难等...
= description_editor f
%section.plan-step
%h3 活动步骤
= render :partial => "shared/lessonplan_editable_tasks", locals: { lessonplan: nil }
%section.user-operation
= f.submit '保存教案', :class => 'btn btn-primary'