A common pattern is to create a template that contains the boilerplate, and takes a parameter of type HTML. Let's say:
main.scala.html
@(content: HTML)
@header
// boilerplate
@content
// more boilerplate
@footer
In fact, you don't really need to separate out header and footer with this approach.
Your UsersView.scala.html then looks like this:
@main {
// all your users page html here.
}
You're wrapping the UsersView with main by passing it in as a parameter.
You can see examples of this in the samples
My usual main template is a little more involved and looks roughly like this:
@(title: String)(headInsert: Html = Html.empty)(content: Html)(implicit user: Option[User] = None)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>@title</title>
// bootstrap stuff here
@headInsert
</head>
<body>
@menu(user)
<div id="mainContainer" class="container">
@content
</div>
</body>
</html>
This way a template can pass in a head insert and title, and make a user available, as well as content of course.