Skip to content

Commit b8dbdaa

Browse files
committed
Fix controller mounting path and view
1 parent cd83656 commit b8dbdaa

File tree

3 files changed

+27
-26
lines changed

3 files changed

+27
-26
lines changed

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
val Organization = "fr.brouillard.gitbucket"
22
val ProjectName = "gitbucket-announce-plugin"
3-
val ProjectVersion = "1.7.0"
3+
val ProjectVersion = "1.7.1"
44

55
lazy val root = (project in file(".")).enablePlugins(SbtTwirl)
66

src/main/scala/Plugin.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@ class Plugin extends gitbucket.core.plugin.Plugin {
1919
, new Version("1.5.0")
2020
, new Version("1.6.0")
2121
, new Version("1.7.0")
22+
, new Version("1.7.1")
2223
)
2324

2425
override val systemSettingMenus: Seq[(Context) => Option[Link]] = Seq(
2526
(ctx: Context) => Some(Link("announce", "Global Announce", "admin/announce"))
2627
)
2728

2829
override val controllers = Seq(
29-
"/admin/announce" -> new AnnounceController()
30+
"/*" -> new AnnounceController()
3031
)
3132
}

src/main/twirl/fr/brouillard/gitbucket/announce/announce.scala.html

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,36 @@
66
@import gitbucket.core.view.helpers._
77
@import gitbucket.core.util.Directory._
88
@main("New announce"){
9-
@menu("announce"){
10-
@information(info)
11-
<form action="@path/admin/announce" method="POST" validate="true">
12-
@if(settings.useSMTP && settings.smtp.nonEmpty){
13-
<div class="panel panel-default">
14-
<div class="panel-heading strong">New announce</div>
15-
<div class="panel-body">
9+
@menu("announce"){
10+
@information(info)
11+
<form action="@path/admin/announce" method="POST" validate="true">
12+
@if(settings.useSMTP && settings.smtp.nonEmpty){
13+
<div class="panel panel-default">
14+
<div class="panel-heading strong">New announce</div>
15+
<div class="panel-body">
1616
<fieldset>
17-
<label><span class="strong">To</span></label>
18-
<input type="text" style="width: 635px;" name="to"/>
19-
<p class="muted">Enter a comma separated list of groupname the announce will be sent to, or the keyword 'ALL' to send to all users</p>
17+
<label><span class="strong">To</span></label>
18+
<input type="text" name="to" class="form-control"/>
19+
<p class="muted">Enter a comma separated list of groupname the announce will be sent to, or the keyword 'ALL' to send to all users</p>
2020
</fieldset>
2121
<fieldset>
22-
<label><span class="strong">Subject</span></label>
23-
<input type="text" style="width: 635px;" name="subject"/>
22+
<label><span class="strong">Subject</span></label>
23+
<input type="text" name="subject" class="form-control"/>
2424
</fieldset>
2525
<label><span class="strong">Content</span></label>
2626
<fieldset>
27-
<textarea style="width: 635px; height: 100px;" name="content"></textarea>
27+
<textarea style="height: 100px;" name="content" class="form-control"></textarea>
2828
</fieldset>
29+
</div>
2930
</div>
30-
</div>
31-
<fieldset>
32-
<input type="submit" class="btn btn-success" value="Send Announce"/>
33-
</fieldset>
34-
} else {
35-
<div class="box">
36-
<p>SMTP settings are disabled, verify your setup.</p>
37-
</div>
38-
}
39-
</form>
40-
}
31+
<fieldset>
32+
<input type="submit" class="btn btn-success" value="Send Announce"/>
33+
</fieldset>
34+
} else {
35+
<div class='alert alert-danger'>
36+
SMTP settings are disabled, verify your setup.
37+
</div>
38+
}
39+
</form>
40+
}
4141
}

0 commit comments

Comments
 (0)