This commit is contained in:
wanglinchun 2014-04-18 10:46:29 +08:00
parent e136254c8d
commit 8f6d9fc6a5
8 changed files with 20 additions and 2 deletions

View File

@ -1,5 +1,6 @@
source 'https://rubygems.org'
gem "seems_rateable"
gem "rails", "3.2.13"
gem "jquery-rails", "~> 2.0.2"
gem "i18n", "~> 0.6.0"

View File

@ -79,6 +79,9 @@ GEM
rdoc (3.12.2)
json (~> 1.4)
ruby-openid (2.1.8)
seems_rateable (1.0.13)
jquery-rails
rails
sprockets (2.2.2)
hike (~> 1.2)
multi_json (~> 1.0)
@ -109,3 +112,4 @@ DEPENDENCIES
rails (= 3.2.13)
rdoc (>= 2.4.2)
ruby-openid (~> 2.1.4)
seems_rateable

View File

@ -1601,5 +1601,9 @@ module ApplicationHelper
end
content_tag :ul, content_li.html_safe
end
def current_user
User.current
end
end

View File

@ -1,6 +1,8 @@
class Softapplication < ActiveRecord::Base
attr_accessible :android_min_version_available, :app_type_id, :app_type_name, :description, :name, :user_id, :contest_id, :application_developers
acts_as_attachable
seems_rateable :allow_update => true, :dimensions => :quality
seems_rateable_rater
has_many :journals_for_messages, :as => :jour, :dependent => :destroy
has_many :contesting_softapplications, :dependent => :destroy
belongs_to :user

View File

@ -8,8 +8,9 @@
<meta name="keywords" content="issue,bug,tracker" />
<%= csrf_meta_tag %>
<%= favicon %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', :media => 'all' %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', :media => 'all' %>
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
<%= seems_rateable_stylesheet %>
<%= javascript_heads %>
<%= heads_for_theme %>
<%= call_hook :view_layouts_base_html_head %>
@ -148,7 +149,7 @@
<!--标签-->
<div class="user_fans">
<div class="user_underline"></div>
<table style="font-family:微软雅黑">
<table style="font-family:微软雅黑">
<tr>
<td>
<%= render :partial => 'tags/tag', :locals => {:obj => @contest, :object_flag => "7"}%>

View File

@ -34,6 +34,10 @@
</td>
<td>开发人员:<%= @softapplication.application_developers %></td>
</tr>
<tr>
<td>rate: <%=rating_for @softapplication, :dimension => :qulity %></td>
<td></td>
</tr>
</table>
</td>

View File

@ -1,6 +1,7 @@
require File.expand_path('../boot', __FILE__)
require 'rails/all'
require 'sprockets/railtie'
if defined?(Bundler)
# If you precompile assets before deploying to production, use this line

View File

@ -1,3 +1,4 @@
//= require_directory ./rateable
/* Redmine - project management software
Copyright (C) 2006-2013 Jean-Philippe Lang */