Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
ecccbf1cf7
|
@ -0,0 +1,3 @@
|
||||||
|
class CourseAttachment < ActiveRecord::Base
|
||||||
|
attr_accessible :attachtype, :author_id, :content_type, :description, :digest, :disk_directory, :disk_filename, :downloads, :filename, :filesize, :integer, :is_public
|
||||||
|
end
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
|
|
||||||
<div class="autoscroll">
|
<div class="autoscroll">
|
||||||
<table class="list">
|
<table class="list" style="width: 100%;table-layout: fixed">
|
||||||
<thead><tr>
|
<thead><tr>
|
||||||
<th><%=l(:label_project)%></th>
|
<th><%=l(:label_project)%></th>
|
||||||
<th><%=l(:field_is_public)%></th>
|
<th><%=l(:field_is_public)%></th>
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<% project_tree(@projects) do |project, level| %>
|
<% project_tree(@projects) do |project, level| %>
|
||||||
<tr class="<%= cycle("odd", "even") %> <%= project.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
|
<tr class="<%= cycle("odd", "even") %> <%= project.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
|
||||||
<td class="name"><span><%= link_to_project_settings(project, {}, :title => project.short_description) %></span></td>
|
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=project.name%>'><span><%= link_to_project_settings(project, {}) %></span></td>
|
||||||
<td align="center"><%= checked_image project.is_public? %></td>
|
<td align="center"><%= checked_image project.is_public? %></td>
|
||||||
<td align="center"><%= format_date(project.created_on) %></td>
|
<td align="center"><%= format_date(project.created_on) %></td>
|
||||||
<td class="buttons">
|
<td class="buttons">
|
||||||
|
|
|
@ -40,13 +40,13 @@
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<col style="width: 20%" />
|
|
||||||
<col style="width: 10%" />
|
<col style="width: 10%" />
|
||||||
<col style="width: 5%" />
|
<col style="width: 5%" />
|
||||||
<col style="width: 20%" />
|
|
||||||
<col style="width: 5%" />
|
<col style="width: 5%" />
|
||||||
<col style="width: 15%" />
|
<col style="width: 10%" />
|
||||||
<col style="width: 15%" />
|
<col style="width: 5%" />
|
||||||
|
<col style="width: 10%" />
|
||||||
|
<col style="width: 10%" />
|
||||||
<col style="width: 5%" />
|
<col style="width: 5%" />
|
||||||
<col style="width: 5%" />
|
<col style="width: 5%" />
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
|
@ -161,7 +161,8 @@
|
||||||
|
|
||||||
<td class="comments">
|
<td class="comments">
|
||||||
<div class="wiki">
|
<div class="wiki">
|
||||||
<%= textilizable message, :content, :attachments => message.attachments %>
|
<%#= textilizable message,:content,:attachments => message.attachments %>
|
||||||
|
<%= message.content.html_safe %>
|
||||||
</div>
|
</div>
|
||||||
<%= link_to_attachments message, :author => false %> </td>
|
<%= link_to_attachments message, :author => false %> </td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<div class="wiki wiki-page">
|
<div class="wiki wiki-page">
|
||||||
<%= textilizable content, :text, :attachments => content.page.attachments,
|
<%= textilizable content, :text, :attachments => content.page.attachments,
|
||||||
:edit_section_links => (@sections_editable && {:controller => 'wiki', :action => 'edit', :project_id => @page.project, :id => @page.title}) %>
|
:edit_section_links => (@sections_editable && {:controller => 'wiki', :action => 'edit', :project_id => @page.project, :id => @page.title}) %>
|
||||||
|
<%#= content.text.html_safe %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<%= wiki_page_breadcrumb(@page) %>
|
<%= wiki_page_breadcrumb(@page) %>
|
||||||
|
|
||||||
|
<script src="/javascripts/ckeditor/ckeditor.js?1404953555" type="text/javascript"></script>
|
||||||
<h3><%= h @page.pretty_title %></h3>
|
<h3><%= h @page.pretty_title %></h3>
|
||||||
|
|
||||||
<%= form_for @content, :as => :content,
|
<%= form_for @content, :as => :content,
|
||||||
|
@ -12,8 +13,15 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= error_messages_for 'content' %>
|
<%= error_messages_for 'content' %>
|
||||||
|
|
||||||
|
<div class="actions" style="max-width:680px">
|
||||||
|
<p style="max-width:680px;"><%=text_area_tag 'content[text]', @text, :required => true, :id => 'editor02', :cols => 100, :rows => 25 %></p>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var ckeditor=CKEDITOR.replace('editor02');
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="box tabular">
|
<div class="box tabular">
|
||||||
<%= text_area_tag 'content[text]', @text, :cols => 100, :rows => 25,
|
<%#= text_area_tag 'content[text]', @text, :cols => 100, :rows => 25,
|
||||||
:class => 'wiki-edit', :accesskey => accesskey(:edit) %>
|
:class => 'wiki-edit', :accesskey => accesskey(:edit) %>
|
||||||
|
|
||||||
<!--p style="max-width:680px"><input id="editor02" required="true" /><%#= f.text_area :comments, :required => true, :id => 'editor02' %></p>
|
<!--p style="max-width:680px"><input id="editor02" required="true" /><%#= f.text_area :comments, :required => true, :id => 'editor02' %></p>
|
||||||
|
@ -31,7 +39,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<p><label><%= l(:field_comments) %></label><%= f.text_field :comments, :size => 120 %></p>
|
<p style="width: 100%;"><label><%= l(:field_comments) %></label><%= f.text_field :comments, :style => "width:75%;" %></p>
|
||||||
<p><label><%=l(:label_attachment_plural)%></label><%= render :partial => 'attachments/form' %></p>
|
<p><label><%=l(:label_attachment_plural)%></label><%= render :partial => 'attachments/form' %></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
class CreateCourseAttachments < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
create_table :course_attachments do |t|
|
||||||
|
t.string :filename
|
||||||
|
t.string :disk_filename
|
||||||
|
t.integer :filesize
|
||||||
|
t.string :content_type
|
||||||
|
t.string :digest
|
||||||
|
t.integer :downloads
|
||||||
|
t.string :author_id
|
||||||
|
t.string :integer
|
||||||
|
t.string :description
|
||||||
|
t.string :disk_directory
|
||||||
|
t.integer :attachtype
|
||||||
|
t.integer :is_public
|
||||||
|
|
||||||
|
t.timestamps
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
19
db/schema.rb
19
db/schema.rb
|
@ -11,7 +11,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended to check this file into your version control system.
|
# It's strongly recommended to check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(:version => 20140801034242) do
|
ActiveRecord::Schema.define(:version => 20140812032957) do
|
||||||
|
|
||||||
create_table "activities", :force => true do |t|
|
create_table "activities", :force => true do |t|
|
||||||
t.integer "act_id", :null => false
|
t.integer "act_id", :null => false
|
||||||
|
@ -291,6 +291,23 @@ ActiveRecord::Schema.define(:version => 20140801034242) do
|
||||||
t.datetime "updated_on", :null => false
|
t.datetime "updated_on", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "course_attachments", :force => true do |t|
|
||||||
|
t.string "filename"
|
||||||
|
t.string "disk_filename"
|
||||||
|
t.integer "filesize"
|
||||||
|
t.string "content_type"
|
||||||
|
t.string "digest"
|
||||||
|
t.integer "downloads"
|
||||||
|
t.string "author_id"
|
||||||
|
t.string "integer"
|
||||||
|
t.string "description"
|
||||||
|
t.string "disk_directory"
|
||||||
|
t.integer "attachtype"
|
||||||
|
t.integer "is_public"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
create_table "course_infos", :force => true do |t|
|
create_table "course_infos", :force => true do |t|
|
||||||
t.integer "course_id"
|
t.integer "course_id"
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
|
|
Loading…
Reference in New Issue