diff --git a/app/views/organizations/courses.html.erb b/app/views/organizations/courses.html.erb index 875fc3340..6abc6e127 100644 --- a/app/views/organizations/courses.html.erb +++ b/app/views/organizations/courses.html.erb @@ -14,9 +14,11 @@ <%= submit_tag '', :class => 'homepageSearchIcon', :onfocus => 'this.blur();', :class => "teacher-search-icon fl" %> <% end %> -
- <%= link_to "精品课程", courses_organization_path(@organization, :type => "famous", :org_subfield_id => @field.id), :class => "fontGrey2" %> -
+ <% if User.current.admin? %> +
+ <%= link_to "精品课程", courses_organization_path(@organization, :type => "famous", :org_subfield_id => @field.id), :class => "fontGrey2" %> +
+ <% end %>
diff --git a/app/views/organizations/projects.html.erb b/app/views/organizations/projects.html.erb index 1c6cfa1d1..427443950 100644 --- a/app/views/organizations/projects.html.erb +++ b/app/views/organizations/projects.html.erb @@ -14,9 +14,11 @@ <%= submit_tag '', :class => 'homepageSearchIcon', :onfocus => 'this.blur();', :class => "teacher-search-icon fl" %> <% end %> -
- <%= link_to "热门项目", projects_organization_path(@organization, :type => "famous", :org_subfield_id => @field.id), :class => "fontGrey2" %> -
+ <% if User.current.admin? %> +
+ <%= link_to "热门项目", projects_organization_path(@organization, :type => "famous", :org_subfield_id => @field.id), :class => "fontGrey2" %> +
+ <% end %>
diff --git a/app/views/organizations/students.html.erb b/app/views/organizations/students.html.erb index 770967210..bfc51fd50 100644 --- a/app/views/organizations/students.html.erb +++ b/app/views/organizations/students.html.erb @@ -14,9 +14,11 @@ <%= submit_tag '', :class => 'homepageSearchIcon', :onfocus => 'this.blur();', :class => "teacher-search-icon fl" %> <% end %> -
- <%= link_to "学霸列表", students_organization_path(@organization, :type => "famous", :org_subfield_id => @field.id), :class => "fontGrey2" %> -
+ <% if User.current.admin? %> +
+ <%= link_to "学霸列表", students_organization_path(@organization, :type => "famous", :org_subfield_id => @field.id), :class => "fontGrey2" %> +
+ <% end %>
diff --git a/app/views/organizations/teachers.html.erb b/app/views/organizations/teachers.html.erb index dac36f7a5..03334f14f 100644 --- a/app/views/organizations/teachers.html.erb +++ b/app/views/organizations/teachers.html.erb @@ -22,9 +22,11 @@ -
- <%= link_to "名师列表", teachers_organization_path(@organization, :type => "famous", :org_subfield_id => @field.id), :class => "fontGrey2" %> -
+ <% if User.current.admin? %> +
+ <%= link_to "名师列表", teachers_organization_path(@organization, :type => "famous", :org_subfield_id => @field.id), :class => "fontGrey2" %> +
+ <% end %>
diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 0437125e8..22483c1d5 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -1045,6 +1045,12 @@ function showNormalImage(id) { $(image).attr('src',_src); return; } + + //已被加链接则不处理 + if ($(image).parent() && $(image).parent().attr('href')){ + return; + } + //无格式的图片不让点击显示大图,显示的话会有问题 var tmpsrc = image.attr('src'); if (tmpsrc.indexOf('.gif') >= 0 || tmpsrc.indexOf('.jpg') >= 0 || tmpsrc.indexOf('.jpeg') >= 0 || tmpsrc.indexOf('.png') >= 0 || tmpsrc.indexOf('.bmp') >= 0 || tmpsrc.indexOf('.png') >= 0 || tmpsrc.indexOf('.BMP') >= 0 || tmpsrc.indexOf('.JPEG') >= 0 || tmpsrc.indexOf('.JPG') >= 0 || tmpsrc.indexOf('.PNG') >= 0 || tmpsrc.indexOf('.GIF') >= 0) {