<script type="text/javascript" src="${base}/js/branches.js"></script>

<#macro branches project id="branches" create=true>
	<@dynamicsection id=id template="Branches.branchTemplate('${project?html}')">
		<#if create>
			<@dialog id="branch-create-dialog">
				<@form_text name="name" label=loc('branch.name') />
				<@form_memo name="description" label=loc('branch.description') required=false />
				
				<@dialog_button_cancel />
				<@dialog_button id="branch-create-dialog-submit" class="btn-primary" text=loc('general.create') />
			</@dialog>
			<button id="branch-create-button" type="button" class="btn" onclick="Branches.createBranch('${project?html}')"><@lh key="branch.create" /></button>
		</#if>
	</@dynamicsection>
    <script id="branchTemplate" type="text/html">
        <tr>
            <td>
                <a href="gui/project/{{project.name}}/branch/{{name}}">{{name}}</a>
                {{#description}}
                    <br/>
                    <span class="description">{{description}}</span>
                {{/description}}
            </td>
        </tr>
    </script>
</#macro>

<script type="text/javascript" src="${base}/js/branches.js"></script>

<#macro branches project id="branches" create=true>
	<@dynamicsection id=id template="Branches.branchTemplate('${project?html}')">
		<#if create>
			<@dialog id="branch-create-dialog">
				<@form_text name="name" label=loc('branch.name') />
				<@form_memo name="description" label=loc('branch.description') required=false />
				
                                <@dialog_button id="branch-create-dialog-submit" class="btn-primary" text=loc('general.create') />
				<@dialog_button_cancel />
			</@dialog>
			<button id="branch-create-button" type="button" class="btn" onclick="Branches.createBranch('${project?html}')"><@lh key="branch.create" /></button>
		</#if>
	</@dynamicsection>
    <script id="branchTemplate" type="text/html">
        <tr>
            <td>
                <a href="gui/project/{{project.name}}/branch/{{name}}">{{name}}</a>
                {{#description}}
                    <br/>
                    <span class="description">{{description}}</span>
                {{/description}}
            </td>
        </tr>
    </script>
</#macro>

Fix buttons order in branch creation dialog.
Fix buttons order in branch creation dialog.