Skip to content

Commit

Permalink
[FIXED JENKINS-7733] reimplementation of JENKINS-7733.
Browse files Browse the repository at this point in the history
  • Loading branch information
ssogabe committed Feb 15, 2012
1 parent 5461577 commit 875b3f6
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 40 deletions.
4 changes: 0 additions & 4 deletions core/src/main/java/hudson/model/MyViewsProperty.java
Expand Up @@ -256,8 +256,4 @@ public String getUrlName() {

}

public String getSystemMessage() {
return getSystemMessage();
}

}
5 changes: 1 addition & 4 deletions core/src/main/java/hudson/model/TreeView.java
Expand Up @@ -190,8 +190,5 @@ public ItemGroup<? extends TopLevelItem> getItemGroup() {
public List<Action> getViewActions() {
return owner.getViewActions();
}

public String getSystemMessage() {
return owner.getSystemMessage();
}

}
18 changes: 1 addition & 17 deletions core/src/main/java/hudson/model/View.java
Expand Up @@ -110,11 +110,6 @@ public abstract class View extends AbstractModelObject implements AccessControll
*/
protected String description;

/**
* System Message displayed.
*/
protected String systemmessage;

/**
* If true, only show relevant executors
*/
Expand Down Expand Up @@ -245,20 +240,9 @@ private List<Action> _getOwnerViewActions() {
*/
@Exported
public String getDescription() {
return description;
return description;
}

/**
* Gets the system message to be displayed at the top of the page on all views
*/
@Exported
public String getSystemMessage(){
if(owner.getSystemMessage() != null && !owner.getSystemMessage().isEmpty()){
this.systemmessage = owner.getSystemMessage();
}
return systemmessage;
}

/**
* Gets the view properties configured for this view.
* @since 1.406
Expand Down
11 changes: 0 additions & 11 deletions core/src/main/java/hudson/model/ViewGroup.java
Expand Up @@ -26,7 +26,6 @@

import hudson.security.AccessControlled;
import hudson.views.ViewsTabBar;
import org.kohsuke.stapler.export.Exported;

import java.io.IOException;
import java.util.Collection;
Expand Down Expand Up @@ -138,14 +137,4 @@ public interface ViewGroup extends Saveable, ModelObject, AccessControlled {
*/
List<Action> getViewActions();

/**
* Returns the system message set on the root object.
* This enables the implemented {@link View} to access the system message on the root object so that it can be
* displayed on each view.
*
* @return
* system message as set on the root object
* @since 1.450
*/
String getSystemMessage();
}
8 changes: 4 additions & 4 deletions core/src/main/resources/lib/hudson/editableDescription.jelly
Expand Up @@ -36,10 +36,10 @@ THE SOFTWARE.

<j:if test="${it.class.name!='hudson.model.AllView'}">
<div id="systemmessage">
<div>
<j:out value="${it.getSystemMessage()!=null ? app.markupFormatter.translate(it.getSystemMessage()) : ''}" />
</div>
</div>
<div>
<j:out value="${app.systemMessage!=null ? app.markupFormatter.translate(app.systemMessage) : ''}" />
</div>
</div>
</j:if>

<div id="description">
Expand Down

0 comments on commit 875b3f6

Please sign in to comment.