diff --git a/core/src/main/resources/hudson/model/AllView/noJob.groovy b/core/src/main/resources/hudson/model/AllView/noJob.groovy new file mode 100644 index 0000000000000000000000000000000000000000..c7f66be608ab2acc2ace40c3fd2f25842838520c --- /dev/null +++ b/core/src/main/resources/hudson/model/AllView/noJob.groovy @@ -0,0 +1,44 @@ +package hudson.model.AllView + +import hudson.model.Computer +import hudson.model.Item +import jenkins.model.Jenkins + +div { + h1(_("Welcome to Jenkins!")) + + if (my.owner == Jenkins.get()) { + // we're a top-level 'All' view + if (Jenkins.get().hasPermission(Computer.CREATE) && Jenkins.get().clouds.isEmpty() && Jenkins.get().getNodes().isEmpty()) { + div(class: 'call-to-action') { + if (Jenkins.get().hasPermission(Jenkins.ADMINISTER)) { + raw(_("distributedBuildsWithCloud")) + } else { + raw(_("distributedBuilds")) + } + } + } + if (my.owner.hasPermission(Item.CREATE)) { + div(class: 'call-to-action') { + raw(_("newJob")) + } + } + } else { + // we're in a folder + if (my.owner.hasPermission(Item.CREATE)) { + div(class: 'call-to-action') { + raw(_("newJob")) + } + } + } + + if (h.isAnonymous() && !my.owner.hasPermission(Item.CREATE)) { + div(class:'call-to-action') { + raw(_("login", rootURL, app.securityRealm.loginUrl, request.requestURI)) + if (app.securityRealm.allowsSignup()) { + text(" ") // TODO make this nicer + raw(_("signup")) + } + } + } +} diff --git a/core/src/main/resources/hudson/model/AllView/noJob.jelly b/core/src/main/resources/hudson/model/AllView/noJob.jelly deleted file mode 100644 index 0c9e0c26a9952ca50e361159bb699a6966a1f9c0..0000000000000000000000000000000000000000 --- a/core/src/main/resources/hudson/model/AllView/noJob.jelly +++ /dev/null @@ -1,52 +0,0 @@ - - - -