提交 c3611b0a 编写于 作者: M mindless

Some fixes now that Hudson object is not a View:

- Fixed if condition for when to use "Dashboard" as page title instead of view name
- Moved "noJob" from Hudson/ to AllView/ and fixed jelly to work now that "it" is
  AllView instead of Hudson
Other fixes not related to Hudson/View change:
- Fixed permission check in noJob to use Item.CREATE instead of View.CREATE.
- Only show "sign-up" link if user is anonymous
- Change ' to '' in properties so "don't" is shown properly


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@14111 71c3de6d-444a-0410-be80-ed276b4c234a
上级 1c380d87
......@@ -5,18 +5,19 @@
${%Welcome to Hudson!}
<j:choose xmlns:j="jelly:core">
<!-- Only show the create new jobs link to those users that have permission to use it. -->
<j:when test="${h.hasPermission(it.CREATE)}">
<j:getStatic var="permission" className="hudson.model.Item" field="CREATE"/>
<j:when test="${h.hasPermission(permission)}">
${%newJob}
</j:when>
<j:otherwise>
<!-- Offer anonymous users the chance to login, then they can create jobs. -->
<j:if test="${h.isAnonymous()}">
${%login(rootURL, app.securityRealm.loginUrl, request.requestURI)}
</j:if>
<!-- Also offer them the opportunity to sign-up for an account, if this facility is available. -->
<j:if test="${it.securityRealm.allowsSignup()}">
<j:if test="${app.securityRealm.allowsSignup()}">
${%signup}
</j:if>
</j:if>
</j:otherwise>
</j:choose>
......
......@@ -2,4 +2,4 @@ newJob=Please <a href="newJob">create new jobs</a> to get started.
login=<a href="{0}/{1}?from={2}">Login</a> to create new jobs.
signup=If you don't already have an account, you can <a href="signup">sign-up</a> now.
\ No newline at end of file
signup=If you don''t already have an account, you can <a href="signup">sign-up</a> now.
<st:compress xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt">
<st:header name="X-Hudson" value="${servletContext.getAttribute('version')}" />
<j:new var="h" className="hudson.Functions" /><!-- instead of JSP functions -->
<l:layout title="${h.ifThenElse(app==it,'%Dashboard',it.viewName)}">
<l:layout title="${h.ifThenElse(it.class.name=='hudson.model.AllView','%Dashboard',it.viewName)}">
<st:include page="sidepanel.jelly" />
<l:main-panel>
<div id="view-message">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册