This commit is contained in:
sw 2014-10-27 16:36:12 +08:00
commit 943b9656d1
17 changed files with 1685 additions and 1685 deletions

View File

@ -56,12 +56,12 @@ class SoftapplicationsController < ApplicationController
stars_status = stars_reates.select("stars, count(*) as scount"). stars_status = stars_reates.select("stars, count(*) as scount").
group("stars") group("stars")
@stars_status_map = Hash.new(0.0) @stars_status_map = Hash.new(0)
stars_status.each do |star_status| stars_status.each do |star_status|
percent = percent_of(star_status.scount, stars_reates_count).to_f percent = percent_of(star_status.scount, stars_reates_count).to_f
percent_m = format("%.2f", percent) people = star_status.scount.to_i
@stars_status_map["star#{star_status.stars.to_i}".to_sym] = @stars_status_map["star#{star_status.stars.to_i}".to_sym] =
percent_m.to_s + "%" people.to_s
end end
@jours = @softapplication.journals_for_messages.order('created_on DESC') @jours = @softapplication.journals_for_messages.order('created_on DESC')
@image_results = [] @image_results = []

View File

@ -219,7 +219,7 @@ module CoursesHelper
def render_course_hierarchy(courses) def render_course_hierarchy(courses)
render_course_nested_lists(courses) do |course| render_course_nested_lists(courses) do |course|
s = link_to_course(course, {}, :class => "#{course.css_classes} #{User.current.member_of?(course) ? 'my-course' : nil}").html_safe s = link_to_course(course, {}, :class => "#{course.css_classes} #{User.current.member_of_course?(course) ? 'my-course' : nil}").html_safe
s s
end end
end end

View File

@ -15,7 +15,7 @@
<%= l(:label_private) %> <%= l(:label_private) %>
</span> </span>
<% end %> <% end %>
<%= content_tag('span', link_to("#{@course.name}", course_path(@course), :class => "info"))%> <%= content_tag('span', link_to("#{@course.name}", course_path(@course), :class => "info #{User.current.member_of_course?(@course) ? 'my-project' : nil}"))%>
</p> </p>
<p > <p >
<%= content_tag('span', "#{l(:label_institution_name)}:", :class => "course-font")%> <%= content_tag('span', "#{l(:label_institution_name)}:", :class => "course-font")%>

View File

@ -71,7 +71,7 @@
<!-- <div>打分总人数:<%= @softapplication.raters(:quality).count %></div> --> <!-- <div>打分总人数:<%= @softapplication.raters(:quality).count %></div> -->
<div style="overflow: hidden"> <div style="overflow: hidden">
<div style="margin-left: 15%; float: left"> <div style="margin-left: 15%; float: left">
<div style="padding-left: 45px; padding-bottom: 5px"><%=l(:label_work_scores_proportion)%></div> <div style="padding-left: 45px; padding-bottom: 5px"><%=l(:label_work_scores_people)%></div>
<div> <div>
<% 100.step(20, -20) do |star| %> <% 100.step(20, -20) do |star| %>
<div data-kls="Softapplication" data-id="2" data-dimension="quality" data-average="3.25" class="rateable div_inline jDisabled" style="height: 20px; width: 115px; overflow: hidden; z-index: 1; position: relative;"> <div data-kls="Softapplication" data-id="2" data-dimension="quality" data-average="3.25" class="rateable div_inline jDisabled" style="height: 20px; width: 115px; overflow: hidden; z-index: 1; position: relative;">

View File

@ -2006,7 +2006,7 @@ zh:
label_work_scores: 作品得分 label_work_scores: 作品得分
label_work_rating: 评分 label_work_rating: 评分
label_work_tishi: 您可以重新打分,打分结果以最后一次打分为主! label_work_tishi: 您可以重新打分,打分结果以最后一次打分为主!
label_work_scores_proportion: 得分比例 label_work_scores_people: 得分人数
label_softapplication_type: 应用分类 label_softapplication_type: 应用分类
label_work_type: 作品分类 label_work_type: 作品分类
label_work_photo: 作品截图 label_work_photo: 作品截图