  
                    





                
          
  




<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh" xml:lang="zh">
  <head>
                    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
                                    <title>博瑞开源</title>
                        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
                <link rel="shortcut icon" href="/xwiki/resources/favicon.ico" />
        <link rel="icon" href="/xwiki/resources/favicon16.png" type="image/png" />
                <link rel="apple-touch-icon" href="/xwiki/resources/favicon144.png" />
                <meta http-equiv="Content-Script-Type" content="text/javascript" />
                        <meta http-equiv="imagetoolbar" content="no"/>
                                <link rel="canonical" href="xwiki.Main.UserDirectory.html" />
                            <meta name="document" content="Main.UserDirectory"/>
    <meta name="wiki" content="xwiki"/>
    <meta name="space" content="Main"/>
    <meta name="page" content="UserDirectory"/>
    <meta name="version" content="1.1"/>
    <meta name="restURL" content="/xwiki/rest/wikis/xwiki/spaces/Main/pages/UserDirectory"/>
    <meta name="form_token" content="82NYJYoee0DZIHDizGQagg"/>
                <meta name="gwt:property" content="locale=zh" />
                <meta name="revisit-after" content="7 days" />
<meta name="description" content="User Directory" />
<meta name="keywords" content="wiki" />
<meta name="distribution" content="GLOBAL" />
<meta name="rating" content="General" />
<meta name="author" content="Administrator" />
<meta http-equiv="reply-to" content="" />
<meta name="language" content="zh" />
<link rel="alternate" type="application/rss+xml" title="Wiki Feed RSS" href="https://www.bropen.com.cn/xwiki/bin/view/Main/WebRss;jsessionid=B0512B7F4F40636635CCC27B9C64A035?xpage=rdf" />
<link rel="alternate" type="application/rss+xml" title="Blog RSS Feed" href="https://www.bropen.com.cn/xwiki/bin/view/Blog/GlobalBlogRss;jsessionid=B0512B7F4F40636635CCC27B9C64A035?xpage=plain" />

                <!-- com.xpn.xwiki.plugin.skinx.LinkExtensionPlugin -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
<link href="skins/colibri/style.css?colorTheme=ColorThemes.Dusk" rel="stylesheet" type="text/css" media="all" />
<link href="skins/colibri/print.css?colorTheme=ColorThemes.Dusk" rel="stylesheet" type="text/css" media="print" />
        <!--[if IE]>
  <link href="skins/colibri/ie-all.css?colorTheme=ColorThemes.Dusk" rel="stylesheet" type="text/css" />
<![endif]-->
    <!-- com.xpn.xwiki.plugin.skinx.CssResourceSkinExtensionPlugin -->
  <!-- com.xpn.xwiki.plugin.skinx.CssSkinExtensionPlugin -->
  <!-- com.xpn.xwiki.plugin.skinx.CssSkinFileExtensionPlugin -->

    



  
  
                                                                                                                                                                                                                      
    
      <!-- com.xpn.xwiki.plugin.skinx.JsResourceSkinExtensionPlugin -->
    <!-- com.xpn.xwiki.plugin.skinx.JsSkinFileExtensionPlugin -->
    <!-- com.xpn.xwiki.plugin.skinx.JsSkinExtensionPlugin -->

<script type="text/javascript" src="resources/js/xwiki/compatibility.js" defer="defer"></script>
<script type="text/javascript" src="resources/js/xwiki/markerScript.js" defer="defer"></script>
<script type="text/javascript">
// <![CDATA[
require.config({
  baseUrl: '/',
    paths: { 'jquery': "resources/js/amd/jquery" },
  map: {
    '*': { 'jquery': 'jQueryNoConflict' },
    'jQueryNoConflict': { 'jquery': 'jquery' }
  }
});
define('jQueryNoConflict', ['jquery'], function($) { $.noConflict(); return $; });
XWiki.webapppath = "xwiki/";
XWiki.servletpath = "bin/";
XWiki.contextPath = "/xwiki";
XWiki.mainWiki = "xwiki";
XWiki.currentWiki = "xwiki";
XWiki.currentSpace = "Main";
XWiki.currentPage = "UserDirectory";
XWiki.editor = "";
XWiki.viewer = "";
XWiki.contextaction = "export";
XWiki.docisnew = false;
XWiki.docsyntax = "xwiki/2.1";
XWiki.docvariant = "";
XWiki.blacklistedSpaces = [ "Import","Panels","Scheduler","Stats","XAppClasses","XAppSheets","XAppTemplates","XWiki","WatchCode","WatchSheets","XApp","WatchAdmin","Watch","ColorThemes","AnnotationCode" ];
XWiki.hasEdit = false;
XWiki.hasProgramming = false;
XWiki.hasBackupPackImportRights = false;
XWiki.hasRenderer = true;
window.docviewurl = "xwiki.Main.UserDirectory.html";
window.docediturl = "";
window.docsaveurl = "";
window.docgeturl = "";
// ]]>
</script>

		<script>var o = {
			name: 'XWikiGuest',
			username:'XWikiGuest',
			ip:'216.73.216.143, ::1',
									j:'B0512B7F4F40636635CCC27B9C64A035'}</script>
  </head>
  <body id="body" class="wiki-xwiki space-Main viewbody hideleft doc-Main_UserDirectory admin_false">
<div id="xwikimaincontainer">
<div id="xwikimaincontainerinner">

  <div id="menuview">
    <div id="mainmenu" class="layoutsubsection actionmenu">
<div class="gradientfilterIE"></div>
<div class="componentcontainer">
<strong id="xwikimenutitle" class="hidden">一般动作</strong>
<div class="rightmenu">
      <div id="tmLogin" class="tmLogin topmenuentry ">
   <a class="tme" href=""><strong>登录</strong></a>
  </div>
  </div>
<div class="leftmenu">
            <div id="tmWiki" class="tmWiki topmenuentry dropdownmenuentry dropdownnolink hasIcon" onmouseover="showsubmenu(this);" onmouseout="hidesubmenu(this);">
<span class="tme-extensible">
              <span class="tmetype">Wiki: </span><a class="tme hastype" href=""><strong>BROPEN</strong></a>
         <span class="menuarrow">&#9660;</span><span class="hidden menucolon">: </span>
</span><span class="submenu hidden">
                        <span class="submenuitem "><a href="" id="tmWikiDocumentIndex" class="tmWikiDocumentIndex">Document Index</a></span>
            </span></div>
  <div class="topmenuentry"><span class="separator">&raquo;</span></div>
  <div id="tmSpace" class="tmSpace topmenuentry dropdownmenuentry dropdownnolink hasIcon" onmouseover="showsubmenu(this);" onmouseout="hidesubmenu(this);">
<span class="tme-extensible">
              <span class="tmetype">Space: </span><a class="tme hastype" href=""><strong>Main</strong></a>
         <span class="menuarrow">&#9660;</span><span class="hidden menucolon">: </span>
</span><span class="submenu hidden">
              <span class="submenuitem "><a href="" id="tmSpaceDocumentIndex" class="tmSpaceDocumentIndex">Document Index</a></span>
      </span></div>
<div class="topmenuentry"><span class="separator">&raquo;</span></div>
  <div id="tmPage" class="tmPage topmenuentry hasIcon">
              <span class="tmetype">Page: </span><a class="tme hastype" href="xwiki.Main.UserDirectory.html"><strong>UserDirectory</strong></a>
       </div>
</div>
</div>
</div>

  </div>
 <div id="headerglobal" class="layoutsection">
<div class="minwidthd"></div>
  <div id="company">
  <div id="companylogo">
    <a href="" title="Home" rel="home">
    <img src="/xwiki/resources/logo_bropen.png" alt="Wiki Logo"/>
    </a>
  </div>   </div>   <div id="globallinks">
        <form action="">
      <div class="globalsearch">
        <label class="hidden" for="headerglobalsearchinput">搜索</label><input class="globalsearchinput withTip" id="headerglobalsearchinput" type="text" name="text" value="查找中......" size="15"/><input class="button" type="image" value="查找" alt="查找" src="resources/icons/xwiki/search.png"/>
      </div>
    </form>
      <span class="glink" id="headerlanguages">
            <a href="xwiki.Main.UserDirectory.html" class="language-default language-current">default</a>
      </span>
  </div>   <div class="clearfloats"></div>
  </div> 

<div class="contenthideleft" id="contentcontainer">
<div id="contentcontainerinner">
<div class="leftsidecolumns">
  <div id="contentcolumn"> 
        <div class="main layoutsubsection">
      <div id="contentmenu" class="actionmenu">
    <div class="gradientfilterIE"></div>
<div class="componentcontainer">
<strong id="xwikicontentmenutitle" class="hidden">页面动作</strong>
<div class="rightmenu">
</div>
<div class="leftmenu">
  <div id="tmExport" class="tmExport topmenuentry dropdownmenuentry dropdownnolink " onmouseover="showsubmenu(this);" onmouseout="hidesubmenu(this);">
<span class="tme-extensible">
   <a class="tme"><strong>导出</strong></a>
    <span class="menuarrow">&#9660;</span><span class="hidden menucolon">: </span>
</span><span class="submenu hidden">
    <span class="submenuitem "><a href="xwiki.Main.UserDirectory.html" id="tmExportPdf" class="tmExportPdf">以PDF格式导出</a></span>
    <span class="submenuitem "><a href="" id="tmExportRtf" class="tmExportRtf">以RTF格式导出</a></span>
  <span class="submenuitem "><a href="" id="tmExportHtml" class="tmExportHtml">以HTML格式导出</a></span>
    </span></div>
  <div id="tmMoreActions" class="tmMoreActions topmenuentry dropdownmenuentry dropdownnolink " onmouseover="showsubmenu(this);" onmouseout="hidesubmenu(this);">
<span class="tme-extensible">
   <a class="tme"><strong>更多动作</strong></a>
    <span class="menuarrow">&#9660;</span><span class="hidden menucolon">: </span>
</span><span class="submenu hidden">
  <span class="submenuitem "><a href="xwiki.Main.UserDirectory.html" id="tmPrintPreview" class="tmPrintPreview">打印预览</a></span>
  <span class="submenuitem "><a href="xwiki.Main.UserDirectory.html" id="tmViewSource" class="tmViewSource">察看源码</a></span>
  </span></div>
  </div>
</div>
    </div>
    <div id="mainContentArea">
  
   <div id="hierarchy">
                              <a href=''>欢迎进入Wiki</a> <span class='separator'>&#187;</span> <span class='current'>User Directory</span>
                </div>

      <div id="document-title"><h1>Wiki源代码<a href="xwiki.Main.UserDirectory.html">User Directory</a></h1></div>
                <div id="document-info">
    <div class="xdocLastModification">       在2013-10-01 11:53上被<span class="wikilink"><a href="">Administrator</a></span>修改
    </div>
    <div>
          </div>
    <div class="clearfloats"></div>
  </div>

<div>
  <a href="xwiki.Main.UserDirectory.html" id="toggleLineNumbers">隐藏行号</a>
                                  <textarea readonly="readonly" class="wiki-code" rows="25" cols="80">
  1: {{velocity}}
  2: #set ($xwikiUsersClassReference = $services.model.createDocumentReference($xcontext.database, 'XWiki', 'XWikiUsers'))
  3: #set ($xwikiUsersClassName = $services.model.serialize($xwikiUsersClassReference))
  4: #set ($xwikiUsersClass = $xwiki.getClass($xwikiUsersClassName))
  5: #set ($directoryPreferencesClassReference = $services.model.createDocumentReference($xcontext.database, 'XWiki', 'UserDirectoryPreferencesClass'))
  6: #set ($directoryPreferencesClassName = $services.model.serialize($directoryPreferencesClassReference))
  7: ##
  8: ## Fake user used in some cases to properly display class properties
  9: #set ($fakeUser = false)
 10: ##
 11: ## Set the fixed columns that we want the user directory to always show.
 12: #set ($columns = ['_avatar', 'doc.fullName'])
 13: ##
 14: ## The columns that the user directory will default to when no user preferences exist or when the user resets to default.
 15: #set ($defaultColumns = ['first_name', 'last_name'])
 16: #set ($defaultColumnsString = $stringtool.join($defaultColumns, ' '))
 17: #set ($isCustomized = false)
 18: ##
 19: ## Guests and superadmin don't have an user profile and, therefore, no preferences. Offer default.
 20: #if ($isGuest || $isSuperAdmin)
 21:   #if ($isGuest)
 22:     {{info}}$services.localization.render('xe.userdirectory.canCustomizeInfoGuest', [&quot;path:$doc.getURL('login')&quot;]){{/info}}
 23:   #end
 24:   ## Use the default columns for guests or superadmin.
 25:   #set ($discard = $columns.addAll($defaultColumns))
 26:   ## Fake a user (in-memory) object inside a fake user profile page in order to be able to nicely display translated property pretty names of the XWikiUsers class.
 27:   #set ($userPreferences = $doc)
 28:   #set ($fakeUser = $doc.newObject($xwikiUsersClassName))
 29: #else
 30:   ## User is logged in.
 31:   #set ($userPreferences = $xwiki.getDocument($xcontext.userReference))
 32:   #set ($userPreference = $userPreferences.getObject($directoryPreferencesClassName))
 33:   #if (!$userPreference)
 34:     ## Fake a user directory preference (in-memory) object just to be able to display the default values nicely.
 35:     #set ($userPreference = $userPreferences.newObject($directoryPreferencesClassName))
 36:     #set ($discard = $userPreference.set('columns', $defaultColumnsString))
 37:   #end
 38:   ##
 39:   ## Read the user's preferences and build the list of columns to display.
 40:   #set ($userColumnsString = $!{userPreference.getProperty('columns').value.trim()})
 41:   #foreach ($column in $userColumnsString.split('\s+'))
 42:     ## Skip invalid or duplicate columns. Duplicate columns break the livetable filtering query.
 43:     #if ($column.trim() != '' &amp;&amp; $xwikiUsersClass.get($column) &amp;&amp; !$columns.contains($column))
 44:       #set ($discard = $columns.add($column))
 45:     #end
 46:   #end
 47:   ##
 48:   ## Check if they are the default preferences.
 49:   #if ($userColumnsString != $defaultColumnsString)
 50:     ## Mark it as a customized user directory.
 51:     #set ($isCustomized = true)
 52:   #end
 53:   ##
 54:   #set ($xredirect = $doc.getURL($xcontext.action, ${request.queryString}))
 55:   ##
 56:   ## Ability to customize the view.
 57:   ##
 58:   #if ($request.customize == 'true')
 59:     #if (&quot;$!request.action&quot; != '')
 60:       #if ($request.action == 'add')
 61:         #set ($columnToAdd = $request.value.trim())
 62:         #if (!$columns.contains($columnToAdd))
 63:           #set ($userColumnsString = &quot;$!userColumnsString $columnToAdd&quot;)
 64:           #set ($userColumnsString = $userColumnsString.trim())
 65:           #set ($discard = $userPreference.set('columns', $userColumnsString))
 66:           #set ($discard = $userPreferences.save('Updated user directory preferences.'))
 67:         #end
 68:       #elseif ($request.action == 'reset')
 69:         #set ($discard = $userPreferences.removeObject($userPreference))
 70:         #set ($discard = $userPreferences.save('Reset user directory preferences.'))
 71:       #elseif ($request.action == 'save')
 72:         #set ($discard = $userPreferences.updateObjectFromRequest($directoryPreferencesClassName))
 73:         #set ($discard = $userPreferences.save('Updated user directory preferences.'))
 74:       #end
 75:       ## Redirect using xredirect so that the page can be safely refreshed after an action.
 76:       $response.sendRedirect($request.xredirect)
 77:       #stop()
 78:     #end
 79:     ##
 80:     ## Customize form. Note: Using 2 forms to be able to do everything without JavaScript.
 81:     ##
 82:     == {{translation key=&quot;xe.userdirectory.customizeColumnsTitle&quot;/}} ==
 83:     {{html clean='false' wiki='true'}}
 84:     &lt;form class='xform half' action=&quot;$doc.getURL($xcontext.action, $request.queryString)&quot; method='post'&gt;
 85:       &lt;dl&gt;
 86:         &lt;dt class='label'&gt;
 87:           &lt;label&gt;{{translation key=&quot;xe.userdirectory.customizeAvailableColumnsLabel&quot;/}}&lt;/label&gt;
 88:           &lt;span class='xHint'&gt;{{translation key=&quot;xe.userdirectory.customizeAvailableColumnsHint&quot;/}}&lt;/span&gt;
 89:         &lt;/dt&gt;
 90:         &lt;dd&gt;
 91:           &lt;select name='value'&gt;
 92:           #foreach ($property in $xwikiUsersClass.properties)
 93:             ## Display translated class property pretty names.
 94:             &lt;option value=&quot;$property.name&quot;&gt;$userPreferences.displayPrettyName($property.name)&lt;/option&gt;
 95:           #end
 96:           &lt;/select&gt;
 97:         &lt;/dd&gt;
 98:         &lt;dt&gt;
 99:           &lt;input type='hidden' name='xredirect' value=&quot;$xredirect&quot; /&gt;
100:           &lt;input type='hidden' name='action' value='add' /&gt;
101:           &lt;span class='buttonwrapper'&gt;
102:             &lt;input type=&quot;submit&quot; class=&quot;button&quot; name=&quot;submit&quot; value=&quot;$services.localization.render('xe.userdirectory.customizeAddColumnButtonLabel')&quot; /&gt;
103:           &lt;/span&gt;
104:         &lt;/dt&gt;
105:       &lt;/dl&gt;
106:     &lt;/form&gt;
107:     &lt;form class='xform half' action=&quot;$doc.getURL($xcontext.action, $request.queryString)&quot; method='post'&gt;
108:       &lt;dl&gt;
109:         &lt;dt&gt;
110:           &lt;label&gt;{{translation key=&quot;xe.userdirectory.customizeSelectedColumnsLabel&quot;/}}&lt;/label&gt;
111:           &lt;span class='xHint'&gt;{{translation key=&quot;xe.userdirectory.customizeSelectedColumnsHint&quot;/}}&lt;/span&gt;
112:         &lt;/dt&gt;
113:         &lt;dd&gt;$userPreferences.display('columns', 'edit', $userPreference)&lt;/dd&gt;
114:         &lt;dt&gt;
115:           &lt;input type='hidden' name='xredirect' value=&quot;$xredirect&quot; /&gt;
116:           &lt;input type='hidden' name='action' value='save' /&gt;
117:           &lt;span class='buttonwrapper'&gt;
118:             &lt;input class='button' type='submit' name='submit' value=&quot;$services.localization.render('xe.userdirectory.customizeSaveButtonLabel')&quot;/&gt;
119:           &lt;/span&gt;
120:           &lt;span class=&quot;buttonwrapper&quot;&gt;
121:             &lt;a href=&quot;$doc.getURL($xcontext.action, &quot;$request.queryString&amp;amp;action=reset&amp;amp;xredirect=$escapetool.url($xredirect)&quot;)&quot; class='button secondary'&gt;{{translation key=&quot;xe.userdirectory.customizeResetButtonLabel&quot;/}}&lt;/a&gt;
122:           &lt;/span&gt;
123:         &lt;/dt&gt;
124:       &lt;/dl&gt;
125:     &lt;/form&gt;
126:     ##
127:     == {{translation key=&quot;xe.userdirectory.customizePreviewTitle&quot;/}} ==
128:     {{/html}}
129:   #elseif ($isCustomized)
130:     {{warning}}$services.localization.render('xe.userdirectory.isCustomizedWarning', [&quot;$doc.fullName&quot;, &quot;customize=true&amp;action=reset&amp;xredirect=$escapetool.url($xredirect)&quot;, &quot;$doc.fullName&quot;, 'customize=true']){{/warning}}
131:   #else
132:     {{info}}$services.localization.render('xe.userdirectory.canCustomizeInfo', [&quot;$doc.fullName&quot;, 'customize=true']){{/info}}
133:   #end
134: #end
135: ##
136: ## Build and display the resulting livetable.
137: ##
138: #set($columnsProperties = {})
139: ##
140: #foreach ($column in $columns)
141:   #set ($filterable = true)
142:   #set ($sortable = true)
143:   #set ($type = 'text')
144:   #set ($link = '')
145:   #set ($html = false)
146:   #set ($displayName = $userPreferences.displayPrettyName($column))
147:   #set ($classPropertyType = $xwikiUsersClass.get($column).type)
148:   #if ($column == '_avatar')
149:     #set ($type = 'none')
150:     #set ($html = true)
151:     #set ($sortable = false)
152:     #set ($link = 'view')
153:   #elseif ($column == 'doc.fullName')
154:     #set ($link = 'view')
155:   #elseif ($classPropertyType.endsWith('ListClass'))
156:     #set($type = 'list')
157:   #elseif ($classPropertyType.endsWith('NumberClass'))
158:     #set($type = 'number')
159:   #elseif ($classPropertyType.endsWith('PasswordClass'))
160:     #set($sortable = false)
161:   #end
162:   #set ($columnValue = { 'type' : $type, 'link' : $link, 'html' : $html, 'sortable' : $sortable, 'displayName' : $displayName })
163:   #set ($discard = $columnsProperties.put($column, $columnValue))
164: #end
165: ##
166: ## Allow other applications to provide a different data source for the user directory livetable. For example, some application might define a different membership relation.
167: #set ($userDirectoryLivetableResultsReference = $services.model.createDocumentReference($xcontext.database, 'XWiki', 'UserDirectoryLivetableResultsOverride'))
168: #if (!$xwiki.exists($userDirectoryLivetableResultsReference))
169:   ## If no override is present, use the default data source.
170:   #set ($userDirectoryLivetableResultsReference = $services.model.createDocumentReference($xcontext.database, 'XWiki', 'UserDirectoryLivetableResults'))
171: #end
172: #set ($options = {
173:    'resultPage' : &quot;$services.model.serialize($userDirectoryLivetableResultsReference)&quot;,
174:    'translationPrefix' : 'xe.userdirectory.',
175:    'tagCloud' : true,
176:    'rowCount': 10
177: })
178: #livetable('userdirectory' $columns $columnsProperties $options)
179: ##
180: ## Clean up any existing fake user from the current in-memory document to avoid side-effects
181: #if ($fakeUser)
182:   #set ($discard = $doc.removeObject($fakeUser))
183: #end
184: {{/velocity}}
</textarea>
</div>

    <div class="clearfloats"></div>
  </div>    </div>      </div>
  </div><div id="rightPanels" class="panels right">
      <div class="panel expanded QuickLinks"><h1 class="xwikipaneltitle">快速链接</h1><div class="xwikipanelcontents"><ul><li><span class="wikilink"><a href="">首页</a></span></li><li><span class="wikilink"><a href="">新闻动态</a></span></li><li><span class="wikilink"><a href="">FAQ</a></span></li></ul></div></div>
                
  </div>

<div class="clearfloats"></div>
  </div></div><div id="footerglobal" class="layoutsection">
<div class="minwidth"></div>
<hr/>
  <div id="xwikilicence">Copyright © 2013 北京博瑞开源软件有限公司</div>
          <div id="xwikiplatformversion">京ICP备12048974号</div>
<hr/>
</div>

</div></div></body>
</html>


