-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathweb-section.html
282 lines (252 loc) · 13 KB
/
web-section.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="description" content="Atlassian Jira Plugin Development Tutorials: Web Section Plugin Tutorial">
<meta name="keywords" content="jiradev, jira, plugins, bhushan154, tutorials, jira, jira training india, jira training">
<meta name="author" content="Bhushan Nagaraj">
<link rel="stylesheet" type="text/css" href="stylesheets/bootstrap.min.css" media="screen" />
<link rel="icon" type="image/x-icon" href="favicon4.ico">
<style type="text/css">
body { padding-bottom: 70px; padding-top: 70px;}
.socials {padding-top: 15px; padding-right: 15px; }
</style>
<title>Jiradev.com: Web-section Plugin</title>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
<!-- Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-44222850-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="navbar-header" style="padding-top: 5px;"><a href="index.html"><img src="images/jiradevlogo.png" alt="Jiradev.com" max-height="40px"/></a></div>
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="tutorials.html">Tutorials</a></li>
<li><a href="aboutme.html">About me</a></li>
<li><a href="http://blog.jiradev.com" target="_blank">Blog</a></li>
<li><a href="contact.html">Feedback/Contact</a></li>
</ul>
<ul class="nav navbar-nav pull-right">
<li class="socials">
<a href="https://twitter.com/jiradev" class="twitter-follow-button" data-show-count="false">Follow @jiradev</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
</li>
<li class="socials"><a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="www.jiradev.com" data-text="Check out jiradev.com. It's got simple tutorials for devs new to Jira Development" data-via="jiradev" data-hashtags="JIRA,atlassian">Tweet</a></li>
</ul>
</div>
</nav>
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="page-header"><h1>Web-section plugin module</h1></div>
<p>In the previous tutorial, we created a web-item to provide a link to Atlassian Answers site for users logged into JIRA.
What if we have multiple links, that we want displayed under different sections. For example, we want to provide a "Help" dropdown,
with two sections. Internal and External. Internal section will have a link that redirects to our company help website, while
the external displays the Atlassian Answers link we created earlier.</p>
<p>Take a look at the screenshot below. You will see that we have a total of 3 web-items and 2 web-sections.<br /><br />
<img class="img-thumbnail" src="images/lesson5/whatswhat.png"/>
</p>
<p>
<ol>
<li>
Let us start be creating a plugin skeleton with the following information.
<p><div class="alert alert-info">
<p>groupId: com.jiradev.jira.plugins</p>
<p>artifactId: jiradev-web-section</p>
<p>version: 1.0</p>
</div> </p>
</li>
<li>
Open the project in your IDE and open up the atlassian-plugin.xml file. We will clean up the file keeping only
the i18N properties file.<br /><br />
<img class="img-thumbnail" src="images/lesson5/clean-atlassian-plugin.png"/>
</li>
<li>In this tutorial, we will add 3 web-item and 2 web-section modules at once. Run the atlas-create-jira-plugin-module command
and enter the following info.
<p>First add the main Help web-item</p>
<p><div class="alert alert-info">
<p>Select 25 for the web-item option</p>
<p>Plugin module name: Jiradev Help Menu</p>
<p>Enter section: system.top.navigation.bar</p>
<p>Enter link url: default.jspa (we will not be using this)</p>
<p>Show advanced setup: N</p>
<p>Add another plugin module: Y</p>
</div></p>
<p>Add the Internal Help web section</p>
<p><div class="alert alert-info">
<p>Select 30 for web-section</p>
<p>Plugin module name: Internal Help Web Section</p>
<p>Enter location: jiradev-helpmenu-link (This will be the key of the main Help web-item appended by <b>-link</b>)</p>
<p>Show advanced setup: N</p>
<p>Add another plugin module: Y</p>
</div></p>
<p>Add the Company Help web-item</p>
<p><div class="alert alert-info">
<p>Select 25 for Web-item</p>
<p>Plugin module name: Company Help Link</p>
<p>Enter section: jiradev-helpmenu-link/internal-help-web-section (this is the link id of the main Help web-item/key of the internal help web section)</p>
<p>Enter link url: http://www.jiradev.com/aboutme.html</p>
<p>Show advanced setup: N</p>
<p>Add another plugin module: Y</p>
</div></p>
<p>Add the External Help web section</p>
<p><div class="alert alert-info">
<p>Select 30 for web-section</p>
<p>Plugin module name: External Help Web Section</p>
<p>Enter location: jiradev-helpmenu-link (This will be the key of the main Help web-item appended by <b>-link</b>)</p>
<p>Show advanced setup: N</p>
<p>Add another plugin module: Y</p>
</div></p>
<p>Add the Atlassian Answers web-item</p>
<p><div class="alert alert-info">
<p>Select 25 for Web-item</p>
<p>Plugin module name: Atlassian Answers Link</p>
<p>Enter section: jiradev-helpmenu-link/external-help-web-section (this is the link id of the main Help web-item/key of the external help web section)</p>
<p>Enter link url: https://answers.atlassian.com/</p>
<p>Show advanced setup: N</p>
<p>Add another plugin module: N</p>
</div></p>
</li>
<li>Have a look at the atlassian-plugin.xml file. You will see that the SDK has added 5 new modules.</li>
<li>
Run the plugin using the atlas-run command.
</li>
</ol>
</p>
</div>
</div>
<hr />
<div class="row">
<div class="col-md-4">
<div class="alert alert-info">
<center>
<h4>Share</h4>
<hr />
<p>
Show your support by tweeting about this tutorial. Is Jiradev something you would reommend? <a href="#" id="recommend">Let me know</a>.
</p>
<p>
<div><a class="btn btn-danger btn-sm" href="https://twitter.com/intent/tweet?screen_name=jiradev&text=Woohoo.%20I%20completed%20the%20web-section%20tutorial%20on%20%40jiradev.%20%23atlassian%2C%20%23JIRA" data-related="jiradev">@jiradev</a></div>
</p>
</center>
</div>
</div>
<div class="col-md-4">
<div class="alert alert-info">
<center>
<h4>Contribute</h4>
<hr />
<p>Do you have a Jira plugin tutorial that can be used on this site? Please do share it with me and I can add it along with the ones available.
</p><p><a class="btn btn-danger btn-sm" href="http://jiradev.uservoice.com/knowledgebase/articles/255497">Contribute</a></p>
</center>
</div>
</div>
<div class="col-md-4">
<div class="alert alert-info">
<center>
<h4>Feedback</h4>
<hr />
<p>Your feedback can help improve the content on this site. If you have anything that you would like me to change/implement
on the site.</p><p><div><a href="#" id="feedback" class="btn btn-danger btn-sm">Feedback</a></div></p>
</center>
</div>
</div>
</div>
</div>
<nav class="navbar navbar-default navbar-fixed-bottom">
<div class="row">
<div class="col-md-12">
<p class="text-center">For more information about Jira Plugin Development and Training, contact <a href="mailto:[email protected]">Bhushan Nagaraj</a></p>
</div>
</div>
</nav>
<!-- Satisfaction rating -->
<script>
// Include the UserVoice JavaScript SDK (only needed once on a page)
UserVoice=window.UserVoice||[];(function(){var uv=document.createElement('script');uv.type='text/javascript';uv.async=true;uv.src='//widget.uservoice.com/H4Msyrsib8lTi0nIUcNSPg.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(uv,s)})();
//
// UserVoice Javascript SDK developer documentation:
// https://www.uservoice.com/o/javascript-sdk
//
// Set colors
UserVoice.push(['set', {
accent_color: '#e23a39',
trigger_color: 'white',
trigger_background_color: 'rgba(46, 49, 51, 0.6)'
}]);
// Identify the user and pass traits
// To enable, replace sample data with actual user traits and uncomment the line
UserVoice.push(['identify', {
//email: '[email protected]', // User’s email address
//name: 'John Doe', // User’s real name
//created_at: 1364406966, // Unix timestamp for the date the user signed up
//id: 123, // Optional: Unique id of the user (if set, this should not change)
//type: 'Owner', // Optional: segment your users by type
//account: {
// id: 123, // Optional: associate multiple users with a single account
// name: 'Acme, Co.', // Account name
// created_at: 1364406966, // Unix timestamp for the date the account was created
// monthly_rate: 9.99, // Decimal; monthly rate of the account
// ltv: 1495.00, // Decimal; lifetime value of the account
// plan: 'Enhanced' // Plan name for the account
//}
}]);
// Add default trigger to the bottom-right corner of the window:
UserVoice.push(['addTrigger', { mode: 'satisfaction', trigger_position: 'bottom-right' }]);
// Or, use your own custom trigger:
UserVoice.push(['addTrigger', '#recommend', { mode: 'satisfaction' }]);
// Autoprompt for Satisfaction and SmartVote (only displayed under certain conditions)
UserVoice.push(['autoprompt', {}]);
</script>
<!-- Feedback -->
<script>
// Include the UserVoice JavaScript SDK (only needed once on a page)
UserVoice=window.UserVoice||[];(function(){var uv=document.createElement('script');uv.type='text/javascript';uv.async=true;uv.src='//widget.uservoice.com/H4Msyrsib8lTi0nIUcNSPg.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(uv,s)})();
//
// UserVoice Javascript SDK developer documentation:
// https://www.uservoice.com/o/javascript-sdk
//
// Set colors
UserVoice.push(['set', {
accent_color: '#e23a39',
trigger_color: 'white',
trigger_background_color: 'rgba(46, 49, 51, 0.6)'
}]);
// Identify the user and pass traits
// To enable, replace sample data with actual user traits and uncomment the line
UserVoice.push(['identify', {
//email: '[email protected]', // User’s email address
//name: 'John Doe', // User’s real name
//created_at: 1364406966, // Unix timestamp for the date the user signed up
//id: 123, // Optional: Unique id of the user (if set, this should not change)
//type: 'Owner', // Optional: segment your users by type
//account: {
// id: 123, // Optional: associate multiple users with a single account
// name: 'Acme, Co.', // Account name
// created_at: 1364406966, // Unix timestamp for the date the account was created
// monthly_rate: 9.99, // Decimal; monthly rate of the account
// ltv: 1495.00, // Decimal; lifetime value of the account
// plan: 'Enhanced' // Plan name for the account
//}
}]);
// Add default trigger to the bottom-right corner of the window:
//UserVoice.push(['addTrigger', { mode: 'smartvote', trigger_position: 'bottom-right' }]);
// Or, use your own custom trigger:
UserVoice.push(['addTrigger', '#feedback', { mode: 'smartvote' }]);
// Autoprompt for Satisfaction and SmartVote (only displayed under certain conditions)
UserVoice.push(['autoprompt', {}]);
</script>
</body>
</html>