修改软件创客搜索结果显示样式

GitlabVersion
sw 11 years ago
parent 0f3c2ff558
commit 999a252f7b

@ -37,32 +37,36 @@
<div class="autoscroll">
<% if @users.size > 0 %>
<% @users.each do |user| -%>
<% unless user.id == 1%>
<div class="well">
<%= content_tag "p", "#{format_date(user.created_on)}#{l(:label_member_since)}", :class => "float_right member_since" %>
<%= image_tag "/images/time_member.png", :class => "img_member_time"%>
<div>
<%= image_tag(url_to_avatar(user), :class => 'avatar') %>
<%= content_tag "span", link_to_user(user), :class => "nomargin avatar_name" %>
</div>
<div style="margin-top: 20px;margin-left:66px">
<%= l(:label_has_fans,:count=>user.watcher_users.count)%>
<%= l(:label_has_watchers,:count=>User.watched_by(user.id).count) %>
</div>
<div class="user-bottom">
<% unless user.memberships.empty? %>
<%= l(:label_contribute_to, :project_count => "#{user.memberships.count}") %>
<% for member in user.memberships %>
<%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : '' %>
<% end %>
<% end %>
<%= user.changesets.count == 0 ? '' : ",#{l(:label_total_commit, :total_commit => user.changesets.count)}" %>
</div>
</div>
<% end -%>
<% end -%>
<%= render :partial => 'user_show' %>
<!--
<%# @users.each do |user| -%>
<%# unless user.id == 1%>
<div class="well">
<%#= content_tag "p", "#{format_date(user.created_on)}#{l(:label_member_since)}", :class => "float_right member_since" %>
<%#= image_tag "/images/time_member.png", :class => "img_member_time"%>
<div>
<%#= image_tag(url_to_avatar(user), :class => 'avatar') %>
<%#= content_tag "span", link_to_user(user), :class => "nomargin avatar_name" %>
</div>
<div style="margin-top: 20px;margin-left:66px">
<%#= l(:label_has_fans,:count=>user.watcher_users.count)%>
<%#= l(:label_has_watchers,:count=>User.watched_by(user.id).count) %>
</div>
<div class="user-bottom">
<%# unless user.memberships.empty? %>
<%#= l(:label_contribute_to, :project_count => "#{user.memberships.count}") %>
<%# for member in user.memberships %>
<%#= link_to_project(member.project) %><%#= (user.memberships.last == member) ? '' : '' %>
<%# end %>
<%# end %>
<%#= user.changesets.count == 0 ? '' : ",#{l(:label_total_commit, :total_commit => user.changesets.count)}" %>
</div>
</div>
<%# end -%>
<%# end -%>
-->
<% else %>
<%= render :partial => "layouts/no_content"%>
<% end %>

@ -1,10 +1,75 @@
/*
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
(function(){function c(b){var c=this instanceof CKEDITOR.ui.dialog.checkbox;b.hasAttribute(this.id)&&(b=b.getAttribute(this.id),c?this.setValue(e[this.id]["true"]==b.toLowerCase()):this.setValue(b))}function d(b){var c=""===this.getValue(),a=this instanceof CKEDITOR.ui.dialog.checkbox,d=this.getValue();c?b.removeAttribute(this.att||this.id):a?b.setAttribute(this.id,e[this.id][d]):b.setAttribute(this.att||this.id,d)}var e={scrolling:{"true":"yes","false":"no"},frameborder:{"true":"1","false":"0"}};
CKEDITOR.dialog.add("iframe",function(b){var f=b.lang.iframe,a=b.lang.common,e=b.plugins.dialogadvtab;return{title:f.title,minWidth:350,minHeight:260,onShow:function(){this.fakeImage=this.iframeNode=null;var a=this.getSelectedElement();a&&(a.data("cke-real-element-type")&&"iframe"==a.data("cke-real-element-type"))&&(this.fakeImage=a,this.iframeNode=a=b.restoreRealElement(a),this.setupContent(a))},onOk:function(){var a;a=this.fakeImage?this.iframeNode:new CKEDITOR.dom.element("iframe");var c={},d=
{};this.commitContent(a,c,d);a=b.createFakeElement(a,"cke_iframe","iframe",!0);a.setAttributes(d);a.setStyles(c);this.fakeImage?(a.replace(this.fakeImage),b.getSelection().selectElement(a)):b.insertElement(a)},contents:[{id:"info",label:a.generalTab,accessKey:"I",elements:[{type:"vbox",padding:0,children:[{id:"src",type:"text",label:a.url,required:!0,validate:CKEDITOR.dialog.validate.notEmpty(f.noUrl),setup:c,commit:d}]},{type:"hbox",children:[{id:"width",type:"text",requiredContent:"iframe[width]",
style:"width:100%",labelLayout:"vertical",label:a.width,validate:CKEDITOR.dialog.validate.htmlLength(a.invalidHtmlLength.replace("%1",a.width)),setup:c,commit:d},{id:"height",type:"text",requiredContent:"iframe[height]",style:"width:100%",labelLayout:"vertical",label:a.height,validate:CKEDITOR.dialog.validate.htmlLength(a.invalidHtmlLength.replace("%1",a.height)),setup:c,commit:d},{id:"align",type:"select",requiredContent:"iframe[align]","default":"",items:[[a.notSet,""],[a.alignLeft,"left"],[a.alignRight,
"right"],[a.alignTop,"top"],[a.alignMiddle,"middle"],[a.alignBottom,"bottom"]],style:"width:100%",labelLayout:"vertical",label:a.align,setup:function(a,b){c.apply(this,arguments);if(b){var d=b.getAttribute("align");this.setValue(d&&d.toLowerCase()||"")}},commit:function(a,b,c){d.apply(this,arguments);this.getValue()&&(c.align=this.getValue())}}]},{type:"hbox",widths:["50%","50%"],children:[{id:"scrolling",type:"checkbox",requiredContent:"iframe[scrolling]",label:f.scrolling,setup:c,commit:d},{id:"frameborder",
type:"checkbox",requiredContent:"iframe[frameborder]",label:f.border,setup:c,commit:d}]},{type:"hbox",widths:["50%","50%"],children:[{id:"name",type:"text",requiredContent:"iframe[name]",label:a.name,setup:c,commit:d},{id:"title",type:"text",requiredContent:"iframe[title]",label:a.advisoryTitle,setup:c,commit:d}]},{id:"longdesc",type:"text",requiredContent:"iframe[longdesc]",label:a.longDescr,setup:c,commit:d}]},e&&e.createAdvancedTab(b,{id:1,classes:1,styles:1},"iframe")]}})})();
*/
(function () {
function c(b) {
var c = this instanceof CKEDITOR.ui.dialog.checkbox;
b.hasAttribute(this.id) && (b = b.getAttribute(this.id), c ? this.setValue(e[this.id]["true"] == b.toLowerCase()) : this.setValue(b))
}
function d(b) {
var c = "" === this.getValue(), a = this instanceof CKEDITOR.ui.dialog.checkbox, d = this.getValue();
c ? b.removeAttribute(this.att || this.id) : a ? b.setAttribute(this.id, e[this.id][d]) : b.setAttribute(this.att || this.id, d)
}
var e = {scrolling: {"true": "yes", "false": "no"}, frameborder: {"true": "1", "false": "0"}};
CKEDITOR.dialog.add("iframe", function (b) {
var f = b.lang.iframe, a = b.lang.common, e = b.plugins.dialogadvtab;
return{title: f.title, minWidth: 350, minHeight: 260, onShow: function () {
this.fakeImage = this.iframeNode = null;
var a = this.getSelectedElement();
a && (a.data("cke-real-element-type") && "iframe" == a.data("cke-real-element-type")) && (this.fakeImage = a, this.iframeNode = a = b.restoreRealElement(a), this.setupContent(a))
}, onOk: function () {
var a;
a = this.fakeImage ? this.iframeNode : new CKEDITOR.dom.element("iframe");
var c = {}, d =
{};
this.commitContent(a, c, d);
a = b.createFakeElement(a, "cke_iframe", "iframe", !0);
a.setAttributes(d);
a.setStyles(c);
this.fakeImage ? (a.replace(this.fakeImage), b.getSelection().selectElement(a)) : b.insertElement(a)
}, contents: [
{id: "info", label: a.generalTab, accessKey: "I", elements: [
{type: "vbox", padding: 0, children: [
{id: "src", type: "text", label: a.url, required: !0, validate: CKEDITOR.dialog.validate.notEmpty(f.noUrl), setup: c, commit: d}
]},
{type: "hbox", children: [
{id: "width", type: "text", requiredContent: "iframe[width]",
style: "width:100%", labelLayout: "vertical", label: a.width, validate: CKEDITOR.dialog.validate.htmlLength(a.invalidHtmlLength.replace("%1", a.width)), setup: c, commit: d},
{id: "height", type: "text", requiredContent: "iframe[height]", style: "width:100%", labelLayout: "vertical", label: a.height, validate: CKEDITOR.dialog.validate.htmlLength(a.invalidHtmlLength.replace("%1", a.height)), setup: c, commit: d},
{id: "align", type: "select", requiredContent: "iframe[align]", "default": "", items: [
[a.notSet, ""],
[a.alignLeft, "left"],
[a.alignRight,
"right"],
[a.alignTop, "top"],
[a.alignMiddle, "middle"],
[a.alignBottom, "bottom"]
], style: "width:100%", labelLayout: "vertical", label: a.align, setup: function (a, b) {
c.apply(this, arguments);
if (b) {
var d = b.getAttribute("align");
this.setValue(d && d.toLowerCase() || "")
}
}, commit: function (a, b, c) {
d.apply(this, arguments);
this.getValue() && (c.align = this.getValue())
}}
]},
{type: "hbox", widths: ["50%", "50%"], children: [
{id: "scrolling", type: "checkbox", requiredContent: "iframe[scrolling]", label: f.scrolling, setup: c, commit: d},
{id: "frameborder",
type: "checkbox", requiredContent: "iframe[frameborder]", label: f.border, setup: c, commit: d}
]},
{type: "hbox", widths: ["50%", "50%"], children: [
{id: "name", type: "text", requiredContent: "iframe[name]", label: a.name, setup: c, commit: d},
{id: "title", type: "text", requiredContent: "iframe[title]", label: a.advisoryTitle, setup: c, commit: d}
]},
{id: "longdesc", type: "text", requiredContent: "iframe[longdesc]", label: a.longDescr, setup: c, commit: d}
]},
e && e.createAdvancedTab(b, {id: 1, classes: 1, styles: 1}, "iframe")
]}
})
})();
Loading…
Cancel
Save