增加了关注功能

This commit is contained in:
huangjingquan 2013-08-06 20:57:38 +08:00
parent de7665049e
commit f8a8ae6fac
6 changed files with 17 additions and 5 deletions

View File

@ -26,6 +26,9 @@ class ApplicationController < ActionController::Base
include RoutesHelper
helper :routes
#added by william
helper :watchers
class_attribute :accept_api_auth_actions
class_attribute :accept_rss_auth_actions
class_attribute :model_object
@ -49,6 +52,7 @@ class ApplicationController < ActionController::Base
include Redmine::MenuManager::MenuController
helper Redmine::MenuManager::MenuHelper
def session_expiration
if session[:user_id]
if session_expired? && !try_to_autologin

View File

@ -50,8 +50,11 @@ class ProjectsController < ApplicationController
helper :members
helper :activities
helper :documents
helper :watchers
### added by william
include ActsAsTaggableOn::TagsHelper
# Lists visible projects
# def index

View File

@ -35,9 +35,6 @@ class UsersController < ApplicationController
### added by william
include ActsAsTaggableOn::TagsHelper
helper :watchers
helper :activities
# fq
helper :words
#added by young

View File

@ -27,6 +27,11 @@ module ApplicationHelper
include Redmine::Pagination::Helper
include AvatarHelper
### added by william
include ActsAsTaggableOn::TagsHelper
# include WatchersHelper
extend Forwardable
def_delegators :wiki_helper, :wikitoolbar_for, :heads_for_wiki_formatter

View File

@ -34,6 +34,9 @@
<td align="center">
<div class="info_font"><%= textilizable @project.name %></div>
<div>
<% if @project.watched_by?(User.current) %>
<%= watcher_link(@project, User.current) %>
<% end %>
</div>
</td>
</tr>

View File

@ -106,7 +106,7 @@
</div>
<div id="content" style="padding-top: 0px;">
<div class="tabs_new">
<div class="tabs">
<%= render_menu :user_menu %>
</div>
<%= yield %>