@@ -30,44 +30,79 @@ l.layout {
30
30
</style>
31
31
""" )
32
32
33
- def base = " ${ app.rootUrl}${ my.project.url}${ my.run.number} /" ;
34
- def badge = base + " badge/icon"
35
-
36
33
def fullJobName = h. escape(my. project. fullName);
37
- def publicbadge = " ${ app.rootUrl} buildStatus/icon?job=${ fullJobName} &build=${ my.run.number} " ;
34
+ def jobUrlWithView = " ${ app.rootUrl}${ my.project.url}${ my.run.number} /" ;
35
+ def jobUrlWithoutView = " ${ app.rootUrl} job/${ fullJobName} /${ my.run.number} /" ;
36
+ def badgeUrlWithView = jobUrlWithView + " badge/icon"
37
+ def badgeUrlWithoutView = jobUrlWithoutView + " /badge/icon"
38
+ def publicBadge = " ${ app.rootUrl} buildStatus/icon?job=${ fullJobName} &build=${ my.run.number} " ;
39
+
38
40
h3 {
39
41
text(_(" Image" ))
40
- img(id :" badge " ,src :badge )
42
+ img(id :" badgeUrlWithView " ,src :badgeUrlWithView )
41
43
text(_(" or " ))
42
- img(src :badge + " ?style=plastic" )
44
+ img(src :badgeUrlWithView + " ?style=plastic" )
43
45
}
46
+
47
+ h3(_(" Plain Link (with view)" ))
48
+ b {text(_(" protected" ))}
49
+ input(type :" text" ,value :badgeUrlWithView,class :" select-all" )
50
+ b {text(_(" unprotected" ))}
51
+ input(type :" text" ,value :publicBadge,class :" select-all" )
52
+
53
+ h3(_(" Plain Link (without view)" ))
54
+ b {text(_(" protected" ))}
55
+ input(type :" text" ,value :badgeUrlWithoutView,class :" select-all" )
56
+ b {text(_(" unprotected" ))}
57
+ input(type :" text" ,value :publicBadge,class :" select-all" )
58
+
59
+
60
+ h3(_(" Markdown (with view)" ))
61
+ b {text(_(" protected" ))}
62
+ input(type :" text" ,value :" [](${ jobUrlWithView} )" ,class :" select-all" )
63
+ b {text(_(" unprotected" ))}
64
+ input(type :" text" ,value :" [](${ jobUrlWithView} )" ,class :" select-all" )
65
+
66
+ h3(_(" Markdown (without view)" ))
67
+ b {text(_(" protected" ))}
68
+ input(type :" text" ,value :" [](${ jobUrlWithoutView} )" ,class :" select-all" )
69
+ b {text(_(" unprotected" ))}
70
+ input(type :" text" ,value :" [](${ jobUrlWithoutView} )" ,class :" select-all" )
71
+
72
+ h3(_(" HTML (with view)" ))
73
+ b {text(_(" protected" ))}
74
+ input(type :" text" ,value :" <a href='${ jobUrlWithView} '><img src='${ badgeUrlWithView} '></a>" ,class :" select-all" )
75
+ b {text(_(" unprotected" ))}
76
+ input(type :" text" ,value :" <a href='${ jobUrlWithView} '><img src='${ publicBadge} '></a>" ,class :" select-all" )
77
+
78
+ h3(_(" HTML (without view)" ))
44
79
b {text(_(" protected" ))}
45
- input(type :" text" ,value :badge ,class :" select-all" )
80
+ input(type :" text" ,value :" <a href=' ${ jobUrlWithoutView } '><img src=' ${ badgeUrlWithoutView } '></a> " ,class :" select-all" )
46
81
b {text(_(" unprotected" ))}
47
- input(type :" text" ,value :publicbadge ,class :" select-all" )
82
+ input(type :" text" ,value :" <a href=' ${ jobUrlWithoutView } '><img src=' ${ publicBadge } '></a> " ,class :" select-all" )
48
83
49
- h3(_(" Markdown " ))
84
+ h3(_(" Confluence (with view) " ))
50
85
b {text(_(" protected" ))}
51
- input(type :" text" ,value :" []( ${ base } ) " ,class :" select-all" )
86
+ input(type :" text" ,value :" [!${ badgeUrlWithView } !| ${ jobUrlWithView } ] " ,class :" select-all" )
52
87
b {text(_(" unprotected" ))}
53
- input(type :" text" ,value :" []( ${ base } ) " ,class :" select-all" )
88
+ input(type :" text" ,value :" [!${ publicBadge } !| ${ jobUrlWithView } ] " ,class :" select-all" )
54
89
55
- h3(_(" HTML " ))
90
+ h3(_(" Confluence (without view) " ))
56
91
b {text(_(" protected" ))}
57
- input(type :" text" ,value :" <a href=' ${ base } '><img src=' ${ badge } '></a> " ,class :" select-all" )
92
+ input(type :" text" ,value :" [! ${ badgeUrlWithoutView } !| ${ jobUrlWithoutView } ] " ,class :" select-all" )
58
93
b {text(_(" unprotected" ))}
59
- input(type :" text" ,value :" <a href=' ${ base } '><img src=' ${ publicbadge } '></a> " ,class :" select-all" )
94
+ input(type :" text" ,value :" [! ${ publicBadge } !| ${ jobUrlWithoutView } ] " ,class :" select-all" )
60
95
61
- h3(_(" Confluence " ))
96
+ h3(_(" XWiki (with view) " ))
62
97
b {text(_(" protected" ))}
63
- input(type :" text" ,value :" [! ${ badge } !| ${ base } ]" ,class :" select-all" )
98
+ input(type :" text" ,value :" [[image: ${ badgeUrlWithView } >> ${ jobUrlWithView } ||target='__new'] ]" ,class :" select-all" )
64
99
b {text(_(" unprotected" ))}
65
- input(type :" text" ,value :" [! ${ publicbadge } !| ${ base } ]" ,class :" select-all" )
100
+ input(type :" text" ,value :" [[image: ${ publicBadge } >> ${ jobUrlWithView } ||target='__new'] ]" ,class :" select-all" )
66
101
67
- h3(_(" XWiki" ))
102
+ h3(_(" XWiki (without view) " ))
68
103
b {text(_(" protected" ))}
69
- input(type :" text" ,value :" [[image:${ badge } >>${ base } ||target='__new']]" ,class :" select-all" )
104
+ input(type :" text" ,value :" [[image:${ badgeUrlWithoutView } >>${ jobUrlWithoutView } ||target='__new']]" ,class :" select-all" )
70
105
b {text(_(" unprotected" ))}
71
- input(type :" text" ,value :" [[image:${ publicbadge } >>${ base } ||target='__new']]" ,class :" select-all" )
106
+ input(type :" text" ,value :" [[image:${ publicBadge } >>${ jobUrlWithoutView } ||target='__new']]" ,class :" select-all" )
72
107
}
73
108
}
0 commit comments