socialforge/app/views/users/user_courses.html.erb

34 lines
1.2 KiB
Plaintext
Raw Normal View History

2014-01-24 10:55:25 +08:00
<% if @user.user_extensions.identity == UserExtensions::TEACHER %>
<%= render :partial => 'my_course' %>
<% else %> <!--for student-->
<%= render :partial => 'my_joinedcourse' %>
<% end %>
2014-03-07 11:28:52 +08:00
<script type="text/javascript" language="javascript">
$(document).ready(function($) {
$("#content .content_frame").find("a").attr("target", "_blank");
$("content-title-top p:first").find("a").attr("target", "_blank");
$("#content .content_frame [color=#666666]").find("a").removeAttr("target");
$('#content .content-title-top table[width=580] td:first span:eq(1)').find("a:first").removeAttr("target");
});
</script>
2014-05-21 18:29:56 +08:00
<script type="text/javascript">
$(document).ready(function() {
var $menu = $('.user_course_list .menu');
var $li_tags = $menu.find('[mode]');
var $dyn_list = $('.dyn_list_wrapper');
$menu.find('[mode]').each(function(index, el) {
$(el).click(function() {
mode = $(el).attr('mode');
$menu.find('[mode]').removeClass( "on" );
$( this ).addClass( "on" );
var wrapper = $('[mode='+mode+']')
$dyn_list.addClass( "hidden" );
wrapper.removeClass('hidden')
})
});
});
</script>
<% html_title(l(:label_user_course)) -%>