Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
commit
7fd77f0354
@ -1,49 +1,51 @@
|
||||
<!-- added by fq -->
|
||||
<!-- %= form_for(@forum) do |f| % -->
|
||||
<div id="share_new" style = "width: 500px; margin:0 auto; " >
|
||||
<%= labelled_form_for(@forum) do |f| %>
|
||||
<% if @forum.errors.any? %>
|
||||
<!--<div id="error_explanation">
|
||||
<h2><#%= pluralize(@forum.errors.count, "error") %> prohibited this forum from being saved:</h2>
|
||||
|
||||
<ul>
|
||||
<#% @forum.errors.full_messages.each do |msg| %>
|
||||
<li><#%= msg %></li>
|
||||
<#% end %>
|
||||
</ul>
|
||||
</div> -->
|
||||
<% end %>
|
||||
<div style="width: 120%;">
|
||||
<div class="field">
|
||||
<%= f.text_field :name, :required => true, :style => 'width: 100%;', :class => 'create-share', :maxlength => 50%>
|
||||
</div>
|
||||
<div>
|
||||
<% if User.current.logged? && User.current.admin? %>
|
||||
<% if @forum.safe_attribute? 'sticky' %>
|
||||
<%= f.check_box :sticky %>
|
||||
<%= label_tag 'message_sticky', l(:label_board_sticky) %>
|
||||
<% end %>
|
||||
<% if @forum.safe_attribute? 'locked' %>
|
||||
<%= f.check_box :locked %>
|
||||
<%= label_tag 'message_locked', l(:label_board_locked) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div>
|
||||
<script src="http://<%= Setting.host_name%>/javascripts/ckeditor/ckeditor.js?1404953555" type="text/javascript"></script>
|
||||
<p style="max-width:680px">
|
||||
<%= f.text_area :description, :required => true, :id => 'editor01' %>
|
||||
</p>
|
||||
<script type="text/javascript">var ckeditor=CKEDITOR.replace('editor01');</script>
|
||||
|
||||
<p style="color: #ff0000">
|
||||
(<%= l(:label_forums_max_length) %>)
|
||||
</p>
|
||||
</div>
|
||||
<div class="actions" style=" padding-top: 10px; float:right">
|
||||
<%= submit_tag l(:button_submit) %>
|
||||
<%= link_to l(:button_back), forums_path ,:style => 'font-size: 14px; padding: 0px 3px;' %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<!-- added by fq -->
|
||||
<!-- %= form_for(@forum) do |f| % -->
|
||||
|
||||
<div id="share_new" style = "width: 500px; margin:0 auto; " >
|
||||
<%= labelled_form_for(@forum) do |f| %>
|
||||
<% if @forum.errors.any? %>
|
||||
<!--<div id="error_explanation">
|
||||
<h2><#%= pluralize(@forum.errors.count, "error") %> prohibited this forum from being saved:</h2>
|
||||
|
||||
<ul>
|
||||
<#% @forum.errors.full_messages.each do |msg| %>
|
||||
<li><#%= msg %></li>
|
||||
<#% end %>
|
||||
</ul>
|
||||
</div> -->
|
||||
<% end %>
|
||||
<div style="width: 120%;">
|
||||
<div class="field">
|
||||
<%= f.text_field :name, :required => true, :style => 'width: 100%;', :class => 'create-share', :maxlength => 50%>
|
||||
</div>
|
||||
<div>
|
||||
<% if User.current.logged? && User.current.admin? %>
|
||||
<% if @forum.safe_attribute? 'sticky' %>
|
||||
<%= f.check_box :sticky %>
|
||||
<%= label_tag 'message_sticky', l(:label_board_sticky) %>
|
||||
<% end %>
|
||||
<% if @forum.safe_attribute? 'locked' %>
|
||||
<%= f.check_box :locked %>
|
||||
<%= label_tag 'message_locked', l(:label_board_locked) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
|
||||
<p style="max-width:680px">
|
||||
<%= f.kindeditor :description, :required => true %>
|
||||
</p>
|
||||
<!-- <script type="text/javascript">var ckeditor=CKEDITOR.replace('editor01');</script> -->
|
||||
|
||||
<p style="color: #ff0000">
|
||||
(<%= l(:label_forums_max_length) %>)
|
||||
</p>
|
||||
</div>
|
||||
<div class="actions" style=" padding-top: 10px; float:right">
|
||||
<%= submit_tag l(:button_submit) %>
|
||||
<%= link_to l(:button_back), forums_path ,:style => 'font-size: 14px; padding: 0px 3px;' %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
@ -0,0 +1,49 @@
|
||||
<!-- added by fq -->
|
||||
<!-- %= form_for(@forum) do |f| % -->
|
||||
|
||||
<div id="share_new" style = "width: 500px; margin:0 auto; " >
|
||||
<%= labelled_form_for(@forum) do |f| %>
|
||||
<% if @forum.errors.any? %>
|
||||
<!--<div id="error_explanation">
|
||||
<h2><#%= pluralize(@forum.errors.count, "error") %> prohibited this forum from being saved:</h2>
|
||||
|
||||
<ul>
|
||||
<#% @forum.errors.full_messages.each do |msg| %>
|
||||
<li><#%= msg %></li>
|
||||
<#% end %>
|
||||
</ul>
|
||||
</div> -->
|
||||
<% end %>
|
||||
<div style="width: 120%;">
|
||||
<div class="field">
|
||||
<%= f.text_field :name, :required => true, :style => 'width: 100%;', :class => 'create-share', :maxlength => 50%>
|
||||
</div>
|
||||
<div>
|
||||
<% if User.current.logged? && User.current.admin? %>
|
||||
<% if @forum.safe_attribute? 'sticky' %>
|
||||
<%= f.check_box :sticky %>
|
||||
<%= label_tag 'message_sticky', l(:label_board_sticky) %>
|
||||
<% end %>
|
||||
<% if @forum.safe_attribute? 'locked' %>
|
||||
<%= f.check_box :locked %>
|
||||
<%= label_tag 'message_locked', l(:label_board_locked) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div>
|
||||
<p style="max-width:680px">
|
||||
<%= f.kindeditor :description, :required => true,:owner_id => @forum.id,:owner_type => 2 %>
|
||||
</p>
|
||||
<!-- <script type="text/javascript">var ckeditor=CKEDITOR.replace('editor01');</script> -->
|
||||
|
||||
<p style="color: #ff0000">
|
||||
(<%= l(:label_forums_max_length) %>)
|
||||
</p>
|
||||
</div>
|
||||
<div class="actions" style=" padding-top: 10px; float:right">
|
||||
<%= submit_tag l(:button_submit) %>
|
||||
<%= link_to l(:button_back), forums_path ,:style => 'font-size: 14px; padding: 0px 3px;' %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
@ -1,4 +1,4 @@
|
||||
<!-- added by fq -->
|
||||
<h1>编辑讨论区</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor" %>
|
||||
<%= render 'form_edit_mode' %>
|
||||
|
@ -0,0 +1,5 @@
|
||||
class AddOwnerTypeToKindEditorAssets < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :kindeditor_assets,:owner_type,:string
|
||||
end
|
||||
end
|
@ -0,0 +1,8 @@
|
||||
class ChangeOwnerTypeInKindeditorAssets < ActiveRecord::Migration
|
||||
def up
|
||||
execute(" ALTER TABLE `kindeditor_assets` MODIFY COLUMN `owner_type` int(11) DEFAULT 0")
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
@ -0,0 +1,6 @@
|
||||
source "http://rubygems.org"
|
||||
|
||||
gemspec
|
||||
|
||||
gem 'carrierwave'
|
||||
gem 'mini_magick'
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue