-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1497901
commit 2e4ab0d
Showing
25 changed files
with
164 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
<%= div_for editable_comment do %> | ||
<div class="comment_head"> | ||
<div class="box"> | ||
<div class="box-header comment_head"> | ||
<i class="icon-comment"></i> | ||
<%= link_to editable_comment.user.name, editable_comment.user%> | ||
说 | ||
<span class="comment_time"> | ||
<%= time_ago_in_words editable_comment.created_at %>前 | ||
</span> | ||
</div> | ||
<div class="comment_body"> | ||
<div class="inner comment_body"> | ||
<% if current_user.try(:id) == editable_comment.user.id %> | ||
<ul class="actions"> | ||
<li><%= link_to t("edit"), edit_comment_path(editable_comment), :class => "btn btn-small" %></li> | ||
<li><%= link_to t("delete"), editable_comment, :confirm => "Are you sure you want to delete this comment?", :method => :delete, :class => "btn btn-small" %></li> | ||
</ul> | ||
<% end %> | ||
<%= editable_comment.content %> | ||
<%= markdown editable_comment.content %> | ||
</div> | ||
</div> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<h1>Editing comment</h1> | ||
|
||
<%= render 'form' %> | ||
<div class="container"> | ||
<%= render 'form' %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
<p id="notice"><%= notice %></p> | ||
<h1>Listing comments</h1> | ||
|
||
<table> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,30 @@ | ||
<h3><%= t("add_class") %></h3> | ||
<% if course.videos.empty? %> | ||
<% this_video_no = 0 %> | ||
<% else %> | ||
<% this_video_no = course.videos.reorder('no').last.no + 1 %> | ||
<% end %> | ||
<div class="box"> | ||
<h3 class="box-header"><%= t("add_class") %></h3> | ||
<% if course.videos.empty? %> | ||
<% this_video_no = 0 %> | ||
<% else %> | ||
<% this_video_no = course.videos.reorder('no').last.no + 1 %> | ||
<% end %> | ||
|
||
<div id="video_create_box"> | ||
<%= form_for(Video.new(:course_id => course.id)) do |f| %> | ||
<%= f.label t("video_no") %> | ||
<%= f.select :no, ((0..20).map {|i| [i,i] }), :selected => this_video_no %> | ||
(第0课为课程简介,第一课序号为1,以此类推) | ||
<br> | ||
<br> | ||
<%= f.hidden_field :course_id %> | ||
<% if not course.videos.empty? %> | ||
<%= f.label t("video_title") %> | ||
<%= f.text_field :title %> | ||
<div class="inner"> | ||
<%= form_for(Video.new(:course_id => course.id)) do |f| %> | ||
<%= f.label t("video_no") %> | ||
<%= f.select :no, ((0..20).map {|i| [i,i] }), :selected => this_video_no %> | ||
(第0课为课程简介,第一课序号为1,以此类推) | ||
<br> | ||
<br> | ||
<%= f.hidden_field :course_id %> | ||
<% if not course.videos.empty? %> | ||
<%= f.label t("video_title") %> | ||
<%= f.text_field :title %> | ||
<br> | ||
<br> | ||
<% end %> | ||
<%= f.label t("video_link") %> | ||
<%= f.text_field :link %> | ||
<br> | ||
<br> | ||
<%= f.submit "#{t('add_this_video')}", :class => "btn btn-success", :id => "comment_btn" %> | ||
<% end %> | ||
<%= f.label t("video_link") %> | ||
<%= f.text_field :link %> | ||
<br> | ||
<br> | ||
<%= f.submit "#{t('add_this_video')}", :class => "btn btn-success", :id => "comment_btn" %> | ||
<% end %> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<div id="course_info" class="row-fluid"> | ||
<div class="course_intro box span4"> | ||
<h2 class="box-header"> | ||
<%= course.title %> | ||
</h2> | ||
<div class ="inner"> | ||
<p class="light"><%=course.cat.titleize %><p> | ||
<p><%= course.description %><p> | ||
<p> | ||
<% if current_user && current_user.admin? %> | ||
<%= link_to 'Edit', "/edit/#{course.name}"%> | ||
<% end %> | ||
</p> | ||
</div> | ||
</div> | ||
<div class="videos box span8"> | ||
<h3 class="box-header"><%= t("all_videos") %></h3> | ||
<div class ="inner"> | ||
<%= render "videos", :videos => course.videos.reorder('no'), :current_video => video %> | ||
</div> | ||
</div> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
<h1> Edit </h1> | ||
<div class="container"> | ||
<h1> Edit </h1> | ||
|
||
<%= render 'form' %> | ||
<%= render 'form' %> | ||
<%= link_to 'Show', @course %> | | ||
<%= link_to 'Back', courses_path %> | ||
<%= link_to 'Show', @course %> | | ||
<%= link_to 'Back', courses_path %> | ||
</div> |
Oops, something went wrong.