Merge branch 'develop' of 10.0.47.245:/home/trustie2 into develop

This commit is contained in:
zhangyang 2013-08-01 21:37:11 +08:00
commit aaa8a4b94d
36 changed files with 571 additions and 184 deletions

2
.gitignore vendored
View File

@ -9,3 +9,5 @@ log
/log/development.scm.stderr.log
test/*
tmp/*
/app/models/tag.rb
/app/models/tag.rb

25
Client.html Normal file
View File

@ -0,0 +1,25 @@
<html>
<head>
<title>
Client
</title>
</head>
<body>
<hr />
<h2>这是一张图片</h2>
<p>photo<a href="http://10.0.47.15:3000/shares/new?access_token='2d3dda45dsd'&comment='verygood'&title=davide&share_type=1&url=http://www.baidu.com"> Share A </a></p>
<hr />
<h2>这是一段视频</h2>
<p>Text<a href="http://10.0.47.15:3000/shares/new?access_token=2d3dda45dsd&comment=verygood&title=kaka&share_type=2&url=http://www.sina.com"> Share B </a></p>
<hr />
<h2>这是一篇文章</h2>
<p>Text<a href="http://10.0.47.15:3000/shares/new?access_token=2d3dda45dsd&comment=verygood&title=pepe&share_type=3&url=http://www.sina.com"> Share C </a></p>
<hr />
</body>
</html>

View File

@ -0,0 +1,2 @@
// Place all the behaviors and hooks related to the matching controller here.
// All this logic will automatically be available in application.js.

View File

@ -0,0 +1,56 @@
body { background-color: #fff; color: #333; }
body, p, ol, ul, td {
font-family: verdana, arial, helvetica, sans-serif;
font-size: 13px;
line-height: 18px;
}
pre {
background-color: #eee;
padding: 10px;
font-size: 11px;
}
a { color: #000; }
a:visited { color: #666; }
a:hover { color: #fff; background-color:#000; }
div.field, div.actions {
margin-bottom: 10px;
}
#notice {
color: green;
}
.field_with_errors {
padding: 2px;
background-color: red;
display: table;
}
#error_explanation {
width: 450px;
border: 2px solid red;
padding: 7px;
padding-bottom: 0;
margin-bottom: 20px;
background-color: #f0f0f0;
}
#error_explanation h2 {
text-align: left;
font-weight: bold;
padding: 5px 5px 5px 15px;
font-size: 12px;
margin: -7px;
margin-bottom: 0px;
background-color: #c00;
color: #fff;
}
#error_explanation ul li {
font-size: 12px;
list-style: square;
}

View File

@ -0,0 +1,4 @@
/*
Place all the styles related to the matching controller here.
They will automatically be included in application.css.
*/

View File

@ -3,6 +3,7 @@ class BidsController < ApplicationController
before_filter :find_bid, :only => [:show, :show_project, :create, :destroy, :more, :back, :add]
helper :watchers
def index
if params[:bid_title]
Bid.creat_bids(params[:bid_budget], params[:bid_deadline], params[:bid_title] , params[:bid_description])
@ -32,6 +33,13 @@ class BidsController < ApplicationController
end
def show_project
@membership = User.current.memberships.all(:conditions => Project.visible_condition(User.current))
@option = []
@membership.each do |membership|
@option << membership.project
end
# a = [1]
# @project = Project.where("id in []", a)
@user = @bid.author
@bidding_project = @bid.biding_projects
respond_to do |format|
@ -43,9 +51,9 @@ class BidsController < ApplicationController
end
def add
project_id = params[:bid_for_save][:project_id]
project = Project.where('name = ?', params[:bid]).first
bid_message = params[:bid_for_save][:bid_message]
BidingProject.cerate_bidding(@bid.id, project_id, bid_message)
BidingProject.cerate_bidding(@bid.id, project.id, bid_message)
@bidding_project = @bid.biding_projects
respond_to do |format|
# format.html { redirect_to_referer_or {render :text => 'Watcher added.', :layout => true}}
@ -56,7 +64,7 @@ class BidsController < ApplicationController
def create
if params[:user_message].size>0
message = params[:user_message]
message = params[:user_message][:message]
@bid.add_jour(User.current, message)
# if a_message.size > 5
# @message = a_message[-5, 5]

View File

@ -0,0 +1,92 @@
class SharesController < ApplicationController
# GET /shares
# GET /shares.json
def index
@shares = Share.all
respond_to do |format|
format.html # index.html.erb
format.json { render json: @shares }
end
end
# GET /shares/1
# GET /shares/1.json
def show
@share = Share.find(params[:id])
respond_to do |format|
format.html # show.html.erb
format.json { render json: @share }
end
end
# GET /shares/new
# GET /shares/new.json
def new
@share = Share.new
#add by mkz 抓取参数传给share
@share[:access_token] = params[:access_token]
@share[:comment] = params[:comment]
@share[:title] = params[:title]
@share[:url] = params[:url]
@share[:share_type] = params[:share_type]
@share.save
#
respond_to do |format|
format.html # new.html.erb
format.json { render json: @share }
end
end
# GET /shares/1/edit
def edit
@share = Share.find(params[:id])
end
# POST /shares
# POST /shares.json
def create
@share = Share.new(params[:share])
respond_to do |format|
if @share.save
format.html { redirect_to @share, notice: 'Share was successfully created.' }
format.json { render json: @share, status: :created, location: @share }
else
format.html { render action: "new" }
format.json { render json: @share.errors, status: :unprocessable_entity }
end
end
end
# PUT /shares/1
# PUT /shares/1.json
def update
@share = Share.find(params[:id])
respond_to do |format|
if @share.update_attributes(params[:share])
format.html { redirect_to @share, notice: 'Share was successfully updated.' }
format.json { head :no_content }
else
format.html { render action: "edit" }
format.json { render json: @share.errors, status: :unprocessable_entity }
end
end
end
# DELETE /shares/1
# DELETE /shares/1.json
def destroy
@share = Share.find(params[:id])
@share.destroy
respond_to do |format|
format.html { redirect_to shares_url }
format.json { head :no_content }
end
end
end

View File

@ -31,6 +31,8 @@ class TagsController < ApplicationController
@obj = Project.find_by_id(@obj_id)
when '3' then
@obj = Issue.find_by_id(@obj_id)
when '4' then
@obj = Bid.find_by_id(@obj_id)
else
@obj = nil
end

View File

@ -0,0 +1,2 @@
module SharesHelper
end

3
app/models/share.rb Normal file
View File

@ -0,0 +1,3 @@
class Share < ActiveRecord::Base
attr_accessible :access_token, :comment, :share_type, :title, :url
end

View File

@ -1,6 +1,8 @@
<!-- added by fq -->
<% if journals.size > 5 %>
<table width="660px" border="0" align="center">
<tr>
<td class="font_lighter" style="font-size: 18px;"><%=l(:label_user_response)%>(<%= journals.count%>)</td>
<td><% if journals.size > 5 %>
<% unless state%>
<div class="contextual">
<%= link_to l(:button_more),
@ -16,22 +18,35 @@
:method => 'get' %>
</div>
<% end %>
<% end %>
<h3><%=l(:label_user_response)%>(<%= journals.count%>)</h3>
<% end %><td>
</tr></table>
<% unless state%>
<% if journals.size > 5 %>
<% journals = journals[0, 5] %>
<% end %>
<% end %>
<% for journal in journals %>
<div id="change-<%= journal.id %>">
<div id="note-<%= journal.indice %>">
<h4><%= link_to "##{journal.indice}", {}, :class => "journal-link" %>
<%= avatar(journal.user, :size => "24") %>
<%= l(:label_updated_time_by, :author => journal.user, :age => time_tag(journal.created_at)).html_safe%></h4>
<%= render_notes(bid, journal, :reply_links => true) unless journal.notes.blank? %>
</div>
</div>
<%= call_hook(:view_issues_history_journal_bottom, { :journal => journal }) %>
<% if journals.size >0 %>
<% remove_allowed = (User.current.id == journals.first.jour_id) %>
<% for journal in journals%>
<table width="660px" border="0" align="center">
<tr>
<td colspan="2" valign="top" width="50" ><%= link_to image_tag(url_to_avatar(journal.user), :class => "avatar"), user_path(journal.user), :class => "avatar" %></td>
<td><table width="580px" border="0">
<tr>
<td colspan="2" valign="top"><strong> <%=link_to journal.user, user_path(journal.user)%></strong> <a class="font_lighter">对需求进行了反馈</a><%= link_to "##{journal.indice}", {}, :class => "journal-link" %> </td>
</tr>
<tr>
<td colspan="2" width="580px" ><p class="font_description"><%= textilizable journal.notes%></p></td>
</tr>
<tr>
<td align="left"><a class="font_lighter"> <%= journal.created_at %></a></td>
<td width="200" align="right" class="a"><%= link_to(image_tag('comment.png'), {:controller => 'bids', :action => 'new', :id => bid, :journal_id => journal}, :remote => true,
:method => 'post', :title => l(:button_quote))%><%= link_to(image_tag('delete.png'), {:controller => 'bids', :action => 'destroy', :object_id => journal, :bid_id => bid},
:remote => true, :method => 'delete', :class => "delete", :title => l(:button_delete)) if remove_allowed || journal.user_id == User.current.id %></td>
</tr>
</table></td>
</tr>
</table>
<% end %>
<% end %>

View File

@ -1,13 +1,14 @@
<%= form_tag({:controller => 'bids',
<%= form_for('user_message', :remote => true, :method => :post,
:url => {:controller => 'bids',
:action => 'create',
:bid_id => bid,
:sta => sta},
:remote => true,
:method => :post) do %>
<p><%= label_tag 'user_message', l(:label_leave_message) %><%= text_area_tag 'user_message', nil %></p>
<p class="buttons">
<%= submit_tag l(:button_leave_meassge), :name => nil %>
<%= submit_tag l(:button_clear), :name => nil, :onclick => "clearMessage('user_message');", :type => 'button' %>
</p>
:sta => sta}) do |f|%>
<table border="0" width="500px" align="center">
<tr>
<td><%= f.text_area 'message', :rows => 4, :cols => 65, :value => "我要反馈", :required => true, :style => "resize: none;" %></td>
</tr>
<tr><td align="right"><%= submit_tag l(:button_leave_meassge), :name => nil %>
<%= submit_tag l(:button_clear), :name => nil, :onclick => "clearMessage('user_message_message');", :type => 'button' %></td></tr>
</table>
<% end %>

View File

@ -1,21 +1,28 @@
<% @bidding_project.each do |b_project|%>
<li>
<table width="90%"border="1">
<table width="90%" border="0" align='center'>
<tr>
<td>
<table width="100%" border="1">
<table width="660px" border="0" align='center'>
<tr>
<td width="10%"><img src="/images/requirements/req.jpg"></td>
<td width="50%">
<td width="50px" valign="top" colspan="2" align="middle">
<div style="width: 50px; height: 50px;">
<%= link_to image_tag(url_to_avatar(b_project.project), :class => 'avatar3'), :class => "avatar" %>
</div></td>
<td width="60%">
<table width="100%">
<tr>
<td><%= link_to(b_project.project.name, project_path(b_project.project)) %></td>
<td colspan="2" valign="top"><strong><%= link_to(b_project.project.name, project_path(b_project.project)) %></strong><a class="font_lighter">参与了应标</a></td>
</tr>
<tr></tr>
<tr>
<td><%= b_project.project.description %></td>
</tr>
<tr>
<td><a class="font_lighter"><%= b_project.created_at%></a></td>
</tr>
</table></td>
<td width="40%">
<td width="30%">
<div class="bid-user-message" style="border-left: 1px solid rgb(225, 225, 225); margin-left: 20px; padding-left: 20px;">
<table width="100%">
<tr>
<td>应标人:<%= link_to(b_project.user.name, user_path(b_project.user)) %></td>
@ -23,13 +30,10 @@
<tr>
<td>应标宣言:<%= b_project.description %></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
</li>
</div></td>
</tr>
</table></td>
</tr>
</table>
<% end %>

View File

@ -1,4 +1,4 @@
$('#bidding_project_list').html('<%= escape_javascript(render(:partial => 'project_list', :locals => {:bidding_project => @bidding_project})) %>');
$("#project_id").val("请选择项目");
$("#project_id").val("请输入应标理由");
$("#bid_message").val("请输入应标理由");
$("#put-bid-form").hide();

View File

@ -1,2 +1,2 @@
$('#history').html('<%= escape_javascript(render(:partial => 'history', :locals => {:bid => @bid, :journals => @jour, :state => true})) %>');
$('#user_message').val("");
$('#history').html('<%= escape_javascript(render(:partial => 'bids/history', :locals => {:bid => @bid, :journals => @jour, :state => true})) %>');
$('#user_message_message').val("");

View File

@ -1,37 +1,44 @@
<div class="contextual">
<%= link_to("新建需求", {:controller => 'bids', :action => 'new_bid'}, :class => 'icon icon-add') %>
<%= link_to("新建需求", {:controller => 'bids', :action => 'new_bid'}, :class => 'icon icon-add', :style => "margin-right: 100px;") %>
</div>
<h3>需求列表</h3>
<table width="200px" border="0" style="padding-left: 90px; margin-bottom: 15px;">
<td class="font_lighter" style="font-size: 18px;">需求列表</td>
</table>
<ul class="hotlist">
<% @bids.each do |bid|%>
<li>
<img width="29" src="/images/requirements/req.jpg">
<strong>悬赏:¥<%= bid.budget%></strong>
<%= link_to bid.name, :controller => 'bids', :action => 'show', :bid_id => bid.id %>
<span class="gray9"><%= bid.author.name%> 发布&nbsp;39投标</span>
</li>
<% end %>
<% @bids.each do |bid|%>
<li>
<img width="29" src="/images/requirements/req.jpg">
<strong>悬赏¥1000</strong>
<%= link_to "宣传展示型网站开发_企业网站中英文", :controller => 'bids', :action => 'show', :bid_id => "2" %>
<span class="gray9">tellmey 发布&nbsp;24投标</span>
</li>
<table width="80%" border="0" align="center">
<tr>
<td colspan="2" valign="top" width="50" ><%= link_to image_tag(url_to_avatar(bid.author), :class => 'avatar'), :class => "avatar" %></td>
<td>
<table width="100%" border="0">
<tr>
<td colspan="2" valign="top"><strong><%= link_to(bid.author, user_path(bid.author), :class => 'bid_user') %>:<%= link_to(bid.name, respond_path(bid), :class => 'bid_path') %></strong></td>
</tr>
<tr>
<td width="500">
<table border="0">
<tr>
<td style="color: rgb(255, 0, 0);"><strong>悬赏:¥<%= bid.budget%></strong></td>
<td class="font_lighter">(<%= bid.biding_projects.count%>)应标</td>
<td class="font_lighter">(<%= bid.commit %>)反馈</td>
<td class="font_lighter">(<%= bid.watcher_users.count%>)关注</td>
</tr>
</table></td>
<td width="200" align="right" class="a"><a class="font_lighter"> <%= format_time bid.created_at %></a></td>
</tr>
<tr>
<td>
<div class="bid-description" style="border-left: 1px solid rgb(225, 225, 225); border-bottom: 1px solid rgb(225, 225, 225); padding-left: 20px; padding-bottom: 10px; margin-bottom: 20px;">
<table>
<tr>
<td> <%= bid.description%> </td>
</tr>
</table>
</div></td>
</tr>
</table></td>
</tr>
</table>
<li>
<img width="29" src="/images/requirements/req.jpg">
<strong>悬赏¥1000</strong>
<%= link_to "移动应用终端无线支付停车场开发", :controller => 'bids', :action => 'show', :bid_id => "3" %>
<span class="gray9">奥美特电子 发布&nbsp;2投标</span>
</li>
<li>
<img width="29" src="/images/requirements/req.jpg">
<strong>悬赏¥1500</strong>
<%= link_to "需要一个印刷类的erp系统", :controller => 'bids', :action => 'show', :bid_id => "4" %>
<span class="gray9">海彩印刷有限公司 发布&nbsp;17投标</span>
</li>
</ul>
<% end %>

View File

@ -1,2 +1,2 @@
$('#user_message').val("<%= raw escape_javascript(@content) %>");
$('#user_message_message').val("<%= raw escape_javascript(@content) %>");
showAndScrollTo("user_message", "user_message");

View File

@ -1,11 +1,25 @@
</br></br><h3><%= link_to(@bid.author.name, user_path(@bid.author))%><%= @bid.name %></h3>
<table border="1" width="100%">
<table width="660px" border="0" align="center">
<tr>
<td><h4><strong>需求描述</strong></h4></td>
<td width="50" valign="top"><%= link_to image_tag(url_to_avatar(@bid.author), :class => "avatar"), user_path(@bid.author), :class => "avatar" %></td>
<td><table width="100%" border="0">
<tr>
<td><h3><%= link_to(@bid.author.name, user_path(@bid.author))%><%= @bid.name %></h3></td>
</tr>
<tr>
<td class="font_lighter">悬赏:<%= @bid.budget %></td>
</tr>
</table></td>
</tr>
<tr><td><%= @bid.description %></td></tr>
</table>
<div class="bid-description" style="border-bottom: 1px solid rgb(225, 225, 225); margin-bottom: 20px; padding-bottom: 20px;">
<table border="0" width="600px" align="center">
<tr>
<td></td>
</tr>
<tr><td style="font-size: 15px; color: rgb(0,0,0);"><%= @bid.description %></td></tr>
</table>
</div>
<!-- added by fq -->
<div id="history">
<%= render :partial => 'history', :locals => { :bid => @bid, :journals => @jour, :state => false} %>

View File

@ -1,32 +1,29 @@
</br>
</br>
<div class='icon icon-add'>
<%= toggle_link "我要应标", 'put-bid-form', {:focus => 'project_id'} %>
<div class="contextual">
<div class='icon icon-add' style="margin-right: 30px;">
<%= toggle_link "我要应标", 'put-bid-form', {:focus => 'project_id'} %>
</div>
</div>
<div id="put-bid-form" style="display: none">
<%= form_for "bid_for_save", :remote=>true, :url => {:controller => 'bids', :action => 'add'},
:update => "bidding_project_list",
:complete => '$("#put-bid-form").hide();' do |f| %>
<table id="bidding_table" border="1">
<table id="bidding_table" border="0" align='center' width="500">
<tr>
<td><%= f.text_field :project_id, :id => "project_id", :required => true, :size => 55, :value => "请选择项目"%></td>
<td><%= select_tag 'bid', options_for_select(@option), :name => 'bid' %></td>
</tr>
<tr>
<td><%= f.text_area :bid_message, :id => "bid_message", :required => true, :rows => 3, :cols => 50, :value => "请输入应标理由"%></td>
<td><%= f.text_area :bid_message, :id => "bid_message", :required => true, :rows => 4, :cols => 40, :value => "请输入应标理由", :style => "resize: none;"%></td>
</tr>
<tr>
<td><%= f.submit "add"%><%= link_to_function l(:button_cancel), '$("#put-bid-form").hide();'%></td>
</tr>
</table>
<% end %>
</div>
<h3>应标项目列表</h3>
<ul>
<div id='bidding_project_list'>
<table width="200px" border="0" style="padding-left: 15px">
<td class="font_lighter" style="font-size: 18px;">应标项目(<%= @bidding_project.count%>)</td>
</table>
<div id='bidding_project_list'>
<%= render :partial => 'project_list', :locals => {:bidding_project => @bidding_project} %>
</div>
</ul>
</div>

View File

@ -30,7 +30,6 @@
<% if @issue.created_on != @issue.updated_on %>
<%= l(:label_updated_time, time_tag(@issue.updated_on)).html_safe %>.
<% end %>
</p>
<!-- added by william -for tag -->
<div id="tags">

View File

@ -1,7 +1,26 @@
<label><%= l(:label_tag) %>:</label>
<!-- 1代表是user类型 2代表是project类型 3代表是issue类型 -->
<!-- 3 代表的是issue 当是issue是 处理方式与前2个对象不同 -->
<div id="tags" class="inf_user_context">
<label><%= l(:label_tag) %>:</label>
<!-- 1代表是user类型 2代表是project类型 3代表是issue类型 -->
<!-- 3 代表的是issue 当是issue是 处理方式与前2个对象不同 -->
<% if object_flag == '3' %>
<%= toggle_link (image_tag "/images/add.png"), 'put-tag-form-issue', {:focus => 'name'} %>
<div id="tags_show_issue">
<%= render :partial => "layouts/tag_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %>
</div>
<div id="put-tag-form-issue" style="display: none">
<%= form_for "tag_for_save",:remote=>true,:url=>tag_path,
:update => "tags_show",
:complete => '$("#put-tag-form-issue").hide();' do |f| %>
<%= f.text_field :name ,:id => "name-issue"%>
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
<%= f.submit "add"%>
<%= link_to_function l(:button_cancel), '$("#put-tag-form").hide();'%>
<% end %>
</div>
</div>
<% else %>
<%= toggle_link (image_tag "/images/add.png"), 'put-tag-form', {:focus => 'name'} %>
<div id="tags_show">
<%= render :partial => "layouts/tag_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %>
@ -17,4 +36,5 @@
<%= link_to_function l(:button_cancel), '$("#put-tag-form").hide();'%>
<% end %>
</div>
</div>
<% end %>

View File

@ -56,19 +56,18 @@
</tr>
</table>
<div>
关注 (<%= link_to @bid.watcher_users.count, home_path %>) &nbsp;应标项目 (<%= link_to @bid.biding_projects.count, home_path %>)反馈(<%= @bid.commit%>)
关注 (<%= link_to @bid.watcher_users.count, home_path %>) &nbsp;应标项目 (<%= link_to @bid.biding_projects.count, project_for_bid_path(@bid) %>)&nbsp;反馈(<%= link_to @bid.commit, respond_path(@bid)%>)
</div>
</div>
<div class="inf_user_context">
<div class="user_fans">
<div class="font_title_left">
<strong>标签</strong>
</div><div class="user_underline"></div>
<table style="font-family:微软雅黑">
<tr>
<th>标签云:</th>
</tr>
<tr>
<td><!-- added by william -for tag -->
<div id="tags">
<%= render :partial => 'layouts/tag', :locals => {:obj => @bid,:object_flag => "4"}%>
</div></td>
</td>
</tr>
</table>
@ -87,9 +86,6 @@
<% end%>
</td>
<tr>
<tr>
<td align="right"><%= link_to "显示所有关注",home_path %>(<%= link_to @bid.watcher_users.count, home_path %>)</td>
<tr>
</table>
</div>
</div>
@ -102,10 +98,10 @@
<div class="left_wf">
<table>
<tr>
<td style="padding-top: 5px"><img src="/images/close.png" width="215px" height="130px"/></td>
<tr>
<tr>
<td align="right"><%= link_to "显示所有应标项目",home_path %>(<%= link_to @bid.biding_projects.count, home_path %>)</td>
<td style="padding-top: 5px">
<% for project in @bid.projects%>
<%= link_to image_tag(url_to_avatar(project), :class => "avatar"), project_path(project), :class => "avatar" %>
<% end%></td>
<tr>
</table>
</div>

View File

@ -0,0 +1,37 @@
<%= form_for(@share) do |f| %>
<% if @share.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@share.errors.count, "error") %> prohibited this share from being saved:</h2>
<ul>
<% @share.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="field">
<%= f.label :access_token %><br />
<%= f.text_field :access_token %>
</div>
<div class="field">
<%= f.label :comment %><br />
<%= f.text_field :comment %>
</div>
<div class="field">
<%= f.label :url %><br />
<%= f.text_field :url %>
</div>
<div class="field">
<%= f.label :title %><br />
<%= f.text_field :title %>
</div>
<div class="field">
<%= f.label :share_type %><br />
<%= f.number_field :share_type %>
</div>
<div class="actions">
<%= f.submit %>
</div>
<% end %>

View File

@ -0,0 +1,6 @@
<h1>Editing share</h1>
<%= render 'form' %>
<%= link_to 'Show', @share %> |
<%= link_to 'Back', shares_path %>

View File

@ -0,0 +1,31 @@
<h1>Listing shares</h1>
<table>
<tr>
<th>Access token</th>
<th>Comment</th>
<th>Url</th>
<th>Title</th>
<th>Share type</th>
<th></th>
<th></th>
<th></th>
</tr>
<% @shares.each do |share| %>
<tr>
<td><%= share.access_token %></td>
<td><%= share.comment %></td>
<td><%= share.url %></td>
<td><%= share.title %></td>
<td><%= share.share_type %></td>
<td><%= link_to 'Show', share %></td>
<td><%= link_to 'Edit', edit_share_path(share) %></td>
<td><%= link_to 'Destroy', share, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</table>
<br />
<%= link_to 'New Share', new_share_path %>

View File

@ -0,0 +1,5 @@
<h1>New share</h1>
<%= render 'form' %>
<%= link_to 'Back', shares_path %>

View File

@ -0,0 +1,30 @@
<p id="notice"><%= notice %></p>
<p>
<b>Access token:</b>
<%= @share.access_token %>
</p>
<p>
<b>Comment:</b>
<%= @share.comment %>
</p>
<p>
<b>Url:</b>
<%= @share.url %>
</p>
<p>
<b>Title:</b>
<%= @share.title %>
</p>
<p>
<b>Share type:</b>
<%= @share.share_type %>
</p>
<%= link_to 'Edit', edit_share_path(@share) %> |
<%= link_to 'Back', shares_path %>

View File

@ -8,7 +8,6 @@
</li>
<% end %>
<% end %>
<% if users_results.size > 0 %>
<hr />
<h3>Users:</h3>

View File

@ -1,4 +1,16 @@
<div class="splitcontentleft">
<style type="text/css">
.tags_left{
width: 30%;
float:left;
}
.tags_right{
padding-top:18px;
width: 68%;
float:right;
}
</style>
<div class="tags_left">
<ul>
<li>
Selected Tags
@ -15,7 +27,7 @@
</ul>
</div>
<div class="splitcontentright">
<div class="tags_right">
<h2>Search Results</h2>
<div id="filter-menu" align="right">
<%= link_to "Issue",:action => "index"%>(<%= @issues_tags_num %>)|

View File

@ -94,36 +94,6 @@
&nbsp;
<div class="autoscroll">
<!-- <table class="list">
<thead><tr>
<%= sort_header_tag('login', :caption => l(:field_login)) %>
<%= sort_header_tag('firstname', :caption => l(:field_firstname)) %>
<%= sort_header_tag('lastname', :caption => l(:field_lastname)) %>
<%= sort_header_tag('mail', :caption => l(:field_mail)) %>
<%= sort_header_tag('admin', :caption => l(:field_admin), :default_order => 'desc') %>
<%= sort_header_tag('created_on', :caption => l(:field_created_on), :default_order => 'desc') %>
<%= sort_header_tag('last_login_on', :caption => l(:field_last_login_on), :default_order => 'desc') %>
<th></th>
</tr></thead>
<tbody>
<% for user in @users -%>
<tr class="<%= user.css_classes %> <%= cycle("odd", "even") %>">
<td class="username"><%= avatar(user, :size => "14") %><%= link_to h(user.login), edit_user_path(user) %></td>
<td class="firstname"><%= h(user.firstname) %></td>
<td class="lastname"><%= h(user.lastname) %></td>
<td class="email"><%= mail_to(h(user.mail)) %></td>
<td align="center"><%= checked_image user.admin? %></td>
<td class="created_on" align="center"><%= format_time(user.created_on) %></td>
<td class="last_login_on" align="center"><%= format_time(user.last_login_on) unless user.last_login_on.nil? %></td>
<td class="buttons">
<%= change_status_link(user) %>
<%= delete_link user_path(user, :back_url => users_path(params)) unless User.current == user %>
</td>
</tr>
<% end -%>
</tbody>
</table> -->
<% for user in @users -%>
<div class="well">
<%= content_tag "p", "#{date_format_local(user.created_on)}#{l(:label_member_since)}", :class => "float_right member_since" %>
@ -142,12 +112,10 @@
</div>
<% end -%>
</div>
<!-- <p class="pagination"> -->
<div class="pagination">
<ul>
<%= pagination_links_full @user_pages, @user_count %>
<ul>
</div>
<!-- </p> -->
<% html_title(l(:label_user_plural)) -%>
<% end -%>

View File

@ -1,4 +1,14 @@
$('#tags_show').html('<%= escape_javascript(render :partial => 'layouts/tag_name',:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
<% if @obj_flag == '3'%>
$('#tags_show_issue').html('<%= escape_javascript(render :partial => 'layouts/tag_name',
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
$('#put-tag-form-issue').hide();
$('#name-issue').val("");
<% else %>
$('#tags_show').html('<%= escape_javascript(render :partial => 'layouts/tag_name',
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
$('#put-tag-form').hide();
$('#name').val("");
<% end %>

View File

@ -16,6 +16,9 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
RedmineApp::Application.routes.draw do
resources :shares
get "tags/index"
get "tags/show"
@ -408,13 +411,13 @@ RedmineApp::Application.routes.draw do
delete 'bids/destroy', :to => 'bids#destroy'
get 'bids/more', :to => 'bids#more'
get 'bids/back', :to=> 'bids#back'
match 'bids/:bid_id/show_project', :controller => 'bids', :action => 'show_project'
match 'bids/:bid_id/show_project', :controller => 'bids', :action => 'show_project', :as => 'project_for_bid'
match 'bids/:bid_id/add', :controller => 'bids', :action => 'add'
match 'bids/new_bid', :controller => 'bids', :action => 'new_bid'
# added by young
match 'bids', :controller => 'bids', :action => 'index'
match 'bids/:bid_id/show', :controller => 'bids', :action => 'show'
match 'bids/:bid_id/show', :controller => 'bids', :action => 'show', :as => 'respond'
match 'bids/new', :controller => 'bids', :action => 'new', :via => [:get , :post]

View File

@ -0,0 +1,13 @@
class CreateShares < ActiveRecord::Migration
def change
create_table :shares do |t|
t.string :access_token
t.string :comment
t.string :url
t.string :title
t.integer :share_type
t.timestamps
end
end
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20130729033444) do
ActiveRecord::Schema.define(:version => 20130801081314) do
create_table "a_user_watchers", :force => true do |t|
t.string "name"
@ -516,10 +516,11 @@ ActiveRecord::Schema.define(:version => 20130729033444) do
add_index "settings", ["name"], :name => "index_settings_on_name"
create_table "shares", :force => true do |t|
t.string "title"
t.string "type"
t.string "access_token"
t.string "comment"
t.string "url"
t.date "created_on"
t.string "title"
t.integer "share_type"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

@ -1072,7 +1072,7 @@ div.wiki-description {
float: left;
margin-left: 20px;
margin-top: 10px;
width: 427px;
width: 470px;
max-height: 121px;
font-family: helvetica,arial,sans-serif;
color: rgb(0, 0, 0);
@ -1199,6 +1199,10 @@ a.img-tag3{
width: 908px;
margin-bottom: 5px;
}
.add-info a {
margin-left: 60px;
}
.main-language {
float: left;
height: 18px;
@ -1416,7 +1420,7 @@ div.autoscroll li{
list-style-type: none;
}
div.autoscroll li.hascontextmenu{
div.autoscroll li.hascontextmenu-1{
position: relative;
display: block;
margin-bottom: -1px;
@ -1426,6 +1430,9 @@ div.autoscroll li.hascontextmenu{
width: 600px;/*by young*/
}
.hascontextmenu-1 a {
cursor: pointer ;
}
div.autoscroll li.id {
position: relative;
top: 2px;
@ -1464,7 +1471,9 @@ div.autoscroll li.tracker, div.autoscroll li.status, div.autoscroll li.priority{
font: 10px/1.4 Helvetica,arial,freesans,clean,sans-serif;
}
div.autoscroll ul.list-group-item-meta a {
color: rgb(51, 51, 51);
}
li.issue img.img-tag-issues {
float: left;
height: 24px;
@ -1516,3 +1525,17 @@ div.member_content {
width: 600px;
margin-left: 40px;
}
/*by fanqiang*/
img.avatar3 {
width: 50px;
height: 50px;
}
a.bid_path {
font-size: 14px;
}
a.bid_user {
font-family:微软雅黑;
color:#acaeb1;
font-size:12px;
}