Use "route" helper in pages style

This commit is contained in:
Dmitriy Simushev 2014-09-03 15:19:27 +00:00
parent 09c7b15656
commit c08ab3a456
30 changed files with 87 additions and 88 deletions

View File

@ -26,7 +26,7 @@
{{else}} {{else}}
{{#if show_small_login}} {{#if show_small_login}}
<div id="loginsmallpane"> <div id="loginsmallpane">
<form name="smallLogin" method="post" action="{{mibewRoot}}/operator/login"> <form name="smallLogin" method="post" action="{{route "login"}}">
{{l10n "Login:"}} {{l10n "Login:"}}
<input type="text" name="login" size="8" class="formauth"/> <input type="text" name="login" size="8" class="formauth"/>
<input type="password" name="password" size="8" class="formauth" autocomplete="off"/> <input type="password" name="password" size="8" class="formauth" autocomplete="off"/>

View File

@ -12,40 +12,40 @@
<li> <li>
<h2>{{l10n "Main"}}</h2> <h2>{{l10n "Main"}}</h2>
<ul class="submenu"> <ul class="submenu">
<li{{#ifEqual menuid "main"}} class="active"{{/ifEqual}}><a href="{{mibewRoot}}/operator">{{l10n "Home"}}</a></li> <li{{#ifEqual menuid "main"}} class="active"{{/ifEqual}}><a href="{{route "home_operator"}}">{{l10n "Home"}}</a></li>
<li{{#ifEqual menuid "users"}} class="active"{{/ifEqual}}><a href="{{mibewRoot}}/operator/users">{{l10n "Visitors"}}</a> <span class="small">(<a class="inner" href="{{mibewRoot}}/operator/users?nomenu">{{l10n "without menu"}}</a>)</span></li> <li{{#ifEqual menuid "users"}} class="active"{{/ifEqual}}><a href="{{route "users"}}">{{l10n "Visitors"}}</a> <span class="small">(<a class="inner" href="{{route "users" nomenu="1"}}">{{l10n "without menu"}}</a>)</span></li>
<li{{#ifEqual menuid "history"}} class="active"{{/ifEqual}}><a href="{{mibewRoot}}/operator/history">{{l10n "Chat history"}}</a></li> <li{{#ifEqual menuid "history"}} class="active"{{/ifEqual}}><a href="{{route "history"}}">{{l10n "Chat history"}}</a></li>
{{#if showstat}} {{#if showstat}}
<li{{#ifEqual menuid "statistics"}} class="active"{{/ifEqual}}><a href="{{mibewRoot}}/operator/statistics">{{l10n "Statistics"}}</a></li> <li{{#ifEqual menuid "statistics"}} class="active"{{/ifEqual}}><a href="{{route "statistics"}}">{{l10n "Statistics"}}</a></li>
{{/if}} {{/if}}
{{#if showban}} {{#if showban}}
<li{{#ifEqual menuid "bans"}} class="active"{{/ifEqual}}><a href="{{mibewRoot}}/operator/ban">{{l10n "Blocked visitors"}}</a></li> <li{{#ifEqual menuid "bans"}} class="active"{{/ifEqual}}><a href="{{route "bans"}}">{{l10n "Blocked visitors"}}</a></li>
{{/if}} {{/if}}
</ul> </ul>
</li> </li>
<li> <li>
<h2>{{l10n "Administration"}}</h2> <h2>{{l10n "Administration"}}</h2>
<ul class="submenu"> <ul class="submenu">
<li{{#ifEqual menuid "canned"}} class="active"{{/ifEqual}}><a href="{{mibewRoot}}/operator/canned-message">{{l10n "Canned Messages"}}</a></li> <li{{#ifEqual menuid "canned"}} class="active"{{/ifEqual}}><a href="{{route "canned_messages"}}">{{l10n "Canned Messages"}}</a></li>
{{#if showadmin}} {{#if showadmin}}
<li{{#ifEqual menuid "getcode"}} class="active"{{/ifEqual}}><a href="{{mibewRoot}}/operator/button-code">{{l10n "Button code"}}</a></li> <li{{#ifEqual menuid "getcode"}} class="active"{{/ifEqual}}><a href="{{route "button_code"}}">{{l10n "Button code"}}</a></li>
<li{{#ifEqual menuid "operators"}} class="active"{{/ifEqual}}><a href="{{mibewRoot}}/operator/operator">{{l10n "Operators"}}</a></li> <li{{#ifEqual menuid "operators"}} class="active"{{/ifEqual}}><a href="{{route "operators"}}">{{l10n "Operators"}}</a></li>
<li{{#ifEqual menuid "groups"}} class="active"{{/ifEqual}}><a href="{{mibewRoot}}/operator/group">{{l10n "Groups"}}</a></li> <li{{#ifEqual menuid "groups"}} class="active"{{/ifEqual}}><a href="{{route "groups"}}">{{l10n "Groups"}}</a></li>
<li{{#ifEqual menuid "settings"}} class="active"{{/ifEqual}}><a href="{{mibewRoot}}/operator/settings">{{l10n "Settings"}}</a></li> <li{{#ifEqual menuid "settings"}} class="active"{{/ifEqual}}><a href="{{route "settings_common"}}">{{l10n "Settings"}}</a></li>
<li{{#ifEqual menuid "styles"}} class="active"{{/ifEqual}}><a href="{{mibewRoot}}/operator/style/page/preview">{{l10n "Styles"}}</a></li> <li{{#ifEqual menuid "styles"}} class="active"{{/ifEqual}}><a href="{{route "style_preview" type="page"}}">{{l10n "Styles"}}</a></li>
<li{{#ifEqual menuid "translation"}} class="active"{{/ifEqual}}><a href="{{mibewRoot}}/operator/translation">{{l10n "Localize"}}</a></li> <li{{#ifEqual menuid "translation"}} class="active"{{/ifEqual}}><a href="{{route "translations"}}">{{l10n "Localize"}}</a></li>
<li{{#ifEqual menuid "mail_templates"}} class="active"{{/ifEqual}}><a href="{{mibewRoot}}/operator/mail-template">{{l10n "Mail templates"}}</a></li> <li{{#ifEqual menuid "mail_templates"}} class="active"{{/ifEqual}}><a href="{{route "mail_templates"}}">{{l10n "Mail templates"}}</a></li>
<li{{#ifEqual menuid "updates"}} class="active"{{/ifEqual}}><a href="{{mibewRoot}}/operator/updates">{{l10n "Updates"}}</a></li> <li{{#ifEqual menuid "updates"}} class="active"{{/ifEqual}}><a href="{{route "updates"}}">{{l10n "Updates"}}</a></li>
{{/if}} {{/if}}
{{#if currentopid}} {{#if currentopid}}
<li{{#ifEqual menuid "profile"}} class="active"{{/ifEqual}}><a href="{{mibewRoot}}/operator/operator/{{currentopid}}/edit">{{l10n "Profile"}}</a></li> <li{{#ifEqual menuid "profile"}} class="active"{{/ifEqual}}><a href="{{route "operator_edit" operator_id=currentopid}}">{{l10n "Profile"}}</a></li>
{{/if}} {{/if}}
</ul> </ul>
</li> </li>
<li> <li>
<h2>{{l10n "Other"}}</h2> <h2>{{l10n "Other"}}</h2>
<ul class="submenu"> <ul class="submenu">
<li><a href="{{mibewRoot}}/operator/logout">{{l10n "Exit"}}</a></li> <li><a href="{{route "logout"}}">{{l10n "Exit"}}</a></li>
</ul> </ul>
</li> </li>
{{/if}} {{/if}}

View File

@ -27,8 +27,8 @@
<div class="tabletool"> <div class="tabletool">
<img src="{{stylePath}}/images/buttons/createban.gif" border="0" alt=""/> <img src="{{stylePath}}/images/buttons/createban.gif" border="0" alt=""/>
<a href="{{mibewRoot}}/operator/ban/add" title="{{l10n "Add address"}}" <a href="{{route "ban_add"}}" title="{{l10n "Add address"}}"
onclick="this.newWindow = window.open('{{mibewRoot}}/operator/ban/add', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=640,height=480,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;">{{l10n "Add address"}}</a> onclick="this.newWindow = window.open('{{route "ban_add"}}', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=640,height=480,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;">{{l10n "Add address"}}</a>
</div> </div>
<br clear="all"/> <br clear="all"/>
@ -46,7 +46,7 @@
{{#each [pagination.items]}} {{#each [pagination.items]}}
<tr> <tr>
<td class="notlast"> <td class="notlast">
<a href="{{../mibewRoot}}/operator/history?q={{address}}&type=visitor" class="man" id="ti{{banid}}"> <a href="{{route "history" q=address type="visitor"}}" class="man" id="ti{{banid}}">
{{address}} {{address}}
</a> </a>
</td> </td>
@ -56,11 +56,11 @@
<td>{{cutString comment "30"}}</td> <td>{{cutString comment "30"}}</td>
<td> <td>
<a class="removelink" id="i{{banid}}" href="{{../mibewRoot}}/operator/ban/{{banid}}/delete?{{csrfTokenInUrl}}"> <a class="removelink" id="i{{banid}}" href="{{route "ban_delete" ban_id=banid}}?{{csrfTokenInUrl}}">
{{l10n "remove"}} {{l10n "remove"}}
</a>, </a>,
<a href="{{../mibewRoot}}/operator/ban/{{banid}}/edit" <a href="{{route "ban_edit" ban_id=banid}}/edit"
onclick="this.newWindow = window.open('{{../mibewRoot}}/operator/ban/{{banid}}/edit', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=640,height=480,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;">{{l10n "edit"}}</a> onclick="this.newWindow = window.open('{{route "ban_edit" ban_id=banid}}', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=640,height=480,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;">{{l10n "edit"}}</a>
</td> </td>
</tr> </tr>
{{else}} {{else}}

View File

@ -9,7 +9,7 @@
{{> _errors}} {{> _errors}}
<form name="buttonCodeForm" method="get" action="{{mibewRoot}}/operator/button-code"> <form name="buttonCodeForm" method="get" action="{{route "button_code"}}">
<div class="mform"> <div class="mform">
<div class="formtop"> <div class="formtop">
<div class="formtopi"></div> <div class="formtopi"></div>

View File

@ -9,7 +9,7 @@
{{> _errors}} {{> _errors}}
<form name="cannedForm" method="get" action="{{mibewRoot}}/operator/canned-message"> <form name="cannedForm" method="get" action="{{route "canned_messages"}}">
<div class="mform"> <div class="mform">
<div class="formtop"> <div class="formtop">
<div class="formtopi"></div> <div class="formtopi"></div>
@ -46,8 +46,8 @@
<div class="tabletool"> <div class="tabletool">
<img src="{{stylePath}}/images/buttons/createban.gif" border="0" alt=""/> <img src="{{stylePath}}/images/buttons/createban.gif" border="0" alt=""/>
<a href="{{mibewRoot}}/operator/canned-message/add?lang={{formlang}}&amp;group={{formgroup}}" target="_blank" <a href="{{route "canned_message_add" lang=formlang group=formgroup}}" target="_blank"
onclick="this.newWindow = window.open('{{mibewRoot}}/operator/canned-message/add?lang={{formlang}}&amp;group={{formgroup}}', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=640,height=480,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;"> onclick="this.newWindow = window.open('{{route "canned_message_add" lang=formlang group=formgroup}}', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=640,height=480,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;">
{{l10n "Add message..."}} {{l10n "Add message..."}}
</a> </a>
</div> </div>
@ -72,9 +72,9 @@
{{#replace "\n" "<br/>"}}{{vcvalue}}{{/replace}} {{#replace "\n" "<br/>"}}{{vcvalue}}{{/replace}}
</td> </td>
<td> <td>
<a href="{{../mibewRoot}}/operator/canned-message/{{id}}/edit" target="_blank" <a href="{{route "canned_message_edit" message_id=id}}" target="_blank"
onclick="this.newWindow = window.open('{{../mibewRoot}}/operator/canned-message/{{id}}/edit', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=640,height=480,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;">{{l10n "edit"}}</a>, onclick="this.newWindow = window.open('{{route "canned_message_edit" message_id=id}}', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=640,height=480,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;">{{l10n "edit"}}</a>,
<a href="{{../mibewRoot}}/operator/canned-message/{{id}}/delete?lang={{../formlang}}&amp;group={{../formgroup}}&amp;{{csrfTokenInUrl}}">{{l10n "remove"}}</a> <a href="{{route "canned_message_delete" message_id=id lang=../formlang group=../formgroup}}&amp;{{csrfTokenInUrl}}">{{l10n "remove"}}</a>
</td> </td>
</tr> </tr>
{{else}} {{else}}

View File

@ -13,7 +13,7 @@
<div id="formmessage">{{l10n "Changes saved"}}</div> <div id="formmessage">{{l10n "Changes saved"}}</div>
{{/if}} {{/if}}
<form name="membersForm" method="post" action="{{mibewRoot}}/operator/group/{{groupid}}/members"> <form name="membersForm" method="post" action="{{route "group_members_save" group_id=groupid}}">
{{csrfTokenInput}} {{csrfTokenInput}}
<div> <div>
@ -31,7 +31,7 @@
<div class="field"> <div class="field">
<div class="fvaluenodesc"> <div class="fvaluenodesc">
<input id="op{{operatorid}}" type="checkbox" name="op{{operatorid}}" value="on"{{#if checked}} checked="checked"{{/if}}/> <input id="op{{operatorid}}" type="checkbox" name="op{{operatorid}}" value="on"{{#if checked}} checked="checked"{{/if}}/>
<label for="op{{operatorid}}">{{vclocalename}} (<a href="{{../mibewRoot}}/operator/operator/{{operatorid}}/edit">{{vclogin}}</a>)</label> <label for="op{{operatorid}}">{{vclocalename}} (<a href="{{route "operator_edit" operator_id=operatorid}}/edit">{{vclogin}}</a>)</label>
</div> </div>
</div> </div>
{{/each}} {{/each}}

View File

@ -25,7 +25,7 @@
{{> _errors}} {{> _errors}}
<form name="groupsForm" method="get" action="{{mibewRoot}}/operator/group"> <form name="groupsForm" method="get" action="{{route "groups"}}">
<div class="mform"> <div class="mform">
<div class="formtop"> <div class="formtop">
<div class="formtopi"></div> <div class="formtopi"></div>
@ -63,7 +63,7 @@
{{#if canmodify}} {{#if canmodify}}
<div class="tabletool"> <div class="tabletool">
<img src="{{stylePath}}/images/buttons/createdep.gif" border="0" alt="" /> <img src="{{stylePath}}/images/buttons/createdep.gif" border="0" alt="" />
<a href="{{mibewRoot}}/operator/group/add" title="{{l10n "Create new group"}}"> <a href="{{route "group_add"}}" title="{{l10n "Create new group"}}">
{{l10n "Create new group"}} {{l10n "Create new group"}}
</a> </a>
</div> </div>
@ -88,7 +88,7 @@
{{#each groups}} {{#each groups}}
<tr> <tr>
<td class="notlast level{{level}}"> <td class="notlast level{{level}}">
<a href="{{../mibewRoot}}/operator/group/{{groupid}}/edit" id="ti{{groupid}}" class="man"> <a href="{{route "group_edit" group_id=groupid}}" id="ti{{groupid}}" class="man">
{{vclocalname}} {{vclocalname}}
</a> </a>
</td> </td>
@ -114,7 +114,7 @@
</td> </td>
<td> <td>
<a href="{{../mibewRoot}}/operator/group/{{groupid}}/members"> <a href="{{route "group_members" group_id=groupid}}">
{{inumofagents}} {{inumofagents}}
</a> </a>
</td> </td>
@ -125,7 +125,7 @@
{{#if ../canmodify}} {{#if ../canmodify}}
<td> <td>
<a href="{{../mibewRoot}}/operator/group/{{groupid}}/delete?{{csrfTokenInUrl}}" id="i{{groupid}}" class="removelink"> <a href="{{route "group_delete" group_id=groupid}}?{{csrfTokenInUrl}}" id="i{{groupid}}" class="removelink">
{{l10n "remove"}} {{l10n "remove"}}
</a> </a>
</td> </td>

View File

@ -7,7 +7,7 @@
<br /> <br />
<br /> <br />
<form name="searchForm" method="get" action="{{mibewRoot}}/operator/history"> <form name="searchForm" method="get" action="{{route "history"}}">
<div class="mform"> <div class="mform">
<div class="formtop"> <div class="formtop">
<div class="formtopi"></div> <div class="formtopi"></div>
@ -65,7 +65,7 @@
{{#each [pagination.items]}} {{#each [pagination.items]}}
<tr> <tr>
<td> <td>
<a class="man" href="{{../mibewRoot}}/operator/history/thread/{{threadId}}" target="_blank" onclick="this.newWindow = window.open('{{../mibewRoot}}/operator/history/thread/{{threadId}}', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=720,height=520,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;">{{userName}}</a> <a class="man" href="{{route "history_thread" thread_id=threadId}}" target="_blank" onclick="this.newWindow = window.open('{{route "history_thread" thread_id=threadId}}', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=720,height=520,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;">{{userName}}</a>
</td> </td>
<td> <td>
{{{userAddress}}} {{{userAddress}}}

View File

@ -92,7 +92,7 @@
</div> </div>
<br /> <br />
<a href="{{mibewRoot}}/operator/history"> <a href="{{route "history"}}">
{{l10n "Go to search"}} {{l10n "Go to search"}}
</a> </a>
<br /> <br />

View File

@ -19,7 +19,7 @@
{{#each [pagination.items]}} {{#each [pagination.items]}}
<tr> <tr>
<td> <td>
<a href="{{../mibewRoot}}/operator/history/thread/{{threadId}}" target="_blank" onclick="this.newWindow = window.open('{{../mibewRoot}}/operator/history/thread/{{threadId}}', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=720,height=520,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;">{{userName}}</a> <a href="{{route "history_thread" thread_id=threadId}}" target="_blank" onclick="this.newWindow = window.open('{{route "history_thread" thread_id=threadId}}', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=720,height=520,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;">{{userName}}</a>
</td> </td>
<td>{{{userAddress}}}</td> <td>{{{userAddress}}}</td>
<td>{{agentName}}</td> <td>{{agentName}}</td>

View File

@ -24,7 +24,7 @@
<div class="dashitem"> <div class="dashitem">
<div class="dashitem-content"> <div class="dashitem-content">
<img src="{{stylePath}}/images/dash/visitors.gif" alt=""/> <img src="{{stylePath}}/images/dash/visitors.gif" alt=""/>
<a href="{{mibewRoot}}/operator/users"> <a href="{{route "users"}}">
{{l10n "Visitors"}} {{l10n "Visitors"}}
</a> </a>
{{l10n "You can find awaiting visitors."}} {{l10n "You can find awaiting visitors."}}
@ -34,7 +34,7 @@
<div class="dashitem"> <div class="dashitem">
<div class="dashitem-content"> <div class="dashitem-content">
<img src="{{stylePath}}/images/dash/history.gif" alt=""/> <img src="{{stylePath}}/images/dash/history.gif" alt=""/>
<a href="{{mibewRoot}}/operator/history"> <a href="{{route "history"}}">
{{l10n "Chat history"}} {{l10n "Chat history"}}
</a> </a>
{{l10n "Search the dialogs history."}} {{l10n "Search the dialogs history."}}
@ -45,7 +45,7 @@
<div class="dashitem"> <div class="dashitem">
<div class="dashitem-content"> <div class="dashitem-content">
<img src="{{stylePath}}/images/dash/stat.gif" alt=""/> <img src="{{stylePath}}/images/dash/stat.gif" alt=""/>
<a href="{{mibewRoot}}/operator/statistics"> <a href="{{route "statistics"}}">
{{l10n "Statistics"}} {{l10n "Statistics"}}
</a> </a>
{{l10n "From this page you can generate a variety of usage reports."}} {{l10n "From this page you can generate a variety of usage reports."}}
@ -57,7 +57,7 @@
<div class="dashitem"> <div class="dashitem">
<div class="dashitem-content"> <div class="dashitem-content">
<img src="{{stylePath}}/images/dash/blocked.gif" alt=""/> <img src="{{stylePath}}/images/dash/blocked.gif" alt=""/>
<a href="{{mibewRoot}}/operator/ban"> <a href="{{route "bans"}}">
{{l10n "Blocked visitors"}} {{l10n "Blocked visitors"}}
</a> </a>
{{l10n "Here you can block malicious visitors."}} {{l10n "Here you can block malicious visitors."}}
@ -68,7 +68,7 @@
<div class="dashitem"> <div class="dashitem">
<div class="dashitem-content"> <div class="dashitem-content">
<img src="{{stylePath}}/images/dash/canned.gif" alt=""/> <img src="{{stylePath}}/images/dash/canned.gif" alt=""/>
<a href="{{mibewRoot}}/operator/canned-message"> <a href="{{route "canned_messages"}}">
{{l10n "Canned Messages"}} {{l10n "Canned Messages"}}
</a> </a>
{{l10n "Edit messages that you frequently type into the chat."}} {{l10n "Edit messages that you frequently type into the chat."}}
@ -79,7 +79,7 @@
<div class="dashitem"> <div class="dashitem">
<div class="dashitem-content"> <div class="dashitem-content">
<img src="{{stylePath}}/images/dash/getcode.gif" alt=""/> <img src="{{stylePath}}/images/dash/getcode.gif" alt=""/>
<a href="{{mibewRoot}}/operator/button-code"> <a href="{{route "button_code"}}">
{{l10n "Button code"}} {{l10n "Button code"}}
</a> </a>
{{l10n "Button HTML code generation."}} {{l10n "Button HTML code generation."}}
@ -89,7 +89,7 @@
<div class="dashitem"> <div class="dashitem">
<div class="dashitem-content"> <div class="dashitem-content">
<img src="{{stylePath}}/images/dash/operators.gif" alt=""/> <img src="{{stylePath}}/images/dash/operators.gif" alt=""/>
<a href="{{mibewRoot}}/operator/operator"> <a href="{{route "operators"}}">
{{l10n "Operators"}} {{l10n "Operators"}}
</a> </a>
{{l10n "Create or delete company operators. Manage their permissions."}} {{l10n "Create or delete company operators. Manage their permissions."}}
@ -99,7 +99,7 @@
<div class="dashitem"> <div class="dashitem">
<div class="dashitem-content"> <div class="dashitem-content">
<img src="{{stylePath}}/images/dash/dep.gif" alt=""/> <img src="{{stylePath}}/images/dash/dep.gif" alt=""/>
<a href="{{mibewRoot}}/operator/group"> <a href="{{route "groups"}}">
{{l10n "Groups"}} {{l10n "Groups"}}
</a> </a>
{{l10n "Department or skill based groups."}} {{l10n "Department or skill based groups."}}
@ -109,7 +109,7 @@
<div class="dashitem"> <div class="dashitem">
<div class="dashitem-content"> <div class="dashitem-content">
<img src="{{stylePath}}/images/dash/settings.gif" alt=""/> <img src="{{stylePath}}/images/dash/settings.gif" alt=""/>
<a href="{{mibewRoot}}/operator/settings"> <a href="{{route "settings_common"}}">
{{l10n "Settings"}} {{l10n "Settings"}}
</a> </a>
{{l10n "Specify options affecting chat window and common system behavior."}} {{l10n "Specify options affecting chat window and common system behavior."}}
@ -121,7 +121,7 @@
<div class="dashitem"> <div class="dashitem">
<div class="dashitem-content"> <div class="dashitem-content">
<img src="{{stylePath}}/images/dash/profile.gif" alt=""/> <img src="{{stylePath}}/images/dash/profile.gif" alt=""/>
<a href="{{mibewRoot}}/operator/operator/{{currentopid}}/edit"> <a href="{{route "operator_edit" operator_id=currentopid}}">
{{l10n "Profile"}} {{l10n "Profile"}}
</a> </a>
{{l10n "You can change your personal information on this page."}} {{l10n "You can change your personal information on this page."}}
@ -145,7 +145,7 @@
<div class="dashitem"> <div class="dashitem">
<div class="dashitem-content"> <div class="dashitem-content">
<img src="{{stylePath}}/images/dash/updates.gif" alt=""/> <img src="{{stylePath}}/images/dash/updates.gif" alt=""/>
<a href="{{mibewRoot}}/operator/updates"> <a href="{{route "updates"}}">
{{l10n "Updates"}} {{l10n "Updates"}}
</a> </a>
{{l10n "Check for news and updates."}} {{l10n "Check for news and updates."}}
@ -156,7 +156,7 @@
<div class="dashitem"> <div class="dashitem">
<div class="dashitem-content"> <div class="dashitem-content">
<img src="{{stylePath}}/images/dash/exit.gif" alt=""/> <img src="{{stylePath}}/images/dash/exit.gif" alt=""/>
<a href="{{mibewRoot}}/operator/logout"> <a href="{{route "logout"}}">
{{l10n "Exit"}} {{l10n "Exit"}}
</a> </a>
{{l10n "Log out of the system."}} {{l10n "Log out of the system."}}

View File

@ -57,6 +57,6 @@
{{/if}} {{/if}}
<br/> <br/>
<a href="{{mibewRoot}}/license">{{l10n "Software license agreement"}}</a> <a href="{{route "license"}}">{{l10n "Software license agreement"}}</a>
{{/override}} {{/override}}
{{/extends}} {{/extends}}

View File

@ -51,9 +51,9 @@
<td> <td>
{{#if isDisabled}} {{#if isDisabled}}
<a href="{{../mibewRoot}}/operator/locale/{{code}}/enable?{{csrfTokenInUrl}}">{{l10n "enable"}}</a> <a href="{{route "locale_enable" locale=code}}?{{csrfTokenInUrl}}">{{l10n "enable"}}</a>
{{else}} {{else}}
<a href="{{../mibewRoot}}/operator/locale/{{code}}/disable?{{csrfTokenInUrl}}">{{l10n "disable"}}</a> <a href="{{route "locale_disable" locale=code}}?{{csrfTokenInUrl}}">{{l10n "disable"}}</a>
{{/if}} {{/if}}
</td> </td>
</tr> </tr>

View File

@ -8,7 +8,7 @@
<p>{{l10n "Mibew Messenger is an open-source live support application."}}</p> <p>{{l10n "Mibew Messenger is an open-source live support application."}}</p>
</div> </div>
<form name="loginForm" method="post" action="{{mibewRoot}}/operator/login"> <form name="loginForm" method="post" action="{{route "login_submit"}}">
<div id="loginpane"> <div id="loginpane">
<div class="header"> <div class="header">
@ -54,7 +54,7 @@
<input type="submit" name="submit" class="submit-bg-button login-button" value="{{l10n "Enter"}}" /> <input type="submit" name="submit" class="submit-bg-button login-button" value="{{l10n "Enter"}}" />
<div class="links"> <div class="links">
<a href="{{mibewRoot}}/operator/password-recovery">{{l10n "Forgot your password?"}}</a><br/> <a href="{{route "password_recovery"}}">{{l10n "Forgot your password?"}}</a><br/>
</div> </div>
</div> </div>

View File

@ -68,7 +68,7 @@
{{body}} {{body}}
</td> </td>
<td> <td>
<a href="{{../mibewRoot}}/operator/mail-template/{{name}}/edit?lang={{../formlang}}">{{l10n "edit"}}</a> <a href="{{route "mail_template_edit" name=name lang=../formlang}}">{{l10n "edit"}}</a>
</td> </td>
</tr> </tr>
{{/each}} {{/each}}

View File

@ -9,7 +9,7 @@
{{> _errors}} {{> _errors}}
<form name="avatarForm" method="post" action="{{mibewRoot}}/operator/operator/{{opid}}/avatar" enctype="multipart/form-data"> <form name="avatarForm" method="post" action="{{route "operator_avatar_save" operator_id=opid}}" enctype="multipart/form-data">
{{csrfTokenInput}} {{csrfTokenInput}}
<div> <div>
@ -30,7 +30,7 @@
<div class="fvalue"> <div class="fvalue">
<img src="{{avatar}}" alt="cannot load avatar"/><br/> <img src="{{avatar}}" alt="cannot load avatar"/><br/>
{{#if canmodify}} {{#if canmodify}}
<a class="formauth" href="{{mibewRoot}}/operator/operator/{{opid}}/avatar/delete?{{csrfTokenInUrl}}"> <a class="formauth" href="{{route "operator_avatar_delete" operator_id=opid}}?{{csrfTokenInUrl}}">
{{l10n "Remove avatar"}} {{l10n "Remove avatar"}}
</a> </a>
{{/if}} {{/if}}

View File

@ -13,7 +13,7 @@
<div id="formmessage">{{l10n "Changes saved"}}</div> <div id="formmessage">{{l10n "Changes saved"}}</div>
{{/if}} {{/if}}
<form name="opgroupsForm" method="post" action="{{mibewRoot}}/operator/operator/{{opid}}/groups"> <form name="opgroupsForm" method="post" action="{{route "operator_groups_save" operator_id=opid}}">
{{csrfTokenInput}} {{csrfTokenInput}}
<div> <div>

View File

@ -13,7 +13,7 @@
<div id="formmessage">{{l10n "Changes saved"}}</div> <div id="formmessage">{{l10n "Changes saved"}}</div>
{{/if}} {{/if}}
<form name="permissionsForm" method="post" action="{{mibewRoot}}/operator/operator/{{opid}}/permissions"> <form name="permissionsForm" method="post" action="{{route "operator_permissions_save" operator_id=opid}}">
{{csrfTokenInput}} {{csrfTokenInput}}
<div> <div>

View File

@ -25,7 +25,7 @@
{{> _errors}} {{> _errors}}
<form name="agentsForm" method="get" action="{{mibewRoot}}/operator/operator"> <form name="agentsForm" method="get" action="{{route "operators"}}">
<div class="mform"> <div class="mform">
<div class="formtop"> <div class="formtop">
<div class="formtopi"></div> <div class="formtopi"></div>
@ -63,7 +63,7 @@
{{#if canmodify}} {{#if canmodify}}
<div class="tabletool"> <div class="tabletool">
<img src="{{stylePath}}/images/buttons/createagent.gif" border="0" alt="" /> <img src="{{stylePath}}/images/buttons/createagent.gif" border="0" alt="" />
<a href="{{mibewRoot}}/operator/operator/add" title="{{l10n "Add operator..."}}"> <a href="{{route "operator_add"}}" title="{{l10n "Add operator..."}}">
{{l10n "Add operator..."}} {{l10n "Add operator..."}}
</a> </a>
</div> </div>
@ -87,7 +87,7 @@
{{#each allowedAgents}} {{#each allowedAgents}}
<tr> <tr>
<td class="notlast"> <td class="notlast">
<a id="ti{{operatorid}}" href="{{../mibewRoot}}/operator/operator/{{operatorid}}/edit" class="man"> <a id="ti{{operatorid}}" href="{{route "operator_edit" operator_id=operatorid}}" class="man">
{{vclogin}} {{vclogin}}
</a> </a>
</td> </td>
@ -111,14 +111,14 @@
{{#if ../canmodify}} {{#if ../canmodify}}
<td> <td>
{{#if isDisabled}} {{#if isDisabled}}
<a href="{{../mibewRoot}}/operator/operator/{{operatorid}}/enable?{{csrfTokenInUrl}}">{{l10n "enable"}}</a> <a href="{{route "operator_enable" operator_id=operatorid}}?{{csrfTokenInUrl}}">{{l10n "enable"}}</a>
{{else}} {{else}}
<a href="{{../mibewRoot}}/operator/operator/{{operatorid}}/disable?{{csrfTokenInUrl}}">{{l10n "disable"}}</a> <a href="{{route "operator_disable" operator_id=operatorid}}?{{csrfTokenInUrl}}">{{l10n "disable"}}</a>
{{/if}} {{/if}}
</td> </td>
<td> <td>
<a class="removelink" id="i{{operatorid}}" href="{{../mibewRoot}}/operator/operator/{{operatorid}}/delete?{{csrfTokenInUrl}}"> <a class="removelink" id="i{{operatorid}}" href="{{route "operator_delete" operator_id=operatorid}}?{{csrfTokenInUrl}}">
{{l10n "remove"}} {{l10n "remove"}}
</a> </a>
</td> </td>

View File

@ -14,11 +14,11 @@
{{l10n "We've sent the instructions to your email. Please check it."}} {{l10n "We've sent the instructions to your email. Please check it."}}
<br/> <br/>
<br/> <br/>
<a href="{{mibewRoot}}/operator/login">{{l10n "Back to login"}}</a> <a href="{{route "login"}}">{{l10n "Back to login"}}</a>
</div> </div>
</div> </div>
{{else}} {{else}}
<form name="restoreForm" method="post" action="{{mibewRoot}}/operator/password-recovery"> <form name="restoreForm" method="post" action="{{route "password_recovery"}}">
<div id="loginpane"> <div id="loginpane">
<div class="header"> <div class="header">
@ -60,7 +60,7 @@
</table> </table>
<div class="links"> <div class="links">
<a href="{{mibewRoot}}/operator/login">{{l10n "Back to login"}}</a> <a href="{{route "login"}}">{{l10n "Back to login"}}</a>
</div> </div>
</div> </div>

View File

@ -14,11 +14,11 @@
{{l10n "Login using your new password."}} {{l10n "Login using your new password."}}
<br/> <br/>
<br/> <br/>
<a href="{{mibewRoot}}/operator/login?login={{loginname}}">{{l10n "Proceed to login"}}</a> <a href="{{route "login" login=loginname}}">{{l10n "Proceed to login"}}</a>
</div> </div>
</div> </div>
{{else}} {{else}}
<form name="resetForm" method="post" action="{{mibewRoot}}/operator/password-recovery/reset"> <form name="resetForm" method="post" action="{{route "password_recovery_reset"}}">
<input type="hidden" name="id" value="{{id}}"/> <input type="hidden" name="id" value="{{id}}"/>
<input type="hidden" name="token" value="{{token}}"/> <input type="hidden" name="token" value="{{token}}"/>
@ -75,11 +75,11 @@
</table> </table>
<div class="links"> <div class="links">
<a href="{{mibewRoot}}/operator/login">{{l10n "Back to login"}}</a> <a href="{{route "login"}}">{{l10n "Back to login"}}</a>
</div> </div>
</div> </div>
{{else}} {{else}}
<a href="{{mibewRoot}}/operator/login">{{l10n "Back to login"}}</a> <a href="{{route "login"}}">{{l10n "Back to login"}}</a>
{{/if}} {{/if}}
</div> </div>

View File

@ -13,7 +13,7 @@
<div id="formmessage">{{l10n "Changes saved"}}</div> <div id="formmessage">{{l10n "Changes saved"}}</div>
{{/if}} {{/if}}
<form name="settings" method="post" action="{{mibewRoot}}/operator/settings"> <form name="settings" method="post" action="{{route "settings_common_save"}}">
{{csrfTokenInput}} {{csrfTokenInput}}
<div> <div>

View File

@ -18,7 +18,7 @@
<div id="formmessage">{{l10n "Features activated"}}</div> <div id="formmessage">{{l10n "Features activated"}}</div>
{{/if}} {{/if}}
<form name="features" method="post" action="{{mibewRoot}}/operator/settings/features"> <form name="features" method="post" action="{{route "settings_features_save"}}">
{{csrfTokenInput}} {{csrfTokenInput}}
<input type="hidden" name="sent" value="true"/> <input type="hidden" name="sent" value="true"/>

View File

@ -13,7 +13,7 @@
<div id="formmessage">{{l10n "Changes saved"}}</div> <div id="formmessage">{{l10n "Changes saved"}}</div>
{{/if}} {{/if}}
<form name="performance" method="post" action="{{mibewRoot}}/operator/settings/performance"> <form name="performance" method="post" action="{{route "settings_performance_save"}}">
{{csrfTokenInput}} {{csrfTokenInput}}
<div> <div>

View File

@ -9,8 +9,7 @@
{{> _errors}} {{> _errors}}
<form name="statisticsForm" method="get" action="{{mibewRoot}}/operator/statistics"> <form name="statisticsForm" method="get" action="{{route "statistics" type=type}}">
<input type="hidden" name="type" value="{{type}}" />
{{> _tabs}} {{> _tabs}}
@ -163,7 +162,7 @@
<tbody> <tbody>
{{#each reportByAgent}} {{#each reportByAgent}}
<tr> <tr>
<td><a href="{{../mibewRoot}}/operator/history?q={{name}}&type=operator">{{name}}</a></td> <td><a href="{{route "history" q=name type="operator"}}">{{name}}</a></td>
<td>{{threads}}</td> <td>{{threads}}</td>
<td>{{msgs}}</td> <td>{{msgs}}</td>
<td>{{avglen}}</td> <td>{{avglen}}</td>

View File

@ -17,7 +17,7 @@
{{> _errors}} {{> _errors}}
<form name="translateForm" method="post" action="{{mibewRoot}}/operator/translation/{{key}}/edit"> <form name="translateForm" method="post" action="{{route "translation_edit_save" string_id=key}}">
{{csrfTokenInput}} {{csrfTokenInput}}
<div class="mform"> <div class="mform">

View File

@ -9,7 +9,7 @@
{{> _errors}} {{> _errors}}
<form method="post" action="{{mibewRoot}}/operator/translation/export"> <form method="post" action="{{route "translation_export_process"}}">
{{csrfTokenInput}} {{csrfTokenInput}}
<div> <div>

View File

@ -13,7 +13,7 @@
<div id="formmessage">{{l10n "Translation imported"}}</div> <div id="formmessage">{{l10n "Translation imported"}}</div>
{{/if}} {{/if}}
<form method="post" action="{{mibewRoot}}/operator/translation/import" enctype="multipart/form-data"> <form method="post" action="{{route "translation_import_process"}}" enctype="multipart/form-data">
{{csrfTokenInput}} {{csrfTokenInput}}
<div> <div>

View File

@ -7,7 +7,7 @@
<br /> <br />
<br /> <br />
<form name="translateForm" method="get" action="{{mibewRoot}}/operator/translation"> <form name="translateForm" method="get" action="{{route "translations"}}">
{{> _tabs}} {{> _tabs}}
<div class="mform"> <div class="mform">
@ -66,7 +66,7 @@
{{{source}}} {{{source}}}
</td> </td>
<td> <td>
<a href="{{../mibewRoot}}/operator/translation/{{id}}/edit" target="_blank" onclick="this.newWindow = window.open('{{../mibewRoot}}/operator/translation/{{id}}/edit', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=640,height=480,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;">{{{translation}}}</a> <a href="{{route "translation_edit" string_id=id}}" target="_blank" onclick="this.newWindow = window.open('{{route "translation_edit" string_id=id}}', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=640,height=480,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;">{{{translation}}}</a>
</td> </td>
</tr> </tr>
{{else}} {{else}}

View File

@ -80,7 +80,7 @@
jQuery(document).ready(function(){ jQuery(document).ready(function(){
Mibew.Application.start({ Mibew.Application.start({
server: { server: {
url: "{{mibewRoot}}/operator/users/update", url: "{{route "users_update"}}",
requestsFrequency: {{frequency}} requestsFrequency: {{frequency}}
}, },