|
|
@ -20,23 +20,23 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<% if @course && User.current.allowed_to?(:manage_news, @course) %>
|
|
|
|
<!-- <%# if @course && User.current.allowed_to?(:manage_news, @course) %>
|
|
|
|
<%= link_to(btn_tips, new_course_news_path(@course),
|
|
|
|
<%#= link_to(btn_tips, new_course_news_path(@course),
|
|
|
|
:class => 'icon icon-add',
|
|
|
|
:class => 'icon icon-add',
|
|
|
|
:onclick => 'showAndScrollTo("add-news", "news_title"); return false;') %>
|
|
|
|
:onclick => 'showAndScrollTo("add-news", "news_title"); return false;') %>
|
|
|
|
|
|
|
|
|
|
|
|
<div id="add-news" class="add_frame" style="display:none;">
|
|
|
|
<div id="add-news" class="add_frame" style="display:none;">
|
|
|
|
<%= labelled_form_for @news, :url => course_news_index_path(@course),
|
|
|
|
<%#= labelled_form_for @news, :url => course_news_index_path(@course),
|
|
|
|
:html => {:id => 'news-form', :multipart => true} do |f| %>
|
|
|
|
:html => {:id => 'news-form', :multipart => true} do |f| %>
|
|
|
|
<%= render :partial => 'news/course_form', :locals => {:f => f, :is_new => true} %>
|
|
|
|
<%#= render :partial => 'news/course_form', :locals => {:f => f, :is_new => true} %>
|
|
|
|
<%= link_to l(:button_create), "#", :onclick => 'submitNews();', :onmouseover => 'submitFocus(this);', :class => 'ButtonColor m3p10' %>
|
|
|
|
<%#= link_to l(:button_create), "#", :onclick => 'submitNews();', :onmouseover => 'submitFocus(this);', :class => 'ButtonColor m3p10' %>
|
|
|
|
<%#= preview_link preview_news_path, 'news-form', target='preview', {:class => 'whiteButton m3p10'} %>
|
|
|
|
<%#= preview_link preview_news_path, 'news-form', target='preview', {:class => 'whiteButton m3p10'} %>
|
|
|
|
|
|
|
|
|
|
|
|
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-news").hide()', :class => 'ButtonColor m3p10' %>
|
|
|
|
<%#= link_to l(:button_cancel), "#", :onclick => '$("#add-news").hide()', :class => 'ButtonColor m3p10' %>
|
|
|
|
<% end if @course %>
|
|
|
|
<%# end if @course %>
|
|
|
|
<div id="preview" class="wiki"></div>
|
|
|
|
<div id="preview" class="wiki"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<%# end %>-->
|
|
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<% if @newss.empty? %>
|
|
|
|
<% if @newss.empty? %>
|
|
|
|