Merge branch 'develop' of 10.0.47.245:/home/trustie2 into develop
This commit is contained in:
commit
ff0e1df0a2
|
@ -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>
|
|
@ -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.
|
|
@ -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;
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
/*
|
||||
Place all the styles related to the matching controller here.
|
||||
They will automatically be included in application.css.
|
||||
*/
|
|
@ -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
|
|
@ -17,7 +17,7 @@
|
|||
class UsersController < ApplicationController
|
||||
layout 'base_users'
|
||||
|
||||
before_filter :require_admin, :except => [:show, :index,:tag_save]
|
||||
before_filter :require_admin, :except => [:show, :index,:tag_save, :user_projects, :user_newfeedback, :user_comments]
|
||||
before_filter :find_user, :only => [:show, :edit, :update, :destroy, :edit_membership, :destroy_membership, :user_activities, :user_projects, :user_newfeedback, :user_comments]
|
||||
accept_api_auth :index, :show, :create, :update, :destroy
|
||||
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
module SharesHelper
|
||||
end
|
|
@ -0,0 +1,3 @@
|
|||
class Share < ActiveRecord::Base
|
||||
attr_accessible :access_token, :comment, :share_type, :title, :url
|
||||
end
|
|
@ -78,6 +78,7 @@
|
|||
|
||||
<li id="issue-<%= issue.id %>" class="hascontextmenu <%= issue.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
|
||||
<% column_content = ( query.inline_columns.map {|column| "<li class=\"#{column.css_classes}\">#{column_content(column, issue)}</li>"}) %>
|
||||
<%= image_tag("/images/issues.png", :class => "img-tag-issues") %>
|
||||
<ul class="issue_list">
|
||||
<%= raw column_content[0] %>
|
||||
<%= raw column_content[4] %>
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<div id="footer" style="margin-left:-5px;padding-top: 10px;clear: both;">
|
||||
<div class="bgl"><div class="bgr">
|
||||
Powered by <%= link_to Redmine::Info.app_name, Redmine::Info.url %> © 2006-2013 Jean-Philippe Lang
|
||||
</div></div>
|
||||
</div>
|
|
@ -119,7 +119,9 @@
|
|||
<%= call_hook :view_layouts_base_content %>
|
||||
<div style="clear:both;"></div>
|
||||
<%= render_flash_messages %>
|
||||
|
||||
</div>
|
||||
<%=render :partial => 'layouts/base_footer'%>
|
||||
</div>
|
||||
|
||||
<div id="ajax-indicator" style="display:none;">
|
||||
|
|
|
@ -19,15 +19,7 @@
|
|||
<div id="wrapper">
|
||||
<div id="wrapper2">
|
||||
<div id="wrapper3">
|
||||
<div id="top-menu" style="background-color: #FFFFFF">
|
||||
<div id="account">
|
||||
<div id="top-menu" style="background-color: #FFFFFF">
|
||||
<%= render_menu :account_menu -%>
|
||||
</div>
|
||||
<%= content_tag('div', "#{l(:label_logged_as)} #{link_to_user(User.current, :format => :username)}".html_safe, :id => 'loggedas') if User.current.logged? %>
|
||||
<%= render_menu :top_menu if User.current.logged? || !Setting.login_required? -%>
|
||||
</div>
|
||||
|
||||
<%=render :partial => 'layouts/base_header'%>
|
||||
<div id="main" class="">
|
||||
<!--user page-->
|
||||
<div id="sidebar">
|
||||
|
@ -139,7 +131,10 @@
|
|||
<%= call_hook :view_layouts_base_content %>
|
||||
<div style="clear:both;"></div>
|
||||
<%= render_flash_messages %>
|
||||
|
||||
</div>
|
||||
<%=render :partial => 'layouts/base_footer'%>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="ajax-indicator" style="display:none;">
|
||||
|
@ -150,6 +145,7 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= call_hook :view_layouts_base_body_bottom %>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -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 %>
|
|
@ -0,0 +1,6 @@
|
|||
<h1>Editing share</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Show', @share %> |
|
||||
<%= link_to 'Back', shares_path %>
|
|
@ -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 %>
|
|
@ -0,0 +1,5 @@
|
|||
<h1>New share</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Back', shares_path %>
|
|
@ -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 %>
|
|
@ -94,36 +94,6 @@
|
|||
|
||||
|
||||
<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" %>
|
||||
|
@ -137,19 +107,15 @@
|
|||
<%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : ',' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</p>
|
||||
<p>
|
||||
<%= user.changesets.count == 0 ? '' : "#{l(:label_total_commit, :total_commit => user.changesets.count)}" %> | managed 7 projects | Most experience in c++
|
||||
<%= user.changesets.count == 0 ? '' : ",#{l(:label_total_commit, :total_commit => user.changesets.count)}" %>
|
||||
</p>
|
||||
</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 -%>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<td colspan="2" valign="top"><strong> <%= content_tag('span', h(e.project), :class => 'project') %></strong> <span class="font_lighter">有了最新动态</span> <%= link_to format_activity_title(e.event_title), e.event_url %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580" ><p class="font_description"><%= format_activity_description(e.event_description) %></p></td>
|
||||
<td colspan="2" width="580" ><p class="font_description"><%= textilizable e.event_description %></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left"><a class="font_lighter"></a></td>
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
|
@ -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 |
Binary file not shown.
After Width: | Height: | Size: 3.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.0 KiB |
|
@ -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);
|
||||
|
@ -1103,7 +1103,9 @@ a.project {
|
|||
float: left;
|
||||
margin-top: 0px;
|
||||
width: 908px;
|
||||
height: 148px;
|
||||
min-height: 120px;
|
||||
height: auto;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
a.root {
|
||||
|
@ -1118,7 +1120,7 @@ a.root {
|
|||
margin-right: auto;
|
||||
margin-bottom: 10px;
|
||||
width: 908px;
|
||||
height: 250px;
|
||||
height: auto;
|
||||
padding-top: 10px;
|
||||
padding-left: 10px;
|
||||
padding-bottom: 10px;
|
||||
|
@ -1191,9 +1193,15 @@ a.img-tag3{
|
|||
}
|
||||
|
||||
.add-info {
|
||||
margin-top: 160px;
|
||||
float: left;
|
||||
margin-top: 0px;
|
||||
height: 20px;
|
||||
width: 908px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.add-info a {
|
||||
margin-left: 60px;
|
||||
}
|
||||
.main-language {
|
||||
float: left;
|
||||
|
@ -1247,8 +1255,8 @@ a.tag {
|
|||
div.well {
|
||||
color: black;
|
||||
min-height: 20px;
|
||||
height: 110px;
|
||||
padding: 19px;
|
||||
height: auto;
|
||||
padding: 19px 19px 6px 19px;
|
||||
margin-bottom: 20px;
|
||||
background-color: #f5f5f5;
|
||||
border: 1px solid #eee;
|
||||
|
@ -1400,6 +1408,7 @@ div.issue-note .description {
|
|||
*/
|
||||
|
||||
div.autoscroll ul.issue_list {
|
||||
margin-left: 30px;
|
||||
|
||||
}
|
||||
div.autoscroll ul {
|
||||
|
@ -1411,15 +1420,19 @@ div.autoscroll li{
|
|||
list-style-type: none;
|
||||
}
|
||||
|
||||
div.autoscroll li.hascontextmenu{
|
||||
div.autoscroll li.hascontextmenu-1{
|
||||
position: relative;
|
||||
display: block;
|
||||
margin-bottom: -1px;
|
||||
margin-left: 10px;
|
||||
padding: 8px 10px 10px 10px;/*by young*/
|
||||
border: 1px solid rgb(229,229,229);
|
||||
width: 650px;/*by young*/
|
||||
width: 600px;/*by young*/
|
||||
}
|
||||
|
||||
.hascontextmenu-1 a {
|
||||
cursor: pointer ;
|
||||
}
|
||||
div.autoscroll li.id {
|
||||
position: relative;
|
||||
top: 2px;
|
||||
|
@ -1434,12 +1447,12 @@ div.autoscroll li.id a {
|
|||
|
||||
div.autoscroll li.subject {
|
||||
margin:0px 60px 0px 0px;
|
||||
font-size: 15px;
|
||||
font-size: small;
|
||||
line-height: 1.3;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
div.autoscroll li.subject a{
|
||||
color: rgb(0, 0, 0);
|
||||
color: rgb(51, 51, 51);
|
||||
}
|
||||
div.autoscroll ul.list-group-item-meta{
|
||||
font-size: 11px;
|
||||
|
@ -1454,9 +1467,18 @@ div.autoscroll ul.list-group-item-meta li {
|
|||
}
|
||||
|
||||
div.autoscroll li.tracker, div.autoscroll li.status, div.autoscroll li.priority{
|
||||
color: rgb(17, 102, 153);
|
||||
color: rgb(51, 51, 51);
|
||||
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;
|
||||
width: 24px;
|
||||
}
|
||||
|
||||
/*
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue