_templates_={
	"task_created":"\n\t<dd title=\"\" class=\"activity activity-task\" id=\"[%=activity.id%]\" rel=\"4\">\n\t\t<dl>\n\t\t\t<dt>Task</dt>\n\t\t\t<dd class=\"left-item-panel\">\n\t\t\t\t<p>&nbsp;[%=parse_text(activity.summary)%]</p>\n\t\t\t\t<strong class=\"contact\"><a href=\"#\">[%=get_username(activity.createdBy)%]</a></strong> <strong class=\"due-date\" title=\"[%=get_created(activity.createdAt)%]\"></strong> \n\t\t\t</dd>\n\t\t\n\t\t</dl>\n\t</dd>\n",
	"note_created":"\n\t<dd title=\"\" class=\"activity activity-note\" id=\"[%=activity.id%]\" rel=\"4\">\n\t\t<dl>\n\t\t\t<dt>Note</dt>\n\t\t\t<dd class=\"left-item-panel\">\n\t\t\t\t<p>&nbsp;[%=parse_text(activity.summary)%]</p>\n\t\t\t\t<strong class=\"contact\"><a href=\"#\">[%=get_username(activity.createdBy)%]</a></strong> <strong class=\"due-date\" title=\"[%=get_created(activity.createdAt)%]\"></strong> \n\t\t\t</dd>\n\t\t\n\t\t</dl>\n\t</dd>\n",
	"contact_created":"\n\t<dd title=\"\" class=\"activity activity-contact\" id=\"[%=activity.id%]\" rel=\"4\">\n\t\t<dl>\n\t\t\t<dt>Contact</dt>\n\t\t\t<dd class=\"left-item-panel\">\n\t\t\t\t<p>&nbsp;<a href=\"/contacts/#[%=activity.objectReference%]\" rel=\"[%=activity.object_reference%]\">[%=parse_text(activity.summary)%]</a></p>\n\t\t\t\t<strong class=\"contact\">[%=get_username(activity.createdBy)%]</strong> <strong class=\"due-date\" title=\"[%=get_created(activity.createdAt)%]\"></strong> \n\t\t\t</dd>\n\t\t\n\t\t</dl>\n\t</dd>\n",
	"deal_created":"\n\t<dd title=\"\" class=\"activity activity-deal\" id=\"[%=activity.id%]\" rel=\"4\">\n\t\t<dl>\n\t\t\t<dt>Deal</dt>\n\t\t\t<dd class=\"left-item-panel\">\n\t\t\t\t<p>&nbsp;[%=parse_text(activity.summary)%]</p>\n\t\t\t\t<strong class=\"contact\"><a href=\"#\">[%=get_username(activity.createdBy)%]</a></strong> <strong class=\"due-date\" title=\"[%=get_created(activity.createdAt)%]\"></strong>\n\t\t\t</dd>\n\t\t\n\t\t</dl>\n\t</dd>\n",
	"activity/index":"\n\n\n\n\n\n\n",
	"admin/admin-view":"<div class=\"Tabs\">\n  <ul class=\"tabItems\">\n[%\n$.each(model,function(i,n){\n%]\n    <li class=\"tab[%=n%]\"><a href=\"#\">[%=n%]</a></li>\n[%});%]\n  </ul>\n</div>\n        \n[%\n$.each(model,function(i,n){\n%]\n<div class=\"adminPane hide\" id=\"admin[%=n%]\">\n  [%=n%] pane here.\n</div>\n[%});%]\n",
	"admin/categorie-tab-view":"<ul class=\"Tags\">\n[%\n$.each(model.tag,function(i,n){\n%]\n  <li>\n    [%=n.label%]\n  </li>\n[%\n});\n%]\n</ul>\n",
	"admin/database-tab-view":"<ul class=\"Tags\">\n[%\n$.each(model.tag,function(i,n){\n%]\n  <li>\n    [%=n.label%]\n  </li>\n[%\n});\n%]\n</ul>\n",
	"admin/system-tab-view":"<ul class=\"Tags\">\n[%\n$.each(model.tag,function(i,n){\n%]\n  <li>\n    [%=n.label%]\n  </li>\n[%\n});\n%]\n</ul>\n",
	"admin/tag-tab-view":"<ul class=\"Tags\">\n[%\n$.each(model.tag,function(i,n){\n%]\n  <li>\n    [%=n.label%]\n  </li>\n[%\n});\n%]\n</ul>\n",
	"admin/user-edit":"<form id=\"user_edit_form\" name=\"user\" action=\"\" autocomplete=\"off\">\n<input type=\"hidden\" name=\"id\" value=\"[%=user.id%]\" id=\"users_id\"/>\n<div id=\"user_form_wrapper\">\n\n[%\nvar friendlyName=user.firstName+\' \'+user.lastName;\nif (user.firstName==\'\' && user.lastName==\'\') friendlyName=user.username;\n%]\n  <h2>Edit account details for [%=friendlyName%]</h2>\n    \n  <span class=\"Field MediumField\">\n    <label for=\"users_4_username\" class=\"desc\">Username <span class=\"req\">*</span></label>\n    <input type=\"text\" name=\"username\" value=\"[%=user.username%]\" id=\"user_username\" autocomplete=\"off\"/>\n  </span>\n\n  <span class=\"Field MediumField \"><label for=\"users_4_email\" class=\"desc\">Email <span class=\"req\">*</span></label>\n    <input type=\"text\" name=\"email\" value=\"[%=user.email%]\" id=\"user_email\" />\n  </span>\n        \n  <span class=\"Field MediumField\">\n    <label for=\"role\">Role</label>\n    <select name=\"role\" id=\"role\">\n      <option value=\"USER\" [%if(user.roles.name==\'ROLE_USER\'){%]selected=\"selected\"[%}%]>User</option>\n      <option value=\"ADMIN\" [%if(user.roles.name==\'ROLE_ADMIN\'){%]selected=\"selected\"[%}%]>Administrator</option>\n    </select>  \n  </span>\n  \n  <span class=\"Field MediumField\">\n    <label for=\"enabled\">Enabled</label>\n    <select name=\"enabled\" id=\"enabled\">\n      <option value=\"true\">Enabled</option>\n      <option value=\"false\" [%if(user.enabled==\'false\'){%]selected=\"selected\"[%}%]>Disabled</option>\n    </select>  \n  </span>\n  \n  <span class=\"Field MediumField\"><label for=\"users_4_email\" class=\"desc\">Password</label>\n    <input type=\"password\" name=\"password\" value=\"\" id=\"password\"/>\n  </span>\n\n  <span class=\"Field MediumField\"><label for=\"users_4_email\" class=\"desc\">Confirm Password</label>\n    <input type=\"password\" name=\"confirmPassword\" value=\"\" id=\"confirmPassword\"/>\n  </span>\n  \n  <p>Enter a password to set a new password, or leave blank to keep password unchanged.</p>\n        \n    </div>\n    \n    <div class=\"Pane\">\n      <h2>Optional information</h2>\n\n      <span class=\"Field MediumField\">\n        <label for=\"users_4_firstName\" class=\"desc\">First name</label>\n        <input type=\"text\" name=\"firstName\" value=\"[%=user.firstName%]\" id=\"users_4_firstName\"/>\n      </span>\n    \n      <span class=\"Field MediumField\">\n        <label for=\"users_4_lastName\" class=\"desc\">Last name</label>\n        <input type=\"text\" name=\"lastName\" value=\"[%=user.lastName%]\" id=\"users_lastName\"/>\n      </span>\n\n      <span class=\"Field MediumField\">\n        <label for=\"users_4_phoneNumber\" class=\"desc\">Phone Number</label>\n        <input type=\"text\" name=\"phoneNumber\" value=\"[%=user.phoneNumber%]\" id=\"users_phoneNumber\"/>\n      </span>\n    \n      <span class=\"Field MediumField\">\n        <label for=\"users_4_website\" class=\"desc\">Web-site or Blog</label>\n        <input type=\"text\" name=\"website\" value=\"[%=user.website%]\" id=\"users_website\"/>\n      </span>\n      \n      <span class=\"Field MediumField\">\n        <label for=\"users_4_openid\" class=\"desc\">OpenID</label>\n        <input type=\"text\" name=\"openid\" value=\"[%=user.openid%]\" id=\"users_openid\"/>\n      </span>\n      \n    </div>\n      \n<div class=\"Actions\">\n  <ul>\n    <li><input type=\"button\" id=\"update_user\" name=\"action.update\" value=\"action.update\"/></li>\n    <li><input type=\"button\" id=\"cancel_update_user\" name=\"action.cancel\" value=\"action.cancel\"/></li>\n    <li><input type=\"button\" id=\"delete_user\" name=\"action.delete\" value=\"action.delete\"/></li>\n  </ul>\n</div>\n</div>\n</form>\n",
	"admin/user-tab-view":"<div>\n<ul class=\"Contacts\">\n[%\n$.each(model.user,function(i,n){\nif (n.avatar == null) n.avatar = \'http://www.gravatar.com/avatar/\'\n  +$.md5(n.email)\n  +\'?s=35&d=identicon\';\n%]\n  <li>\n    <dl class=\"Contact\">\n      <dt class=\"fn\"><a class=\"actEdit\" href=\"\" rel=\"[%=n.id%]\">[%=n.firstName%] [%=n.lastName%]</a></dt>\n      <dd class=\"avatar\"><img width=\"32\" height=\"32\" src=\"[%=n.avatar%]\" alt=\"photo of [%=n.firstName%] [%=n.lastName%]\" class=\"photo\"/></dd>\n      <dd class=\"email\"><a href=\"mailto:[%=n.email%]\" class=\"actEmail\">[%=n.email%]</a></dd>\n    </dl>\n  </li>\n[%\n});\n%]\n</ul>\n</div>\n\n<div class=\"Actions\">\n  <ul>\n\t\t<li><a href=\"/admin/users/new\" class=\"actAddUser\">Create new user</a></li>\n\t</ul>\n</div>\n",
	"show_tags2":"\n\t<span id=\"the_tags\">\n        [%=render_partial(\'static_tags2\',{tags:tags,is_editing:false});%]\n    </span>\n    <span class=\"add-tags hide\">\n        [%=render_partial(\'deletable_tags2\',{tags:tags,is_editing:false});%]\n    </span>\n",
	"static_tags2":"\n\t<ul class=\"static-tags\">[%\n    if(tags!=null && tags.tag!=null && tags.tag.length!=0){\n        if(tags.tag.length>0){\n        $.each(tags.tag,function(i,n){\n            %]<li><span>[%=n.label%]</span></li>[%\n        });\n        %]\n            <li><a class=\"open-tag-edit edit-tags-action\" href=\"#\">[%=resource_string(\'action.contacts.index.edittags\')%]</a></li>\n        [%\n    }\n    }else{\n    %]\n        <li><a class=\"open-tag-edit\" href=\"#\">[%=resource_string(\'action.contacts.index.addtags\')%]</a></li>\n    [%\n    }\n    %]</ul>   \n",
	"deletable_tags2":"\n\t<ul class=\"deletable-tags\">[%\n      if(tags!=null && tags.tag!=null && tags.tag.length!=0){\n        $.each(tags.tag,function(i,n){\n            %]<li><a href=\"#\" title=\"delete tag \'[%=n.label%]\'\" rel=\"[%=n.id%]\">[%=n.label%]</a></li>[%\n        });\n      }%]\n      <li class=\"not-a-tag\"><input name=\"new_tag\" type=\"text\"/></li>\n     </ul>\n     <ul>\n     \n      <li class=\"not-a-tag\"><a class=\"add-atag-action\" href=\"#\">[%=resource_string(\'action.contacts.index.addtag\')%]</a></li>\n      <li class=\"not-a-tag\"><a class=\"close-tag-action\" href=\"#\">[%=resource_string(\'action.contacts.index.closetag\')%]</a></li>\n    </ul>\n",
	"contacts/ContactCard":"\n\n\n\n\n<div class=\"gen-toolbar toolbar \">\n\n    <ul id=\"general_toolbar\">\n        <li><a title=\"[%=resource_string(\'action.contacts.index.editcontact\')%]\" href=\"#\" id=\"link-contact-edit\">[%=resource_string(\'action.contacts.index.editcontact\')%]</a></li>\n        <li><a title=\"[%=resource_string(\'action.contacts.index.deletecontact\')%]\" href=\"#\" id=\"link-contact-delete\">[%=resource_string(\'action.contacts.index.deletecontact\')%]</a></li>\n    \t<li class=\"export-ui\"><a title=\"[%=resource_string(\'action.contacts.index.exportcontact\')%]\" href=\"/export?exportIds=[%=contact.id%]&format=vcard\" id=\"link-contact-export\">[%=resource_string(\'action.contacts.index.exportcontact\')%]</a></li>\n    </ul>\n\n\t<span class=\"contact-name\">[%=contact.firstName %] [%=contact.lastName %]</span>\n         [%\n         if(contact.title!=\'\' & contact.title!=null){\n             %]<span class=\"contact-title\">[%=contact.title %]</span>[%\n         }\n         %]\n\n         [% if (contact.companies!=null && contact.companies.company!=null) { %]\n         [%\nif ((contact.title!=\'\' && contact.title!=null) || (contact.firstName!=\'\' || contact.lastName!=\'\')){\n\t\t\t%]at[%\n}\n\t\t\t%]&nbsp;<span class=\"company-name\">[%=contact.companies.company[0].name %]</span>\n         [%}%]\n </div>\n\n  <div class=\"contact-info-header\">\n  \n    <dl>\n        \n\n        <dd class=\"tags\">[%=render_partial(\'show_tags2\',{tags:contact.tag,is_editing:false});%]</dd>\n        \n        <dd class=\"avatar\"><img src=\"/api/contacts/[%=contact.id%]/avatar\" alt=\"photo\" class=\"photo\"/></dd>\n    </dl>\n  </div>\n",
	"show_tags2":"\n\t<span id=\"the_tags\">\n        [%=render_partial(\'static_tags2\',{tags:tags,is_editing:false});%]\n    </span>\n    <span class=\"add-tags hide\">\n        [%=render_partial(\'deletable_tags2\',{tags:tags,is_editing:false});%]\n    </span>\n",
	"static_tags2":"\n\t<ul class=\"static-tags\">[%\n    if(tags!=null && tags.tag!=null && tags.tag.length!=0){\n        if(tags.tag.length>0){\n        $.each(tags.tag,function(i,n){\n            %]<li><span>[%=n.label%]</span></li>[%\n        });\n        %]\n            <li><a class=\"open-tag-edit edit-tags-action\" href=\"#\">[%=resource_string(\'action.contacts.index.edittags\')%]</a></li>\n        [%\n    }\n    }else{\n    %]\n        <li><a class=\"open-tag-edit\" href=\"#\">[%=resource_string(\'action.contacts.index.addtags\')%]</a></li>\n    [%\n    }\n    %]</ul>   \n",
	"deletable_tags2":"\n\t<ul class=\"deletable-tags\">[%\n      if(tags!=null && tags.tag!=null && tags.tag.length!=0){\n        $.each(tags.tag,function(i,n){\n            %]<li><a href=\"#\" title=\"delete tag \'[%=n.label%]\'\" rel=\"[%=n.id%]\">[%=n.label%]</a></li>[%\n        });\n      }%]\n      <li class=\"not-a-tag\"><input name=\"new_tag\" type=\"text\"/></li>\n     </ul>\n     <ul>\n     \n      <li class=\"not-a-tag\"><a class=\"add-atag-action\" href=\"#\">[%=resource_string(\'action.contacts.index.addtag\')%]</a></li>\n      <li class=\"not-a-tag\"><a class=\"close-tag-action\" href=\"#\">[%=resource_string(\'action.contacts.index.closetag\')%]</a></li>\n    </ul>\n",
	"contacts/ContactCard.orig":"\n\n\n\n\n<div class=\"gen-toolbar toolbar \">\n\n    <ul id=\"general_toolbar\">\n        <li><a title=\"[%=resource_string(\'action.contacts.index.editcontact\')%]\" href=\"#\" id=\"link-contact-edit\">[%=resource_string(\'action.contacts.index.editcontact\')%]</a></li>\n        <li><a title=\"[%=resource_string(\'action.contacts.index.deletecontact\')%]\" href=\"#\" id=\"link-contact-delete\">[%=resource_string(\'action.contacts.index.deletecontact\')%]</a></li>\n    \t<li class=\"export-ui\"><a title=\"[%=resource_string(\'action.contacts.index.exportcontact\')%]\" href=\"/export?exportIds=[%=contact.id%]&format=vcard\" id=\"link-contact-export\">[%=resource_string(\'action.contacts.index.exportcontact\')%]</a></li>\n    </ul>\n\n\t<span class=\"contact-name\">[%=contact.firstName %] [%=contact.lastName %]</span>\n         [%\n         if(contact.title!=\'\' & contact.title!=null){\n             %]<span class=\"contact-title\">[%=contact.title %]</span>[%\n         }\n         %]\n\n         [% if (contact.companies!=null && contact.companies.company!=null) { %]\n         [%\nif ((contact.title!=\'\' && contact.title!=null) || (contact.firstName!=\'\' || contact.lastName!=\'\')){\n\t\t\t%]at[%\n}\n\t\t\t%]&nbsp;<span class=\"company-name\">[%=contact.companies.company[0].name %] <span id=\"[%=contact.companies.company[0].id %]\"></span></span>\n         <script type=\"text/javascript\">\n  \t\t\tnew LinkedIn.CompanyInsiderBox(\"[%=contact.companies.company[0].id %]\",\"[%=contact.companies.company[0].name %]\");\n\t\t</script>\n         [%}%]\n </div>\n\n  <div class=\"contact-info-header\">\n  \n    <dl>\n        \n\n        <dd class=\"tags\">[%=render_partial(\'show_tags2\',{tags:contact.tag,is_editing:false});%]</dd>\n        \n        <dd class=\"avatar\"><img src=\"/api/contacts/[%=contact.id%]/avatar\" alt=\"photo\" class=\"photo\"/></dd>\n    </dl>\n  </div>\n",
	"deal_involved_qtip":"\n\t<div class=\"qtip_panel\">\n\t\t<dl>\n\t\t\t<dt>Value</dt><dd>[%=format_currency(deal.amount)%]</dd>\n\t\t\t<dt>Probability</dt><dd>[%=deal.probability%]%</dd>\n\t\t</dl>\n\t</div>\n\t  \n",
	"contact_note_holder":"\n\t<dl class=\"note-list notes-left-today hide\">\n\t\t<dt class=\"note-group\">Left Today</dt>\n\t</dl>\n\t\n\t<dl class=\"note-list notes-left-yesterday hide\">\n\t\t<dt class=\"note-group\">Left Yesterday</dt>\n\t</dl>\n\t\n\t<dl class=\"note-list notes-left-recently hide\">\n\t\t<dt class=\"note-group\">Left Recently</dt>\n\t</dl>\n\t\n",
	"contact_task_holder":"\n\t<dl class=\"task-list tasks-overdue hide\">\n\t\t<dt class=\"task-group\">\n\t\t\tOverdue\n\t\t</dt>\n\t</dl>\n\t<dl class=\"task-list tasks-due-today hide\">\n\t\t<dt class=\"task-group\">\n\t\t\tToday\n\t\t</dt>\n\t</dl>\n\t<dl class=\"task-list tasks-due-tomorrow hide\">\n\t\t<dt class=\"task-group\">\n\t\t\tTomorrow\n\t\t</dt>\n\t</dl>\n\t<dl class=\"task-list tasks-due-this-year hide\">\n\t\t<dt class=\"task-group\">\n\t\t\tFuture\n\t\t</dt>\n\t</dl>\n\t<dl class=\"task-list complete-tasks hide\">\n\t\t<dt class=\"task-group\">\n\t\t\tComplete\n\t\t</dt>\n\t</dl>\n\t<div class=\"Actions\" style=\"display: none;\">\n\t\t<ul>\n\t\t\t<li>\n\t\t\t\t<a href=\"#\" id=\"show_me_more_notes\" name=\"show_me_more_notes\">Show me 10 more</a>\n\t\t\t</li>\n\t\t</ul>\n\t</div>\n\t\n",
	"contact_task":"\n\t[%\n        var usr=get_user(task.assignedTo);\n    %]\n    <dd class=\"task\" rel=\"[%=task.id%]\">\n        <dl>\n            <dd class=\"check-mark\"><input type=\"checkbox\" class=\"task-checkbox\" [%=(task.complete==\'true\')?\'checked=\\\'checked\\\'\':\'\'%] value=\"16\"/></dd>\n            <dd class=\"left-item-panel\"><strong class=\"assignee\">[%=user_fullname(usr)%]</strong>&nbsp;-&nbsp;[%=task.title%]</dd>\n            <dd class=\"right-item-panel\"><strong class=\"type\">[%=lookup_task_type(task_types,task.type).name%]</strong>&nbsp;-&nbsp;<strong class=\"due-date\"><abbr class=\"timeago\" title=\"[%=task.dueOn%]\"></abbr></strong></dd>\n        </dl>\n    </dd>\n",
	"task_list_group":"\n\t<dl class=\"task-list [%=group.css%]\">\n    \t<dt class=\"task-group\">[%=group.title%]</dt>\n    </dl>\n\n",
	"group_list_empty_feedback":"\n\t<div class=\"feedback notification\">[%=resource_string(\'feedback.contacts.index.chooseacontact\')%]</div>\n",
	"contact_note":"\n\t<dd rel=\"[%=note.id%]\">\n<dl>\n    [%\n    var user = get_user(note.createdBy);\n    %]\n    <dd class=\"note-meta\">\n        <span class=\"\">\n            <a href=\"/profile/[%=user.id%]\">[%=user_fullname(user)%]</a>\n        </span>\n        <em>\n            <abbr class=\"published updated timeago\" title=\"[%=note.createdAt%]\">[%=note.createdAt%]</abbr>\n        </em>\n    </dd>\n    <dd class=\"note-actions \">\n        <ul>\n        <li id=\"edit-action\"><a href=\"\" >[%=resource_string(\'action.contacts.index.edit\')%]</a></li>\n        <li id=\"delete-action\"><a href=\"\">[%=resource_string(\'action.contacts.index.delete\')%]</a></li>\n        <li id=\"confirm-action\"><a href=\"\" >[%=resource_string(\'action.contacts.index.done\')%]</a></li>\n        <li id=\"cancel-action\"><a href=\"\">[%=resource_string(\'action.contacts.index.cancel\')%]</a></li>\n        </ul>\n    </dd>\n    <dd class=\"note-info\">\n        <img alt=\"\" src=\"/api/users/[%=user.id%]/avatar\" class=\"photo avatar _hide\"/>\n    </dd>\n    <dd class=\"note-body\" id=\"view-box\">\n        <div id=\"note-body-box\">[%=parse_note_body(note.body)%]</div>\n        [% if(note.deal != undefined) { \n        \tvar deal = get_deal(note.deal);\n        %]\n        \t<p><span class=\"relates-to-deal\">Deal</span> [%=deal.name%]</p>\n        [% } %]\n    </dd>\n\n    <dd class=\"note-body\" id=\"edit-box\">\n        <span class=\"Field\"><textarea>[%=parse_note_body(note.body)%]</textarea></span>\n    </dd>\n\t<dd style=\"clear:both!important;\"></dd>\n</dl>\n</dd>\n\n",
	"contacts/ContactNoteTask":"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n    <div class=\"Tabs\">\n        <ul>\n            <li><a href=\"#contact-detail\">[%=resource_string(\'action.contacts.index.detailstab\')%]</a></li>\n            <li><a href=\"#contact-notes\">[%=resource_string(\'action.contacts.index.notestab\')%]</a></li>\n            <li><a href=\"#contact-tasks\">[%=resource_string(\'action.contacts.index.taskstab\')%]</a></li>\n        </ul>\n    </div>\n\n\n    <div id=\"contact-detail\" class=\"contact-information contact-tab-panel hide\">\n      [%\n\n      with(contact){\n          var j=0;\n\n          if(info!=\'\'){\n            %]<dl><dt>[%=resource_string(\'label.contacts.index.details.information\')%]</dt>[%\n              /* Show First */\n              %]\n              <dd>[%=info%]</dd>\n              </dl>[%\n          }\n          if(emailAddresses!=null){\n              %]<dl><dt>[%=resource_string(\'label.contacts.index.details.email\')%]</dt>[%\n              /* Show First */\n              %]<dd><strong class=\"type\">[%=emailAddresses.emailAddress[0].type.value%]</strong><a href=\"mailto:[%=emailAddresses.emailAddress[0].email%]\">[%=emailAddresses.emailAddress[0].email%]</a></dd>[%\n\n\n              if(emailAddresses.emailAddress.length>1){\n                  /* Show Others */\n                  $.each(emailAddresses.emailAddress,function(i,n){\n                      if(i!=0){\n                          %]<dd><span class=\"type\">[%=n.type.value%]</span><a href=\"mailto:[%=n.email%]\">[%=n.email%]</a></dd>[%\n                      }\n\n                  });\n\n              }\n              %]</dl>[%\n          }\n\n          if(phoneNumbers!=null){\n                  %]<dl><dt>[%=resource_string(\'label.contacts.index.details.phone\')%]</dt>[%\n                  /* Show First */\n                  %]<dd><strong class=\"type\">[%=phoneNumbers.phoneNumber[0].type.value%]</strong><a href=\"callto://[%=phoneNumbers.phoneNumber[0].number%]\">[%=phoneNumbers.phoneNumber[0].number%]</a></dd>[%\n                   if(phoneNumbers.phoneNumber.length>1){\n                      /* Show Others */\n                      $.each(phoneNumbers.phoneNumber,function(i,n){\n                          if(i!=0){\n                          %]<dd><span class=\"type\">[%=n.type.value%]</span><a href=\"callto://[%=n.number%]\">[%=n.number%]</a></dd>[%\n                          }\n\n                      });\n\n                  }\n                  %]</dl>[%\n              }\n\n              if(websites!=null){\n                  %]<dl><dt>[%=resource_string(\'label.contacts.index.details.website\')%]</dt>[%\n                  /* Show First */\n                  %]<dd><strong class=\"type\">[%=websites.website[0].type.value%]</strong><a href=\"http://[%=websites.website[0].url%]\" target=\"blank\">[%=websites.website[0].url%]</a></dd>[%\n                  if(websites.website.length>1){\n                    /* Show Others */\n                    $.each(websites.website,function(i,n){\n                        if(i!=0){\n                        %]<dd><span class=\"type\">[%=n.type.value%]</span><a href=\"http://[%=n.url%]\" target=\"blank\">[%=n.url%]</a></dd>[%\n                        }\n\n                    });\n                }\n                  %]</dl>[%\n              }\n\n\n\t\t\t\tif(instantMessengers!=null){\n\t                  %]<dl><dt>[%=resource_string(\'label.contacts.index.details.messenger\')%]</dt>[%\n\t                  /* Show First */\n\t                  %]<dd><strong class=\"type\">[%=imTypes.types[instantMessengers.instantMessenger[0].product].title%]</strong><a href=\"[%=resource_string(imTypes.types[instantMessengers.instantMessenger[0].product].protocol,instantMessengers.instantMessenger[0].account)%]\" target=\"blank\">\n[%=instantMessengers.instantMessenger[0].account%]\n\t\t</a></dd>[%\n\t                  if(instantMessengers.instantMessenger.length>1){\n\t                    /* Show Others */\n\t                    $.each(instantMessengers.instantMessenger,function(i,n){\n\t                        if(i!=0){\n\t                        %]<dd><span class=\"type\">[%=imTypes.types[instantMessengers.instantMessenger[i].product].title%]</span><a href=\"[%=resource_string(imTypes.types[instantMessengers.instantMessenger[i].product].protocol,instantMessengers.instantMessenger[i].account)%]\" target=\"blank\">[%=n.account%]</a></dd>[%\n\t                        }\n\n\t                    });\n\t                }\n\t                  %]</dl>[%\n\t              }\n\n              if(addresses!=null){\n                  %]<dl><dt>[%=resource_string(\'label.contacts.index.details.address\')%]</dt>[%\n                  /* Show First */\n                  %]<dd><strong class=\"type\">[%=addresses.address[0].type.value%]</strong><span class=\"data\">[%=format_address(addresses.address[0])%]</span></dd>[%\n                   if(addresses.address.length>1){\n\n                      /* Show Others */\n                      $.each(addresses.address,function(i,n){\n                          if(i!=0){\n                          %]<dd><span class=\"type\">[%=n.type.value%]</span><span class=\"data\">[%=format_address(n)%]</span></dd>[%\n                          }\n\n                      });\n\n                  }\n                   %]</dl>[%\n              }\n\n      }\n      %]\n    </div>\n\n\n    <div id=\"contact-notes\" class=\"contact-tab-panel hide\">\n        <div id=\"id-add-note-container\" class=\"show-hide \" rel=\"id-add-note-panel\">\n            <div id=\"id-add-note-panel\" class=\"_hide\">\n                <h2 class=\"title hide\"><span>[%=resource_string(\'action.contacts.index.addnote\')%]</span></h2>\n                <form action=\"/api/notes\" id=\"add-note-form\">\n                    <span class=\"Field ClearedField\">\n                        <textarea id=\"add-note-body\" class=\"expanding\"/>\n                    </span>\n\t\t\t\t\t<span class=\"Field ClearedField\" id=\"note-contact-field\">\n\t\t\t\t\t\t<label for=\"note-deal\">Associate with a deal?</label>\n                        <select id=\"add-note-deal\" name=\"add-note-deal\">\n\t\t\t\t\t\t\t<option value=\"-1\">Do not associate</option>\n\t\t\t\t\t\t\t [%\n                                  $.each(deals.deal,function(i,n){\n\t\t\t\t\t\t\t\t\tif(is_in_progress(n)){\n\n                                      %]<option value=\"[%=n.id%]\">[%=n.name%]</option>[%\n\t\t\t\t\t\t\t\t\t}\n                                  });\n                            %]\n\t\t\t\t\t\t</select>\n                    </span>\n                    <div class=\"Actions\">\n                        <ul>\n                            <li><input type=\"button\" value=\"[%=resource_string(\'action.contacts.index.addnote\')%]\" id=\"add-note-action\"/></li>\n                        </ul>\n                    </div>\n                </form>\n            </div>\n        </div>\n        <div class=\"\" id=\"contact-notes-list\">\n\t\t\t<p>NOTES GO HERE</p>\n        </div>\n\n    </div>\n\n\n\n\n    <div id=\"contact-tasks\" class=\"contact-tab-panel hide\">\n        <div id=\"id-add-task-container\" class=\"show-hide \" rel=\"id-add-note-panel\">\n            <div id=\"id-add-task-panel\" class=\"_hide\">\n                <form id=\"add-task-form\" action=\"/api/task\" name=\"add-task-form\">\n\t\t\t\t\t<span class=\"Field ClearedField\"><input type=\"text\" name=\"description\" id=\"add-task-title\"></span>\n\t\t\t\t\t<fieldset style=\"clear: both;\">\n\t\t\t\t\t\t<span class=\"Field\"><label>Type</label> <select name=\"taskType\">\n\t\t\t\t\t\t\t[% \t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$.each(task_types,function(i,n){\n\t\t\t\t\t\t\t\t%]\n\t\t\t\t\t\t\t\t<option value=\"[%=n.id%]\">\n\t\t\t\t\t\t\t\t\t[%=n.name%]\n\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t[%\n\t\t\t\t\t\t\t}); \n\t\t\t\t\t\t\t%]\n\t\t\t\t\t\t</select></span> <span class=\"Field\"><label>Assigned To</label> <select name=\"assignTo\">\n\t\t\t\t\t\t[%\n                            $.each(users,function(o,p){\nif(p.enabled==\'true\'){\n                        %]\n                            <option value=\"[%=p.id%]\">[%=user_fullname(p)%]</option>\n                        [%\n}\n                            });\n                        %]\n\t\t\t\t\t\t</select></span> \n\t\t\t\t\t\t<span class=\"Field\">\n                            <label>Due</label>\n                            <input type=\"text\" name=\"due\"/>\n                        </span>\n\t\t\t\t\t\t<span class=\"Field ClearedField\" id=\"note-contact-field\">\n\t\t\t\t\t\t\t<label for=\"note-deal\">Associate with a deal?</label>\n\t                        <select id=\"add-task-deal\" name=\"add-note-deal\">\n\t\t\t\t\t\t\t\t<option value=\"-1\">Do not associate</option>\n\t\t\t\t\t\t\t\t [%\n\t                                  $.each(deals.deal,function(i,n){\n\t\t\t\t\t\t\t\t\t\t\tif(is_in_progress(n)){\n\t                                      %]<option value=\"[%=n.id%]\">[%=n.name%]</option>[%\n\t\t\t\t\t\t\t\t\t\t\t}\n\t                                  });\n\t                            %]\n\t\t\t\t\t\t\t</select>\n\t                    </span>\n\t\t\t\t\t</fieldset>\n\t\t\t\t\t<div class=\"Actions\">\n\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<input type=\"button\" id=\"add-task-action\" value=\"Add Task\">\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</div>\n\t\t\t\t</form>\n            </div>\n    </div>\n\n        <div id=\"contact-tasks-list\">\n\t\t\t\n\t\t\t\n\t\t\t<div class=\"Actions\">\n                <ul>\n                    <li><a id=\"show_me_more_notes\" href=\"#\">Show me [%=pages.note%] more</a></li>\n                </ul>\n            </div>\n        </div>\n    </div>\n",
	"contacts/ContactsDeals":"<h2>Deals</h2>\n[%\n\tif(deals == null){\n\t\t%]\n\t\t<p>No deals found for this contact</p>\n\t\t[%\n\t}else{\n\t\t%]\n\t\t<dl id=\"contact-involved-list\">\n\t\t\t[%\n\t\t    $.each(deals,function(i,n){\n\t\t        if(n.data.length != 0){\n\t\t            %]<dt id=\'[%=i%]\'>[%=n.key%]</dt>[%\n    \t\t\t\t$.each(n.data,function(a,b){\n    \t\t\t\t\t%]<dd id=\"[%=a%]\" rel=\"[%=i%]\"><a rel=\"[%=b.id%]\">[%=b.name%]</a></dd>[%\t\n    \t\t\t\t});   \n\t\t        }\n\t\t\t});\n\t\t    %]\n\t\t</dl>\n\t\t[%\n\t}\n%]\n",
	"contacts/ContactsListView":"\n<dl>\n\n[%\nvar _current_letter=\'_\';\nvar _alt=false;\n\nfor(index=0;index<model.contact.length;index++){\n    var _contact=model.contact[index];\n\n    with(model.contact[index]){\n        fn=firstName;\n        ln=lastName;\n        var flag=false;\n\n\n        if(fn==\'\' || ln==\'\'){\n            flag=true;\n            if(fn==\'\' && ln==\'\'){\n                fn = \'No\';\n                ln = \'Name\';\n            }\n        }\n\n\n        try{\n            if(lastName.length > 0) {\n                var _this_letter=lastName.substring(0,1).toUpperCase();\n            } else {\n                var _this_letter=firstName.substring(0,1).toUpperCase();\n            }\n\n            if(_this_letter!=\'\' && _current_letter!=_this_letter){\n\t\t\t_alt=false;\n            %]\n                <dt rel=\"[%=_this_letter%]\">[%=_this_letter%]&nbsp;</dt>\n\n            [%\n                _current_letter=_this_letter;\n            }\n        }catch(e){\n            \n        }\n\n\t\tvar u=\'\';\n\n\t\tif(fn && ln){\n\t\t\tu=\'&nbsp;\';\n\t\t}\n\n        if(fn || ln){\n        var s=\'\';\n\t\tvar t=\'\';\n\t\t\n\t\tif(selected[index]==true){\n\t\t\tt=\'checked=checked\';\n\t\t}\n\t\t\n        if(flag==true){\n            s=\'color:red\';\n        }else{\n            s=\'\';\n        }\n\n        %]\n        <dd rel=\"[%=index%]\" letter=\"\" class=\"[%=(_alt==true)?\'alternate\':\'\'%]\"><input rel=\"[%=index%]\" type=\"checkbox\" [%=t%]/><a style=\"[%=s%]\" rel=\"[%=index%]\" href=\"#[%=id%]\">[%=fn%]<strong>[%=u%][%=ln%]</strong></a></dd>\n        [%\n\n\t\t\t_alt=!_alt;\n\t\t}\n    }\n\n\n} %]\n</dl>\n\n\n\n",
	"contacts/ContactsSearchResultView":"<dl>\n    <dd class=\"show-search-results-action \"><a href=\"#\" rel=\"[%=1%]\">Search Results</a><span>[%=searchResultsCount%]</span></dd>\n    <dd class=\"show-all-results-action\"><a href=\"#\">All</a><span>[%=allCount%]</span></dd>\n    <dt class=\"seperator\">Tags</dt>\n    [%\n    $.each(tags,function(i,n){\n        %]<dd class=\"tag\"><a href=\"#\" rel=\"[%=n.tag.value%]\">[%=n.tag.label%]</a></dd>[%\n\n\n    %]\n    [%\n    });\n    %]\n</dl>\n",
	"show_tags":"\n\t<dt>Tags</dt>\n    <dd id=\"the_tags\">\n        [%=render_partial(\'static_tags\',{tags:tags,is_editing:false});%]\n    </dd>\n    <dd class=\"add-tags\">\n        [%=render_partial(\'deletable_tags\',{tags:tags,is_editing:false});%]\n\n        <span class=\"tag-field action-field\">\n            <label>Add tags</label><input name=\"new_tag\" type=\"text\"/>\n            <ul>\n            <li><input class=\"add-atag-action\" type=\"button\" value=\"add tag\"/></li>\n            <li><a class=\"close-tag-action\" href=\"#\">close</a></li>\n            </ul>\n        </span>\n    </dd>\n",
	"static_tags":"\n\t\n\t<ul class=\"static-tags\">[%\n    if(tags!=null && tags.tag!=null && tags.tag.length!=0){\n        if(tags.tag.length>0){\n        $.each(tags.tag,function(i,n){\n            %]<li>[%=n.label%], </li>[%\n        });\n        %]\n            <li><a class=\"open-tag-edit edit-tags-action\" href=\"#\">Edit Tags</a></li>\n        [%\n    }\n    }else{\n    %]\n        <li><a class=\"open-tag-edit\" href=\"#\">Add Tags</a></li>\n    [%\n    }\n    %]</ul>\n",
	"deletable_tags":"\n\n\t<ul class=\"deletable-tags\">[%\n\n    if(tags!=null && tags.tag!=null){\n    if(tags.tag.length>0){\n    $.each(tags.tag,function(i,n){\n        %]<li><a href=\"#\" rel=\"[%=i%]\">[%=n.label%]</a></li>[%\n    });\n    }\n    }%]</ul>\n",
	"edit_contact_inline":"\n\t<div class=\"contact-info-header\">\n        <img  src=\"/api/contacts/[%=contact.id%]/avatar\" alt=\"photo\" class=\"photo\"/>\n        <span style=\"float: left;\">\n            <span class=\"first-name\">[%=contact.firstName %] [%=contact.lastName %]</span>\n            <span class=\"job-title\" >[%=contact.title %]</span>\n        </span>\n  </div>\n\n  <div class=\"contact-info-details\">\n    [%\n    with(contact){\n        var j=0;\n\n        %]\n        <dl class=\"tags-list\">\n        [%=render_partial(\'show_tags\',{tags:tags,is_editing:false});%]\n        </dl>\n        [%\n\n        if(emailAddresses!=null){\n            %]<dl><dt>asdasd</dt>[%\n            /* Show First */\n            %]<dd><strong>[%=emailAddresses.emailAddress[0].type.value%]</strong> : <a href=\"mailto:[%=emailAddresses.emailAddress[0].email%]\">[%=emailAddresses.emailAddress[0].email%]</a></dd>[%\n\n\n            if(emailAddresses.emailAddress.length>1){\n                /* Show Others */\n                $.each(emailAddresses.emailAddress,function(i,n){\n                    if(i!=0){\n                        %]<dd>[%=n.type.value%] : <a href=\"mailto:[%=n.email%]\">[%=n.email%]</a></dd>[%\n                    }\n\n                });\n\n            }\n            %]</dl>[%\n        }\n\n        if(phoneNumbers!=null){\n                %]<dl><dt>Phone</dt>[%\n                /* Show First */\n                %]<dd><strong>[%=phoneNumbers.phoneNumber[0].type.value%]</strong> : [%=phoneNumbers.phoneNumber[0].number%]</dd>[%\n                 if(phoneNumbers.phoneNumber.length>1){\n                    /* Show Others */\n                    $.each(phoneNumbers.phoneNumber,function(i,n){\n                        if(i!=0){\n                        %]<dd>[%=n.type.value%] : <a href=\"callto:[%=n.number%]\">[%=n.number%]</a></dd>[%\n                        }\n\n                    });\n\n                }\n                %]</dl>[%\n            }\n\n            if(websites!=null){\n                %]<dl><dt>Website</dt>[%\n                /* Show First */\n                %]<dd><strong>[%=websites.website[0].type.value%]</strong> : <a href=\"http://[%=websites.website[0].url%]\" target=\"blank\">[%=websites.website[0].url%]</a></dd>[%\n                if(websites.website.length>1){\n                  /* Show Others */\n                  $.each(websites.website,function(i,n){\n                      if(i!=0){\n                      %]<dd>[%=n.type.value%] : <a href=\"http://[%=n.url%]\" target=\"blank\">[%=n.url%]</a></dd>[%\n                      }\n\n                  });\n              }\n                %]</dl>[%\n            }\n\n            if(addresses!=null){\n                %]<dl><dt>Address</dt>[%\n                /* Show First */\n                %]<dd><strong>[%=addresses.address[0].type.value%]</strong> : <span>[%=format_address(addresses.address[0])%]</span>/dd>[%\n                 if(addresses.address.length>1){\n\n                    /* Show Others */\n                    $.each(addresses.address,function(i,n){\n                        if(i!=0){\n                        %]\n\t\t\t\t\t\t\t<dd>[%=n.type.value%] : <span>[%=format_address(n)%]</span></dd>\n\t\t\t\t\t\t[%\n                        }\n\n                    });\n\n                }\n                 %]</dl>[%\n            }\n\n    }\n    %]\n  </div>\n",
	"contact_tasks_and_notes":"\n\t<div class=\"Tabs\">\n        <ul>\n            <li><a href=\"#contact-notes\">Notes</a></li>\n            <li><a href=\"#contact-tasks\">Todos</a></li>\n        </ul>\n    </div>\n\n\n    <div id=\"contact-notes\" class=\"contact-tab-panel hide\">\n        <div id=\"id-add-note-container\" class=\"show-hide Pane\" rel=\"id-add-note-panel\">\n            <a class=\"more-show\" href=\"#\">Add a note</a>\n            <div id=\"id-add-note-panel\" class=\"hide\">\n                <h2>Add a note to this contact.</h2>\n                <form action=\"/api/notes\" id=\"add-note-form\">\n                    <span class=\"Field\">\n                        <label class=\"hide\">Subject</label>\n                        <textarea id=\"add-note-body\" class=\"expanding\"/>\n                    </span>\n\n                    <div class=\"Actions\">\n                        <ul>\n                            <li><input type=\"button\" value=\"Add note\" id=\"add-note-action\"/></li>\n                            <li><a class=\"less-hide\" href=\"#\">Cancel</a></li>\n                        </ul>\n                    </div>\n                </form>\n            </div>\n        </div>\n        <div class=\"Pane\" id=\"contact-notes-list\">\n        [%\n            if(contact.note!=null && contact.note[0]!=null){\n                var _groups=group_notes(contact.note);\n\n                $.each(_groups,function(i,n){\n                    if(n.notes.length!=0 && n.notes[0]!=null){\n                        %]<dl class=\"note-list [%=n.css%]\">\n                            <dt class=\"note-group\">[%=n.title%]</dt>\n                        [%\n                        $.each(n.notes,function(ii,nn){\n                        %]\n                        <dd>\n                        <div class=\"CommentItem hentry\">\n                            <h3>\n                                 <span class=\"perma\"><a title=\"Permalink\" href=\"#comment_196\" rel=\"bookmark\">#</a></span>\n\n                                 <span class=\"vcard\"><a href=\"/profile/[%=nn.createdBy%]\"><strong class=\"fn author\">username</strong></a></span>\n                                    <em>\n                                        <abbr title=\"[%=get_time_ago(nn.createdAt)%]\" class=\"published updated timeago\">[%=nn.createdAt.toString()%]</abbr>\n                                    </em>\n                            </h3>\n                            <img alt=\"Mark Forster\" src=\"/profile/[%=nn.createdBy%]/avatar\" class=\"photo avatar hide\"/>\n                            <div style=\"background-image: url(/images/contacts/people_logo.jpg);\" class=\"indented\">\n                            <div class=\"entry-content\">\n                            <p>[%=parse_note_body(nn.body)%]</p></div>\n                            </div>\n                        </div>\n                        </dd>\n                        [%\n                        });\n                    }\n                });\n            }\n            %]\n        </div>\n\n    </div>\n\n\n\n\n    <div id=\"contact-tasks\" class=\"contact-tab-panel hide\">\n    <div id=\"id-add-task-container\" class=\"show-hide Pane\" rel=\"id-add-note-panel\">\n        <a class=\"more-show\" href=\"#\">Add a todo</a>\n        <div id=\"id-add-task-panel\" class=\"hide\">\n            <h2>Need to...</h2>\n            <form action=\"/api/task\" id=\"add-task-form\">\n                <span class=\"Field ClearedField\">\n                    <label class=\"hide\">Title</label>\n                    <input type=\"text\" id=\"add-task-title\" name=\"description\"/>\n                </span>\n\n                <span class=\"Field \">\n                    <label>Type</label>\n                    <select name=\"taskType\">\n                    [%\n                        $.each(tasktypes.taskType,function(o,p){\n                    %]\n                        <option value=\"[%=p.id%]\">[%=p.name%]</option>\n                    [%\n                        });\n                    %]\n                    </select>\n                </span>\n\n                <span class=\"Field\">\n                    <label>Assigned To</label>\n                    <select name=\"assignTo\">\n                    [%\n                        $.each(users.user,function(o,p){\n                    %]\n                        <option value=\"[%=p.id%]\">[%=p.firstName%] [%=p.lastName%]</option>\n                    [%\n                        });\n                    %]</select>\n                </span>\n\n                <span class=\"Field\">\n                    <label>Due</label>\n                    <input type=\"text\" name=\"due\"/>\n                </span>\n\n                <div class=\"Actions\">\n                    <ul>\n                        <li><input type=\"button\" value=\"Add todo\" id=\"add-task-action\"/></li>\n                        <li><a class=\"less-hide\" href=\"#\">Cancel</a></li>\n                    </ul>\n                </div>\n            </form>\n\n        </div>\n    </div>\n\n\n    </div>\n\n\n\n\n",
	"contacts/ContactsShowView":"\n\n\n\n\n\n\n\n\n\n<div class=\"contact-holder\">\n  <div class=\"contact-panel\">\n      <div class=\"gen-toolbar toolbar \">\n          <ul id=\"general_toolbar\">\n              <li><a title=\"Edit\" href=\"#\" id=\"link-contact-edit\">Edit</a></li>\n              <li><a title=\"Delete\" href=\"#\" id=\"link-contact-delete\">Delete</a></li>\n          </ul>\n          <ul id=\"edit_toolbar\" class=\"hide\">\n            <li><a title=\"Save changes\" href=\"#\" id=\"link-contact-confirm\">Done</a></li>\n            \n\n          </ul>\n      </div>\n      <div id=\"contact-information\" class=\"contact-tab-panel contact-metadata \">\n         \n      </div>\n  </div>\n\n  <div class=\"contact-information-pane\">\n      \n  </div>\n</div>\n\n",
	"contacts/ContactView":"<div class=\"contact-holder\" >\n  <div class=\"contact-card-panel\"></div>\n  <div class=\"contact-information-pane\" id=\"contact-NT\"></div>\n  <div id=\"\" class=\"contact-meta-pane\">\n\t\n  </div>\t\n\n</div>\n\n",
	"contacts/CSVImportView":"\n<div class=\"Pane\">\n    <h2 class=\"title\"><span>Import Contacts</span></h2>\n</div>\n",
	"contacts/delete_contacts":"<div class=\"Pane\">\n    <h2 class=\"title\"><span>Delete the selected contact(s)?</span></h2>\n    \n</div>\n",
	"types_dropdown":"\n\t<select name=\"[%=name%]\" class=\"[%=css%]\">\n\n    [%\n    $.each(types,function(i,n){\n    %]\n        <option [%=(type==n.id)?\'selected=\"\"\':\'\'%] rel=\"[%=n.id%]\" value=\"[%=i%]\">[%=n.value%]</option>\n\n    [%\n    });\n    %]\n\n    </select>\n",
	"enum_dropdown":"\n\t<select name=\"[%=name%]\" class=\"[%=css%]\">\n\n\n\t[%\n    $.each(types.enums,function(i,n){\n    %]\n        <option [%=(type==n)?\'selected=\"\"\':\'\'%] rel=\"[%=i%]\" value=\"[%=i%]\">[%=types.types[n].title%]</option>\n\n    [%\n    });\n    %]\n    \n    </select>\n",
	"company_field":"\n\t<span class=\"Field  company_field Cleared\">\n        <input type=\"text\" name=\"company\" value=\"[%=name%]\"/>\n        <a class=\"remove_action\" href=\"#remove\">[%=resource_string(\'action.contacts.index.edit.remove\')%]</a>\n    </span>\n",
	"email_field":"\n\t<span class=\"Field dualField email_field Cleared\">\n        <input type=\"text\" name=\"email\" value=\"[%=model.email%]\"/>\n\n        [%=render_partial(\'types_dropdown\',{name:\'type\',types:types,css:\'\',type:model.type.id})%]\n\n        <a class=\"remove_action\"  href=\"#remove\">[%=resource_string(\'action.contacts.index.edit.remove\')%]</a>\n    </span>\n",
	"telephone_field":"\n\t<span class=\"Field dualField phone_field Cleared\">\n        <input type=\"text\" value=\"[%=model.number%]\" name=\"number\"/>\n        [%=render_partial(\'types_dropdown\',{name:\'type\',types:types,css:\'\',type:model.type.id})%]\n        <a class=\"remove_action\"  href=\"#remove\">[%=resource_string(\'action.contacts.index.edit.remove\')%]</a>\n    </span>\n",
	"address_field":"\n\t<span class=\"Field address-field Cleared\">\n\n\n        <span>\n            <label>Street</label>\n            <input type=\"text\" value=\"[%=model.street%]\" name=\"street\"/>\n\n            <span class=\"dual\">\n                <label>City</label>\n                <input type=\"text\" value=\"[%=model.city%]\" name=\"city\"/>\n            </span>\n\n            <span class=\"dual\">\n                <label>State</label>\n                <input type=\"text\" value=\"[%=model.state%]\" name=\"state\"/>\n            </span>\n\n            <span class=\"dual\">\n                <label>Postcode</label\n                <input type=\"text\" value=\"[%=model.zip%]\" name=\"zip\"/>\n\n            </span>\n\n            <span class=\"dual\">\n                <label>Country</label\n                <input type=\"text\" value=\"[%=model.country%]\" name=\"country\"/>\n\n            </span>\n        </span>\n\n        [%=render_partial(\'types_dropdown\',{name:\'type\',types:types,css:\'address-type\',type:model.type.id})%]\n\n\n            <a class=\"remove_action\"  href=\"#remove\">[%=resource_string(\'action.contacts.index.edit.remove\')%]</a>\n    </span>\n",
	"website_field":"\n\t<span class=\"Field dualField website_field Cleared\">\n        <input type=\"text\" name=\"url\" value=\"[%=model.url%]\"/>\n        [%=render_partial(\'types_dropdown\',{name:\'type\',types:types,css:\'\',type:model.type.id})%]\n        <a class=\"remove_action\"  href=\"#remove\">[%=resource_string(\'action.contacts.index.edit.remove\')%]</a>\n    </span>\n",
	"instantmessengers_field":"\n\t<span class=\"Field dualField instantmessengers_field Cleared\">\n        <input type=\"text\" name=\"account\" value=\"[%=model.account%]\"/>\n        \n\t\t[%=render_partial(\'enum_dropdown\',{name:\'type\',types:types,css:\'\',type:model.product})%]\n        <a class=\"remove_action\"  href=\"#remove\">[%=resource_string(\'action.contacts.index.edit.remove\')%]</a>\n    </span>\n",
	"contacts/edit_contact":"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<div class=\"gen-toolbar toolbar \">\n\t\n    <ul id=\"edit_toolbar\">\n  \n\t<li><input id=\"link-contact-confirm\" type=\"submit\" value=\"[%=resource_string(\'action.contacts.index.done\')%]\"/></li>\n    </ul>\n<h2 style=\"background:none!important;color:#fff;\"><span>[%\n\tif(contact.id==null){\n\t\t%]New Contact[%\n\t} else { \n\t\t%]Editing <span class=\"contact-name\">[%=contact.firstName%]&nbsp;[%=contact.lastName%]</span>[% \n\t} \n\t%]</span></h2>\n</div>\n<div class=\" ScrollPane\">\n\n    <div class=\"\" id=\"contact-edit-form\">\n    <form action=\"${ctx}/snippets/contacts/${contact.id}\" method=\"post\">\n        <input type=\"hidden\" name=\"_method\" value=\"put\"/>\n        <div class=\"field-block\" style=\"border-top:none\">\n            <span class=\"Field Cleared\">\n                <label>[%=resource_string(\'label.contacts.index.edit.firstname\')%]</label>\n                <input type=\"text\" value=\"[%=contact.firstName%]\" name=\"firstName\"/>\n            </span>\n\n            <span class=\"Field Cleared\">\n                <label>[%=resource_string(\'label.contacts.index.edit.lastname\')%]</label>\n                <input type=\"text\" value=\"[%=contact.lastName%]\" name=\"lastName\"/>\n            </span>\n\n            <span class=\"Field Cleared\">\n                <label>[%=resource_string(\'label.contacts.index.edit.title\')%]</label>\n                <input type=\"text\" value=\"[%=contact.title%]\" name=\"title\"/>\n            </span>\n\n            <span class=\"Field Cleared MediumField\">\n                <label>[%=resource_string(\'label.contacts.index.edit.information\')%]</label>\n                <textarea name=\"info\">[%=contact.info%]</textarea>\n            </span>\n        </div>\n<hr/>\n        <div class=\"field-block\">\n            <h2><span>[%=resource_string(\'label.contacts.index.edit.company\')%]</span></h2>\n            <div class=\"fields-container\">\n            <div id=\"companies\">\n            [%\n              if(contact.companies!=null){\n                $.each(contact.companies.company,function(i,n){%]\n                  [%=render_partial(\'company_field\',n)%][%\n                });\n              }\n            %]\n            </div>\n            <span class=\"SingleAction\"><a id=\"add_company\" href=\"#\">[%=resource_string(\'action.contacts.index.edit.addcompany\')%]</a></span>\n            </div>\n        </div>\n<hr/>\n        <div class=\"field-block\">\n            <h2><span>[%=resource_string(\'label.contacts.index.edit.email\')%]</span></h2>\n            <div class=\"fields-container\">\n            <div class=\"\" id=\"email_addresses\">\n            [%\n\n\n              if(contact.emailAddresses!=null){\n                $.each(contact.emailAddresses.emailAddress,function(i,n){%]\n                  [%=render_partial(\'email_field\',{model:n,types:emailTypes.emailType})%]\n                [%\n                });\n              }\n            %]\n            </div>\n            <span class=\"SingleAction\"><a id=\"add_email_address\" href=\"#\">[%=resource_string(\'action.contacts.index.edit.addemail\')%]</a></span>\n            </div>\n        </div>\n<hr/>\n        <div class=\"field-block\">\n            <h2><span>[%=resource_string(\'label.contacts.index.edit.telephone\')%]</span></h2>\n        <div class=\"fields-container\">\n             <div id=\"telephone_numbers\">\n            [%\n              if(contact.phoneNumbers!=null){\n                $.each(contact.phoneNumbers.phoneNumber,function(i,n){%]\n                  [%=render_partial(\'telephone_field\',{model:n,types:emailTypes.emailType})%][%\n                });\n              }\n            %]\n            </div>\n            <span class=\"SingleAction\"><a id=\"add_telephone_number\" href=\"#\">[%=resource_string(\'action.contacts.index.edit.addphone\')%]</a></span>\n            </div>\n        </div>\n<hr/>\n\n        <div class=\"field-block\">\n            <h2><span>[%=resource_string(\'label.contacts.index.edit.address\')%]</span></h2>\n            <div class=\"fields-container\">\n            <div id=\"addresses\">\n            [%\n              if(contact.addresses!=null){\n                $.each(contact.addresses.address,function(i,n){%]\n                  [%=render_partial(\'address_field\',{model:n,types:addressTypes.addressType})%][%\n                });\n              }\n            %]\n            </div>\n            <span class=\"SingleAction\"><a id=\"add_address\" href=\"#\">[%=resource_string(\'action.contacts.index.edit.addaddress\')%]</a></span>\n            </div>\n        </div>\n<hr/>\n        <div class=\"field-block\">\n            <h2><span>[%=resource_string(\'label.contacts.index.edit.website\')%]</span></h2>\n            <div class=\"fields-container\" >\n            <div id=\"websites\">\n            [%\n              if(contact.websites!=null){\n                $.each(contact.websites.website,function(i,n){%]\n                  [%=render_partial(\'website_field\',{model:n,types:websiteTypes.websiteType})%][%\n                });\n              }\n            %]\n            </div>\n            <span class=\"SingleAction\"><a id=\"add_website\" href=\"#\">[%=resource_string(\'action.contacts.index.edit.addwebsite\')%]</a></span>\n            </div>\n        </div>\n\n\n\t\t<div class=\"field-block\">\n            <h2><span>[%=resource_string(\'label.contacts.index.details.messenger\')%]</span></h2>\n            <div class=\"fields-container\" >\n            <div id=\"instantmessengers\">\n            [%\n              if(contact.instantMessengers!=null){\n                $.each(contact.instantMessengers.instantMessenger,function(i,n){%]\n\n                  [%=render_partial(\'instantmessengers_field\',{model:n,types:imTypes})%][%\n                });\n              }\n            %]\n            </div>\n            <span class=\"SingleAction\"><a id=\"add_im\" href=\"#\">[%=resource_string(\'action.contacts.index.edit.addim\')%]</a></span>\n            </div>\n        </div>\n\n\n    </form>\n    </div>\n\n</div>\n",
	"contacts/export_contacts":"<div class=\"option\">\n  <h2>\n    <a href=\"#\" class=\"export_csv\">Export to Outlook format (Excel/CSV)</a>\n  </h2>\n  <p>\n    The Outlook CSV format allows you to import your contacts into Outlook, view them in Excel\n    or import your data into many popular databases and contact managers.\n  </p>\n</div>\n",
	"many_many_contacts":"\n\t<div class=\"contacts-fat-list\">\n        <ul>\n        [%\n            for(index=0;index<contacts.length;index++){\n                var _contact = contacts[index];\n                if (!_contact.tag) _contact.tag=[];\n                var _index=index;\n\n                with(_contact){\n\n                \n                %]\n                    <li class=\"contact-card\" rel=\"[%=id%]\" title=\"[%=firstName%] [%=lastName%]\">\n                        <dl >\n                            <dt><img class=\"photo\" alt=\"photo\" src=\"/api/contacts/[%=id%]/avatar\" style=\"float: left;width:4em;\"/></dt>\n                            <dd><strong class=\"contact_name\">[%=firstName%] [%=lastName%]</strong>&nbsp;</dd>\n                            <dd>[%=title%]&nbsp;</dd>\n                            [%\n                            if(phoneNumbers!=null){\n                            %]<dd>[%=phoneNumbers.phoneNumber[0].number%]&nbsp;</dd>[%\n                            }\n                            %]\n                            [%if(emailAddresses!=null){%]\n                            <dd><a href=\"mailto:[%=emailAddresses.emailAddress[0].email%]\">[%=emailAddresses.emailAddress[0].email%]</a></dd>\n                            [%}%]\n                            &nbsp;<dd class=\"many-tags\">\n                                [%=render_partial(\'many_contacts_tags\',{tag:tag,contact:_contact,index:_index})%]\n                            </dd>\n                        </dl>\n                    </li>\n                [% }\n             }\n            %]\n\n        </ul>\n    </div>\n",
	"many_contacts_tags":"\n\t<ul class=\"tags-list\">\n    [% for(i=0;i<tag.tag.length;i++){%]\n        <li class=\'tag\'><a href=\"[%=tag.tag[i].id%]\" rel=\"[%=index%]\" title=\" \'[%=tag.tag[i].label%]\'\">[%=tag.tag[i].label%]</a></li>\n    [%}%]\n   </ul>\n\n\n",
	"contacts/ManyContactsShowView":"\n\n\n<div class=\"contact-list-holder\">\n    <div class=\"gen-toolbar toolbar\">\n      <ul>\n        <li class=\"export-ui\">\n\t\t\t<a title=\"Export\" href=\"#\" id=\"link-contact-export\">Export</a>\n\t\t\t<span class=\"exporting-field hide\">\n\t\t\t\t<ul>\n\t\t\t\t\t<li><a id=\"download-as-csv\" href=\"/export?exportIds=[%=selected.toString()%]&format=csv\">CSV</a></li>\n\t\t\t\t\t<li><a id=\"cancel-export\" href=\"#cancel-export\">Cancel</a></li>\n\t\t\t\t</ul>\n\t        </span>\n\t\t</li>\n        <li class=\"tag-ui\">\n          <a title=\"Tag\" href=\"#\" id=\"link-contact-tag\">Tag</a>\n\t\t<span class=\"tagging-field hide\">\n          <ul>\n\t\t\t<li>\n            <input type=\"text\" id=\"multi-tag-field\"/></li>\n\t\t\t<li><a id=\"add-tag\" href=\"#\">Add</a></li>\n            <li><a id=\"cancel-tag\" href=\"#\">Cancel</a></li>\n          </ul>\n</span>\n        </li>\n        <li><a title=\"Delete\" href=\"#\" id=\"link-contact-delete\">Delete</a></li>\n        <li class=\"merge-ui\">\n          <a title=\"Merge\" href=\"#\" id=\"link-contact-merge\">Merge</a>\n          <span class=\"merging-confirm hide\">\n            <p class=\"merge-message\" style=\"float:left;margin:0;\">Select a destination contact</p>\n            <p class=\"merge-confirm-message\" style=\"float:left;margin:0;\">This will merge [NUM] contacts into [NAME]</p>\n            <input type=\"submit\" id=\"confirm-merge\" value=\"Confirm\"/>\n            <a id=\"cancel-merge\" href=\"#\">Cancel</a>\n          </span>\n        </li>\n      </ul>\n    </div>\n\n    [%=render_partial(\'many_many_contacts\',{contacts:contacts})%]\n\n</div>\n",
	"many_many_more_contacts":"\n\t<div class=\"scroll-pane contacts-fat-list\">\n        <div class=\"feedback notification\">\n\t\t\t[%=resource_string(\'feedback.contacts.index.manymorecontacts\',contacts.length)%]\n\t\t\t\n        </div>\n\n        <ol>\n            [%\n            for(index=0;index<contacts.length;index++){\n                var _contact = contacts[index];\n\n\n                with(_contact){\n                    %]\n                   <li class=\"contact-card\" rel=\"[%=id%]\"><img class=\"photo\" alt=\"photo\" src=\"/api/contacts/[%=id%]/avatar\" style=\"clear:both;height:1.5em;width:1.5em;\"/><span class=\"contact_name\">[%=firstName%]&nbsp;[%=lastName%]</span></li>\n                   [%\n                }\n            }\n            %]\n\n        </ol>\n\n    </div>\n",
	"contacts/ManyContactsShowViewSummary":"\n\n<div class=\"contact-list-holder\">\n    <div class=\"gen-toolbar toolbar\">\n      <ul>\n        <li class=\"export-ui\">\n\t\t\t<a title=\"Export\" href=\"#\" id=\"link-contact-export\">Export</a>\n\t\t\t<span class=\"exporting-field hide\">\n\t\t\t\t<ul>\n\t\t\t\t\t<li><a id=\"download-as-csv\" href=\"/export?exportIds=[%=selected.toString()%]&format=csv\">CSV</a></li>\n\t\t\t\t\t<li><a id=\"cancel-export\" href=\"#cancel-export\">Cancel</a></li>\n\t\t\t\t</ul>\n\t        </span>\n\t\t</li>\n        <li class=\"tag-ui\">\n          <a title=\"Tag\" href=\"#\" id=\"link-contact-tag\">Tag</a>\n\t\t<span class=\"tagging-field hide\">\n          <ul>\n\t\t\t<li>\n            <input type=\"text\" id=\"multi-tag-field\"/></li>\n\t\t\t<li><a id=\"add-tag\" href=\"#\">Add</a></li>\n            <li><a id=\"cancel-tag\" href=\"#\">Cancel</a></li>\n          </ul>\n</span>\n        </li>\n        <li><a title=\"Delete\" href=\"#\" id=\"link-contact-delete\">Delete</a></li>\n        <li class=\"merge-ui\">\n          <a title=\"Merge\" href=\"#\" id=\"link-contact-merge\">Merge</a>\n          <span class=\"merging-confirm hide\">\n            <p class=\"merge-message\" style=\"float:left;\">Select a destination contact</p>\n            <p class=\"merge-confirm-message\" style=\"float:left;margin:0;\">This will merge [NUM] contacts into [NAME]</p>\n            <input type=\"submit\" id=\"confirm-merge\" value=\"Confirm\"/>\n            <a id=\"cancel-merge\" href=\"#\">Cancel</a>\n          </span>\n        </li>\n      </ul>\n    </div>\n\n    [%=render_partial(\'many_many_more_contacts\',{contacts:contacts})%]\n\n</div>\n\n\n    \n",
	"many_many_many_more_contacts":"\n\t<div class=\"scroll-pane contacts-fat-list\">\n        <div class=\"feedback notification\">\n\t\t\t[%=resource_string(\'feedback.contacts.index.manymorecontacts\',contacts.length)%]\n\t\t\t\n        </div>\n    </div>\n",
	"contacts/ManyManyContactsShowViewSummary":"\n\n<div class=\"contact-list-holder\">\n    <div class=\"gen-toolbar toolbar\">\n      <ul>\n        <li class=\"export-ui\">\n\t\t\t<a title=\"Export\" href=\"#\" id=\"link-contact-export\">Export</a>\n\t\t\t<span class=\"exporting-field hide\">\n\t\t\t\t<ul>\n\t\t\t\t\t<li><a id=\"download-as-csv\" href=\"/export?exportIds=[%=selected.toString()%]&format=csv\">CSV</a></li>\n\t\t\t\t\t<li><a id=\"cancel-export\" href=\"#cancel-export\">Cancel</a></li>\n\t\t\t\t</ul>\n\t        </span>\n\t\t</li>\n        \n        <li><a title=\"Delete\" href=\"#\" id=\"link-contact-delete\">Delete</a></li>\n        \n      </ul>\n    </div>\n\n    [%=render_partial(\'many_many_many_more_contacts\',{contacts:contacts})%]\n\n</div>\n\n\n    \n",
	"contacts/NoContactsListView":"<div class=\"feedback\">\n    [%=resource_string(\'message.contacts.index.nocontacts\')%]\n</div>\n",
	"contacts/NoContactsShowView":"<div class=\"feedback notification\">\n[%=resource_string(\'feedback.contacts.index.chooseacontact\')%]\n</div>\n",
	"deals/deals-edit-it":"[%\n /* If the deal has no ID then it is new */\n%]\n<div class=\"deals-holder\" style=\"display: block;\">\n\t<div class=\"deals-card-panel\">\n\t\t<div class=\"gen-toolbar toolbar\">\n\t\t\t<ul id=\"general_toolbar\">\n\t\t\t\t<li>\n\t\t\t\t\t<input id=\"save-deal-action\" type=\"submit\" value=\"save\"/>\n\t\t\t\t</li>\n\t\t\t\t<li><span>or</span></li>\n\t\t\t\t<li>\n\t\t\t\t\t<a id=\"link-deal-cancel\" href=\"#\" title=\"Delete\" name=\"link-deal-cancel\">cancel</a>\n\t\t\t\t</li>\n\t\t\t\t<li class=\"the-progress-indicator \">\n\t\t\t\t\t<span>Saving...</span><span class=\"ajaxLoading\">&nbsp;</span>\n\t\t\t\t</li>\n\t\t\t</ul><span class=\"contact-name\">[%\n\t\t\tif(deal.id==null){\n\t\t\t\t%]Create your new deal...[%\n\t\t\t}else{\n\t\t\t\t%]Editing \"[%=deal.name%]\"[%\n\t\t\t}\n\t\t\t%]</span>\n\t\t</div>\n\t</div>\n\t<div id=\"deals-NT\" class=\"deals-inedit-pane\">\n\t\t<div class=\"\" id=\"contact-edit-form\">\n\t    <form action=\"${ctx}/snippets/contacts/${contact.id}\" method=\"post\">\n\t        <input type=\"hidden\" name=\"_method\" value=\"put\"/>\n\t        <div class=\"field-block\" style=\"border-top:none\">\n\t            <span class=\"Field MediumField Cleared\">\n\t                <label>Name of Deal</label>\n\t                <input maxlength=\"50\" type=\"text\" value=\"[%=deal.name%]\" name=\"name\"/>\n\t            </span>\n\n\t            <span class=\"Field Cleared MediumField\">\n\t                <label>Description of Deal</label>\n\t                <textarea name=\"description\">[%=deal.description%]</textarea>\n\t            </span>\n\t\t\t\t\n\t\t\t\t<span class=\"Field Cleared\">\n\t\t\t\t\t<label>Assigned To</label>\n\t\t\t\t\t<select name=\"assignedTo\">\n\t\t\t\t\t\t[%\t\t\t\t\t    \n\t\t\t\t\t\t\t$.each(users,function(uindex,user){\n\t\t\t\t\t\t\t\tif(user.enabled==\'true\'){\n\t\t\t\t\t\t%]\n\t\t\t\t\t\t\t<option value=\"[%=user.id%]\" [%if(deal.assignedTo==user.id){%]SELECTED[%}%]>[%=user_fullname(user)%]</option>\n\t\t\t\t\t\t[%\t\n\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t%]\t\n\t\t\t\t\t</select>\n\t\t\t\t\t\n\t\t\t\t\t<input type=\"hidden\" name=\"assigendToVisual\" value=\"Mark Forster\"/>\n\t\t\t\t\t<input type=\"hidden\" name=\"_assigendTo\" value=\"\"/>\n\t\t\t\t</span>\n\t        </div>\n\t\t\t<hr/>\n\t\t\t<div>\n\t\t\t\t<span class=\"Field Cleared Currency\">\n\t                <label>Value of this Deal</label>\n\t\t\t\t\t<input type=\"text\" value=\"[%=deal.amount%]\" name=\"amount\"/>\n\t            </span>\n\t\t\t\t<span class=\"Field Cleared MediumField Slider\">\n\t\t\t\t\t<label>Probability</label>\n\t\t\t\t\t<input type=\"hidden\" name=\"probability\" value=\"[%=deal.probability%]\"/>\n\t\t\t\t\t<span class=\"field-wrapper\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t<div id=\"slider-range-min\" rel=\"[%=deal.probability%]\"></div>\n\t\t\t\t\t\t<span class=\"inner-label\">[%=deal.probability%]%</span>\n\t\t\t\t\t</span>\n\t            </span>\n\t             <span class=\"Field Cleared\">\n                            <label>Expected Close Date</label>\n                            <input type=\"text\" name=\"expectedClose\" value=\"[%=format_expectedClose(deal.expectedClose)%]\"/>\n                </span>\n\t\t\t</div>\n\t\t</form>\n\t\t\n\t</div>\n\t\n</div>\n",
	"deals/deals-edit-it.orig":"[%\n /* If the deal has no ID then it is new */\n%]\n<div class=\"deals-holder\" style=\"display: block;\">\n\t<div class=\"deals-card-panel\">\n\t\t<div class=\"gen-toolbar toolbar\">\n\t\t\t<ul id=\"general_toolbar\">\n\t\t\t\t<li>\n\t\t\t\t\t<input id=\"save-deal-action\" type=\"submit\" value=\"save\"/>\n\t\t\t\t</li>\n\t\t\t\t<li><span>or</span></li>\n\t\t\t\t<li>\n\t\t\t\t\t<a id=\"link-deal-cancel\" href=\"#\" title=\"Delete\" name=\"link-deal-cancel\">cancel</a>\n\t\t\t\t</li>\n\t\t\t\t\n\t\t\t</ul><span class=\"contact-name\">[%\n\t\t\tif(deal.id==null){\n\t\t\t\t%]Create your new deal...[%\n\t\t\t}else{\n\t\t\t\t%]Editing \"[%=deal.name%]\"[%\n\t\t\t}\n\t\t\t%]</span>\n\t\t</div>\n\t</div>\n\t<div id=\"deals-NT\" class=\"deals-inedit-pane\">\n\t\t<div class=\"\" id=\"contact-edit-form\">\n\t    <form action=\"${ctx}/snippets/contacts/${contact.id}\" method=\"post\">\n\t        <input type=\"hidden\" name=\"_method\" value=\"put\"/>\n\t        <div class=\"field-block\" style=\"border-top:none\">\n\t            <span class=\"Field MediumField Cleared\">\n\t                <label>Name of Deal</label>\n\t                <input maxlength=\"50\" type=\"text\" value=\"[%=deal.name%]\" name=\"name\"/>\n\t            </span>\n\n\t            <span class=\"Field Cleared MediumField\">\n\t                <label>Description of Deal</label>\n\t                <textarea name=\"description\">[%=deal.description%]</textarea>\n\t            </span>\n\t\t\t\t\n\t\t\t\t<span class=\"Field Cleared\">\n\t\t\t\t\t<label>Assigned To</label>\n\t\t\t\t\t<select name=\"assignedTo\">\n\t\t\t\t\t\t[%\t\t\t\t\t    \n\t\t\t\t\t\t\t$.each(users,function(uindex,user){\n\t\t\t\t\t\t%]\n\t\t\t\t\t\t\t<option value=\"[%=user.id%]\" [%if(deal.assignedTo==user.id){%]SELECTED[%}%]>[%=user_fullname(user)%]</option>\n\t\t\t\t\t\t[%\t\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t%]\t\n\t\t\t\t</select>\n\t\t\t\t\t\n\t\t\t\t\t<input type=\"hidden\" name=\"assigendToVisual\" value=\"Mark Forster\"/>\n\t\t\t\t\t<input type=\"hidden\" name=\"_assigendTo\" value=\"\"/>\n\t\t\t\t</span>\n\t        </div>\n\t\t\t<hr/>\n\t\t\t<div>\n\t\t\t\t<span class=\"Field Cleared Currency\">\n\t                <label>Value of this Deal</label>\n\t\t\t\t\t<input type=\"text\" value=\"[%=deal.amount%]\" name=\"amount\"/>\n\t            </span>\n\t\t\t\t<span class=\"Field Cleared MediumField Slider\">\n\t\t\t\t\t<label>Probability</label>\n\t\t\t\t\t<input type=\"hidden\" name=\"probability\" value=\"[%=deal.probability%]\"/>\n\t\t\t\t\t<span class=\"field-wrapper\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t<div id=\"slider-range-min\" rel=\"[%=deal.probability%]\"></div>\n\t\t\t\t\t\t<span class=\"inner-label\">[%=deal.probability%]%</span>\n\t\t\t\t\t</span>\n\t            </span>\n\t            <span class=\"Field Cleared\">\n                            <label>Expected Close Date</label>\n                            <input type=\"text\" name=\"expectedClose\" value=\"[%=format_expectedClose(deal.expectedClose)%]\"/>\n                </span>\n\t\t\t</div>\n\t\t</form>\n\t\t\n\t</div>\n\t\n</div>\n",
	"contact_involved_qtip":"\n\t<div class=\"qtip_panel\">\n\t\t\n\t\t<dl>\n\t\t\t[%\n\t\t\tif(contact.phoneNumbers!=null && contact.phoneNumbers.phoneNumber!=null){\n\t\t\t\t%]<dt>Telephone</dt><dd><a href=\"callto://[%=contact.phoneNumbers.phoneNumber[0].number%]\">[%=contact.phoneNumbers.phoneNumber[0].number%]</a></dd>[%\n\t\t\t}\n\t\t\t%]\n\t\t\t\n\t\t\t[%\n\t\t\tif(contact.emailAddresses!=null && contact.emailAddresses.emailAddress!=null){\n\t\t\t\t%]<dt>Email</dt><dd><a href=\"mailto:[%=contact.emailAddresses.emailAddress[0].email%]\">[%=contact.emailAddresses.emailAddress[0].email%]</a></dd>[%\n\t\t\t}\n\t\t\t%]\n\t\t</dl>\n\t</div>\n",
	"user_involved_qtip":"\n\t<div class=\"qtip_panel\">\n\t\t<dl>\n\t\t\t\n\t\t\n\t\t\t[%\n\t\t\tif(user.email!=\'\'){\n\t\t\t\t%]<dt>Email</dt><dd><a href=\"mailto:[%=user.email%]\">[%=user.email%]</a></dd>[%\n\t\t\t}\n\t\t\t%]\n\t\t\n\t\t\t[%\n\t\t\tif(user.phoneNumber!=null && user.phoneNumber.length!=0){\n\t\t\t\tif(user.phoneNumber[0]!=\'\'){\n\t\t\t\t%]<dt>Telephone</dt><dd><a href=\"callto://[%=user.phoneNumber[0]%]\">[%=user.phoneNumber[0]%]</a></dd>[%\n\t\t\t\t}\n\t\t\t}\n\t\t\t%]\n\t\t\t\n\t\t</dl>\n\t</div>\n",
	"deal_task":"\n\t[%\n        var usr=get_user(task.assignedTo);\n    %]\n    <dd class=\"task\" rel=\"[%=task.id%]\">\n        <dl>\n            <dd class=\"check-mark\"><input type=\"checkbox\" class=\"task-checkbox\" [%=(task.complete==\'true\')?\'checked=\\\'checked\\\'\':\'\'%] value=\"16\"/></dd>\n            <dd class=\"left-item-panel\"><strong class=\"assignee\">[%=user_fullname(usr)%]</strong>&nbsp;-&nbsp;[%=task.title%]</dd>\n            <dd class=\"right-item-panel\"><strong class=\"type\">[%=lookup_task_type(task_types,task.type).name%]</strong>&nbsp;-&nbsp;<strong class=\"due-date\"><abbr class=\"timeago\" title=\"[%=task.dueOn%]\"></abbr></strong></dd>\n        </dl>\n    </dd>\n",
	"contact_involved":"\n\t<dd class=\"\" letter=\"\" rel=\"[%=contact.id%]\">\n\t\t<img src=\"/api/contacts/[%=contact.id%]/avatar\"/><a href=\"/contacts/#[%=contact.id%]\" rel=\"2\" style=\"\">[%=contact_fullname(contact)%]</a>\n\t</dd>\n\t",
	"user_involved":"\n\t<dd class=\"\" letter=\"\" rel=\"[%=user.id%]\">\n\t\t<img src=\"/api/users/[%=user.id%]/avatar\"/><a href=\"/profile/[%=user.id%]\" rel=\"2\" style=\"\">[%=user_fullname(user)%]</a>\n\t</dd>\n\t",
	"deal_task_holder":"\n\t<dl class=\"task-list tasks-overdue hide\">\n\t\t<dt class=\"task-group\">\n\t\t\tOverdue\n\t\t</dt>\n\t</dl>\n\t<dl class=\"task-list tasks-due-today hide\">\n\t\t<dt class=\"task-group\">\n\t\t\tToday\n\t\t</dt>\n\t</dl>\n\t<dl class=\"task-list tasks-due-tomorrow hide\">\n\t\t<dt class=\"task-group\">\n\t\t\tTomorrow\n\t\t</dt>\n\t</dl>\n\t<dl class=\"task-list tasks-due-this-year hide\">\n\t\t<dt class=\"task-group\">\n\t\t\tFuture\n\t\t</dt>\n\t</dl>\n\t<dl class=\"task-list complete-tasks hide\">\n\t\t<dt class=\"task-group\">\n\t\t\tComplete\n\t\t</dt>\n\t</dl>\n\t<div class=\"Actions\" style=\"display: none;\">\n\t\t<ul>\n\t\t\t<li>\n\t\t\t\t<a href=\"#\" id=\"show_me_more_notes\" name=\"show_me_more_notes\">Show me 10 more</a>\n\t\t\t</li>\n\t\t</ul>\n\t</div>\n\t\n",
	"deal_note_holder":"\n\t<dl class=\"note-list notes-left-today hide\">\n\t\t<dt class=\"note-group\">Left Today</dt>\n\t</dl>\n\t\n\t<dl class=\"note-list notes-left-yesterday hide\">\n\t\t<dt class=\"note-group\">Left Yesterday</dt>\n\t</dl>\n\t\n\t<dl class=\"note-list notes-left-recently hide\">\n\t\t<dt class=\"note-group\">Left Recently</dt>\n\t</dl>\n\t\n",
	"deal_note":"\n\t<dd rel=\"[%=note.id%]\">\n<dl>\n    [%\n    var user = get_user(note.createdBy);\n    %]\n    <dd class=\"note-meta\">\n        <span class=\"\">\n            <a href=\"/profile/[%=user.id%]\">[%=user_fullname(user)%]</a>\n        </span>\n        <em>\n            <abbr class=\"published updated timeago\" title=\"[%=note.createdAt%]\">[%=note.createdAt%]</abbr>\n        </em>\n    </dd>\n    <dd class=\"note-actions \">\n        <ul>\n        <li id=\"edit-action\"><a href=\"\" >[%=resource_string(\'action.contacts.index.edit\')%]</a></li>\n        <li id=\"delete-action\"><a href=\"\">[%=resource_string(\'action.contacts.index.delete\')%]</a></li>\n        <li id=\"confirm-action\"><a href=\"\" >[%=resource_string(\'action.contacts.index.done\')%]</a></li>\n        <li id=\"cancel-action\"><a href=\"\">[%=resource_string(\'action.contacts.index.cancel\')%]</a></li>\n        </ul>\n    </dd>\n    <dd class=\"note-info\">\n        <img alt=\"\" src=\"/api/users/[%=user.id%]/avatar\" class=\"photo avatar _hide\"/>\n    </dd>\n    <dd class=\"note-body\" id=\"view-box\">\n        <div id=\"note-body-box\">[%=parse_note_body(note.body)%]</div>\n        [% if(note.contact != undefined) { \n        \tvar note_contact = get_deal_contact(note.contact);\n        %]\n        \t<p><span class=\"relates-to-contact\">Contact</span> <a href=\"/contacts/#[%=note_contact.id%]\" rel=\"[%=note_contact.id%]\" style=\"\">[%=contact_fullname(note_contact)%]</a>\n        [% } %]\n    </dd>\n\n    <dd class=\"note-body\" id=\"edit-box\">\n        <span class=\"Field\"><textarea>[%=parse_note_body(note.body)%]</textarea></span>\n    </dd>\n\t<dd style=\"clear:both!important;\"></dd>\n</dl>\n</dd>\n\n",
	"deals/deals-edit":"\n\n\n\n\n\n\t\n\n\n\n\n\n\n\n<div class=\"deals-holder\" style=\"display: block;\">\n\t<div class=\"deals-card-panel\">\n\t\t<div class=\"gen-toolbar toolbar\">\n\t\t\t<ul id=\"general_toolbar\">\n\t\t\t\t<li>\n\t\t\t\t\t<a id=\"link-deal-edit\" href=\"#\" title=\"Edit\" name=\"link-deal-edit\">Edit</a>\n\t\t\t\t\t\n\t\t\t\t</li>\n\t\t\t\t\n\t\t\t\t\n\t\t\t</ul><span class=\"contact-name\">[%=deals[deal].name%]</span>\n\t\t</div>\n\t\t<div class=\"deals-info-header\">\n\t\t\t<p>Created <strong class=\"due-date\"><abbr class=\"timeago\" title=\"[%=deals[deal].createdAt%]\">[%=format_created_date(deals[deal].createdAt)%]</abbr></strong> by [%=user_fullname(users[deals[deal].createdBy])%] and assigned to [%=user_fullname(users[deals[deal].assignedTo])%]<span>[%=format_currency(deals[deal].amount)%]</span></p>\n\t\t</div>\n\t\t\n\t</div>\n\n\n\t<div id=\"deals-NT\" class=\"deals-information-pane\">\n\t\t<div class=\"Tabs\">\n\t\t\t<ul>\n\t\t\t\t<li>\n\t\t\t\t\t<a href=\"#deals-overview\">Overview</a>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<a href=\"#deals-notes\">Notes</a>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<a href=\"#deals-tasks\">Tasks</a>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</div>\n\t\t\n\t\n\t\t<div class=\"contact-information contact-tab-panel\" id=\"contact-detail\" style=\"display: block;\">\n\t\t\t\t<dl class=\"note-list notes-left-today\">\n\t\t\t\t\t[%\n\t\t\t\t\tif(is_in_progress(deals[deal])){\n\t\t\t\t\t%]\n\t\t\t\t\t<dt>Forecasts</dt>\n\t\t\t\t\t<dd>There is currently a <strong>[%=deals[deal].probability%]%</strong> probability of securing this deal.</dd>\n\t\t\t\t\t\t[%\n\t\t\t\t\t\tif(deals[deal].expectedClose != undefined){\n\t\t\t\t\t\t%]\n\t\t\t\t\t\t<dd>This deal is expected to be closed by <strong>[%=format_expectedClose(deals[deal].expectedClose)%]</strong>.</dd>\n\t\t\t\t\t\t[%\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t%]\n\t\t\t\t\t\t<dd>This deal doesn\'t have an expected close date.</dd>\n\t\t\t\t\t\t[%\n\t\t\t\t\t\t}\n\t\t\t\t\t\t%]\n\t\t\t\t\t[%\n\t\t\t\t\t}\n\t\t\t\t\t%]\n\t\t\t\t\t<dt>Description</dt>\n\t\t\t\t\t<dd>[%=format_description(deals[deal])%]</dd>\n\t\t\t\t</dl>\n\t\t\t\t\t\n\t\t</div>\n\t\t\n\t\t<div class=\"contact-tab-panel\" id=\"contact-notes\" style=\"display: none;\">\n\t\t\t[%\n\t\t\t\tif(is_in_progress(deals[deal])){\n\t\t\t%]\n\t\t\t<div rel=\"id-add-note-panel\" class=\"show-hide\" id=\"id-add-note-container\">\n\t\t\t\t<div class=\"_hide\" id=\"id-add-note-panel\">\n\t\t\t\t\t<h2 class=\"title hide\">\n\t\t\t\t\t\t<span>Add Note</span>\n\t\t\t\t\t</h2>\n\t\t\t\t\t<form id=\"add-note-form\" action=\"/api/notes\" name=\"add-note-form\">\n\t\t\t\t\t\t<span class=\"Field ClearedField\"><textarea class=\"expanding\" id=\"add-note-body\"></textarea></span>\n\t\t\t\t\t\t<span class=\"Field ClearedField\" id=\"note-deal-field\">\n\t\t\t\t\t\t\t<label for=\"note-deal\">Associate with a contact?</label>\n\t                        <select id=\"add-note-contact\" name=\"add-note-deal\">\n\t\t\t\t\t\t\t\t<option value=\"\">Do not associate</option>\n\t\t\t\t\t\t\t\t[%\n\t\t\t\t\t\t\t\tvar _current_letter=\'_\';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$.each(_sorted_indeces,function(i,m){\n\t\t\t\t\t\t\t\t\tn = all_contacts[m.id];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(n.lastName.length > 0) {\n\t\t\t\t\t\t                var _this_letter=n.lastName.substring(0,1).toUpperCase();\n\t\t\t\t\t\t            } else {\n\t\t\t\t\t\t                var _this_letter=n.firstName.substring(0,1).toUpperCase();\n\t\t\t\t\t\t            }\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(_this_letter!=\'\' && _current_letter!=_this_letter){\n\t\t\t\t\t\t            %]\n\t\t\t\t\t\t\t\t\t\t<optgroup style=\"text-align:right;\" rel=\"[%=_this_letter%]\" label=\"[%=_this_letter%]&nbsp;\">\n\t\t\t\t\t\t            [%\n\t\t\t\t\t\t            }\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t%]<option style=\"text-align:left;\" value=\"[%=n.id%]\">[%=contact_fullname(n)%]</option>[%\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(_this_letter!=\'\' && _current_letter!=_this_letter){\n\t\t\t\t\t\t                _current_letter=_this_letter;\n\t\t\t\t\t\t            }\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t%]\n\t\t\t\t\t\t\t</select>\n\t                    </span>\n\t\t\t\t\t\t<div class=\"Actions\">\n\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t<input type=\"button\" id=\"add-note-action\" value=\"Add Note\">\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t[%\n\t\t\t\t}\n\t\t\t%]\n\t\t\t<div id=\"deal-notes-list\" class=\"\">\n\t\t\t\t<p>NOTES GO HERE</p>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"contact-tab-panel\" id=\"contact-tasks\" style=\"\">\n\t\t\t[%\n\t\t\t\tif(is_in_progress(deals[deal])){\n\t\t\t%]\n\t\t\t<div rel=\"id-add-note-panel\" class=\"show-hide\" id=\"id-add-task-container\">\n\t\t\t\t<div class=\"\" id=\"id-add-task-panel\">\n\t\t\t\t\t<form id=\"add-task-form\" action=\"/api/task\" name=\"add-task-form\">\n\t\t\t\t\t\t<span class=\"Field ClearedField\"><input type=\"text\" name=\"description\" id=\"add-task-title\"></span>\n\t\t\t\t\t\t<fieldset style=\"clear: both;\">\n\t\t\t\t\t\t\t<span class=\"Field\"><label>Type</label> <select name=\"taskType\">\n\t\t\t\t\t\t\t\t[% \t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$.each(task_types,function(i,n){\n\t\t\t\t\t\t\t\t\t%]\n\t\t\t\t\t\t\t\t\t<option value=\"[%=n.id%]\">\n\t\t\t\t\t\t\t\t\t\t[%=n.name%]\n\t\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t\t[%\n\t\t\t\t\t\t\t\t}); \n\t\t\t\t\t\t\t\t%]\n\t\t\t\t\t\t\t</select></span> <span class=\"Field\"><label>Assigned To</label> <select name=\"assignTo\">\n\t\t\t\t\t\t\t[%\n                                $.each(users,function(o,p){\n\tif(p.enabled==\'true\'){\n                            %]\n                                <option value=\"[%=p.id%]\">[%=user_fullname(p)%]</option>\n                            [%\n}\n                                });\n                            %]\n\t\t\t\t\t\t\t</select></span> \n\t\t\t\t\t\t\t<span class=\"Field\">\n                                <label>Due</label>\n                                <input type=\"text\" name=\"due\"/>\n                            </span>\n\t\t\t\t\t\t\t<span class=\"Field ClearedField\" id=\"note-deal-field\">\n\t\t\t\t\t\t\t\t<label for=\"note-deal\">Associate with a contact?</label>\n\t\t                        <select id=\"add-task-contact\" name=\"add-note-deal\">\n\t\t\t\t\t\t\t\t\t<option value=\"\">Do not associate</option>\n\t\t\t\t\t\t\t\t\t[%\n\t\t\t\t\t\t\t\t\tvar _current_letter=\'_\';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$.each(_sorted_indeces,function(i,m){\n\t\t\t\t\t\t\t\t\t\tn = all_contacts[m.id];\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif(n.lastName.length > 0) {\n\t\t\t\t\t\t\t                var _this_letter=n.lastName.substring(0,1).toUpperCase();\n\t\t\t\t\t\t\t            } else {\n\t\t\t\t\t\t\t                var _this_letter=n.firstName.substring(0,1).toUpperCase();\n\t\t\t\t\t\t\t            }\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif(_this_letter!=\'\' && _current_letter!=_this_letter){\n\t\t\t\t\t\t\t            %]\n\t\t\t\t\t\t\t\t\t\t\t<optgroup style=\"text-align:right;\" rel=\"[%=_this_letter%]\" label=\"[%=_this_letter%]&nbsp;\">\n\t\t\t\t\t\t\t            [%\n\t\t\t\t\t\t\t            }\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t%]<option style=\"text-align:left;\" value=\"[%=n.id%]\">[%=contact_fullname(n)%]</option>[%\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif(_this_letter!=\'\' && _current_letter!=_this_letter){\n\t\t\t\t\t\t\t                _current_letter=_this_letter;\n\t\t\t\t\t\t\t            }\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t%]\n\t\t\t\t\t\t\t\t</select>\n\t\t                    </span>\n\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t\t<div class=\"Actions\">\n\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t<input type=\"button\" id=\"add-task-action\" value=\"Add Task\">\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t[%\n\t\t\t\t}\n\t\t\t%]\n\t\t\t<div id=\"deal-tasks-list\">\n\t\t\t\t<p>THE TASKS GO HERE</p>\n\t\t\t</div>\n\t\t</div>\n\t\t\n\t</div>\n\t<div id=\"\" class=\"deals-meta-pane\">\n\t\t<h2>Status</h2>\n\t\t[%\n\t\tvar stat=status_map(deal,deals);\n\t\t%]\n\t\t<ul class=\"status\">\n\t\t\t<li class=\"[%=stat[0]%]\"><a title=\"Mark deal as in progress\" id=\"inprogress\" href=\"#\">In Progress</a></li>\n\t\t\t<li class=\"[%=stat[1]%]\"><a title=\"Mark deal as won\" id=\"won\" href=\"#\">Won</a></li>\n\t\t\t<li class=\"[%=stat[2]%] last\"><a title=\"Mark deal as lost\" id=\"lost\"href=\"#\">Lost</a></li>\n\t\t</ul>\n\t\t\n\t\t\n\t\t<dl id=\"deals-involved-list\">\n\t\t\t<dt style=\"\" id=\"contacts-involved\" rel=\"Contacts\">Contacts</dt>\n\t\t\t<dt style=\"\" id=\"users-involved\" rel=\"Users\">Users</dt>\n\t\t</dl>\n\t</div>\t\n\t\n</div>\n",
	"deal_task":"\n\t[%\n        var usr=get_user(task.assignedTo);\n    %]\n    <dd class=\"task\" rel=\"[%=task.id%]\">\n        <dl>\n            <dd class=\"check-mark\"><input type=\"checkbox\" class=\"task-checkbox\" [%=(task.complete==\'true\')?\'checked=\\\'checked\\\'\':\'\'%] value=\"16\"/></dd>\n            <dd class=\"left-item-panel\"><strong class=\"assignee\">[%=user_fullname(usr)%]</strong>&nbsp;-&nbsp;[%=task.title%]</dd>\n            <dd class=\"right-item-panel\"><strong class=\"type\">[%=lookup_task_type(task_types,task.type).name%]</strong>&nbsp;-&nbsp;<strong class=\"due-date\"><abbr class=\"timeago\" title=\"[%=task.dueOn%]\"></abbr></strong></dd>\n        </dl>\n    </dd>\n",
	"contact_involved":"\n\t<dd class=\"\" letter=\"\" rel=\"[%=contact.id%]\">\n\t\t<img src=\"/api/contacts/[%=contact.id%]/avatar\"/><a href=\"/contacts/#[%=contact.id%]\" rel=\"2\" style=\"\">[%=contact_fullname(contact)%]</a>\n\t</dd>\n\t",
	"user_involved":"\n\t<dd class=\"\" letter=\"\" rel=\"[%=user.id%]\">\n\t\t<img src=\"/api/users/[%=user.id%]/avatar\"/><a href=\"/profile/[%=user.id%]\" rel=\"2\" style=\"\">[%=user_fullname(user)%]</a>\n\t</dd>\n\t",
	"deal_task_holder":"\n\t<dl class=\"task-list tasks-overdue hide\">\n\t\t<dt class=\"task-group\">\n\t\t\tOverdue\n\t\t</dt>\n\t</dl>\n\t<dl class=\"task-list tasks-due-today hide\">\n\t\t<dt class=\"task-group\">\n\t\t\tToday\n\t\t</dt>\n\t</dl>\n\t<dl class=\"task-list tasks-due-tomorrow hide\">\n\t\t<dt class=\"task-group\">\n\t\t\tTomorrow\n\t\t</dt>\n\t</dl>\n\t<dl class=\"task-list tasks-due-this-year hide\">\n\t\t<dt class=\"task-group\">\n\t\t\tFuture\n\t\t</dt>\n\t</dl>\n\t<dl class=\"task-list complete-tasks hide\">\n\t\t<dt class=\"task-group\">\n\t\t\tComplete\n\t\t</dt>\n\t</dl>\n\t<div class=\"Actions\" style=\"display: none;\">\n\t\t<ul>\n\t\t\t<li>\n\t\t\t\t<a href=\"#\" id=\"show_me_more_notes\" name=\"show_me_more_notes\">Show me 10 more</a>\n\t\t\t</li>\n\t\t</ul>\n\t</div>\n\t\n",
	"deal_note_holder":"\n\t<dl class=\"note-list notes-left-today hide\">\n\t\t<dt class=\"note-group\">Left Today</dt>\n\t</dl>\n\t\n\t<dl class=\"note-list notes-left-yesterday hide\">\n\t\t<dt class=\"note-group\">Left Yesterday</dt>\n\t</dl>\n\t\n\t<dl class=\"note-list notes-left-recently hide\">\n\t\t<dt class=\"note-group\">Left Recently</dt>\n\t</dl>\n\t\n",
	"deal_note":"\n\t<dd rel=\"[%=note.id%]\">\n<dl>\n    [%\n    var user = get_user(note.createdBy);\n    %]\n    <dd class=\"note-meta\">\n        <span class=\"\">\n            <a href=\"/profile/[%=user.id%]\">[%=user_fullname(user)%]</a>\n        </span>\n        <em>\n            <abbr class=\"published updated timeago\" title=\"[%=note.createdAt%]\">[%=note.createdAt%]</abbr>\n        </em>\n    </dd>\n    <dd class=\"note-actions \">\n        <ul>\n        <li id=\"edit-action\"><a href=\"\" >[%=resource_string(\'action.contacts.index.edit\')%]</a></li>\n        <li id=\"delete-action\"><a href=\"\">[%=resource_string(\'action.contacts.index.delete\')%]</a></li>\n        <li id=\"confirm-action\"><a href=\"\" >[%=resource_string(\'action.contacts.index.done\')%]</a></li>\n        <li id=\"cancel-action\"><a href=\"\">[%=resource_string(\'action.contacts.index.cancel\')%]</a></li>\n        </ul>\n    </dd>\n    <dd class=\"note-info\">\n        <img alt=\"\" src=\"/api/users/[%=user.id%]/avatar\" class=\"photo avatar _hide\"/>\n    </dd>\n    <dd class=\"note-body\" id=\"view-box\">\n        [%=parse_note_body(note.body)%]\n    </dd>\n\n    <dd class=\"note-body\" id=\"edit-box\">\n        <span class=\"Field\"><textarea>[%=parse_note_body(note.body)%]</textarea></span>\n    </dd>\n\t<dd style=\"clear:both!important;\"></dd>\n</dl>\n</dd>\n\n",
	"deals/deals-edit.orig":"\n\n\t\n\n\n\n\n\n\n\n<div class=\"deals-holder\" style=\"display: block;\">\n\t<div class=\"deals-card-panel\">\n\t\t<div class=\"gen-toolbar toolbar\">\n\t\t\t<ul id=\"general_toolbar\">\n\t\t\t\t<li>\n\t\t\t\t\t<a id=\"link-deal-edit\" href=\"#\" title=\"Edit\" name=\"link-deal-edit\">Edit</a>\n\t\t\t\t\t\n\t\t\t\t</li>\n\t\t\t\t\n\t\t\t\t\n\t\t\t</ul><span class=\"contact-name\">[%=deals[deal].name%]</span>\n\t\t</div>\n\t\t<div class=\"deals-info-header\">\n\t\t\t<p>Created <strong class=\"due-date\"><abbr class=\"timeago\" title=\"[%=deals[deal].createdAt%]\">[%=format_created_date(deals[deal].createdAt)%]</abbr></strong> by [%=user_fullname(users[deals[deal].createdBy])%] and assigned to [%=user_fullname(users[deals[deal].assignedTo])%]<span>[%=format_currency(deals[deal].amount)%]</span></p>\n\t\t</div>\n\t\t\n\t</div>\n\n\n\t<div id=\"deals-NT\" class=\"deals-information-pane\">\n\t\t<div class=\"Tabs\">\n\t\t\t<ul>\n\t\t\t\t<li>\n\t\t\t\t\t<a href=\"#deals-overview\">Overview</a>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<a href=\"#deals-notes\">Notes</a>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<a href=\"#deals-tasks\">Tasks</a>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</div>\n\t\t\n\t\n\t\t<div class=\"contact-information contact-tab-panel\" id=\"contact-detail\" style=\"display: block;\">\n\t\t\t\t<dl class=\"note-list notes-left-today\">\n\t\t\t\t\t[%\n\t\t\t\t\tif(is_in_progress(deals[deal])){\n\t\t\t\t\t%]\n\t\t\t\t\t<dt>Probability</dt>\n\t\t\t\t\t<dd>There is currently a <em>[%=deals[deal].probability%]%</em> probability of securing this deal.</dd>\n\t\t\t\t\t[%\n\t\t\t\t\t}\n\t\t\t\t\t%]\n\t\t\t\t</dl>\n\t\t\t\t<dl class=\"note-list notes-left-today\">\n\t\t\t\t\t<dt>Description</dt>\n\t\t\t\t\t<dd><p>[%=format_description(deals[deal])%]</p></dd>\n\t\t\t\t</dl>\n\t\t</div>\n\t\t\n\t\t<div class=\"contact-tab-panel\" id=\"contact-notes\" style=\"display: none;\">\n\t\t\t<div rel=\"id-add-note-panel\" class=\"show-hide\" id=\"id-add-note-container\">\n\t\t\t\t<div class=\"_hide\" id=\"id-add-note-panel\">\n\t\t\t\t\t<h2 class=\"title hide\">\n\t\t\t\t\t\t<span>Add Note</span>\n\t\t\t\t\t</h2>\n\t\t\t\t\t<form id=\"add-note-form\" action=\"/api/notes\" name=\"add-note-form\">\n\t\t\t\t\t\t<span class=\"Field ClearField\"><textarea class=\"expanding\" id=\"add-note-body\"></textarea></span>\n\t\t\t\t\t\t<span class=\"Field\">\n\t\t\t\t\t\t\t<label for=\"note-deal\">Associate with a contact?</label>\n\t                        <select id=\"add-note-contact\" name=\"add-note-deal\">\n\t\t\t\t\t\t\t\t<option value=\"\">Do not associate</option>\n\t\t\t\t\t\t\t\t[%\n\t\t\t\t\t\t\t\t$.each(all_contacts,function(i,n){\n\t\t\t\t\t\t\t\t\t%]<option value=\"[%=n.id%]\">[%=contact_fullname(n)%]</option>[%\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t%]\n\t\t\t\t\t\t\t</select>\n\t                    </span>\n\t\t\t\t\t\t<div class=\"Actions\">\n\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t<input type=\"button\" id=\"add-note-action\" value=\"Add Note\">\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div id=\"deal-notes-list\" class=\"\">\n\t\t\t\t<p>NOTES GO HERE</p>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"contact-tab-panel\" id=\"contact-tasks\" style=\"\">\n\t\t\t<div rel=\"id-add-note-panel\" class=\"show-hide\" id=\"id-add-task-container\">\n\t\t\t\t<div class=\"\" id=\"id-add-task-panel\">\n\t\t\t\t\t<form id=\"add-task-form\" action=\"/api/task\" name=\"add-task-form\">\n\t\t\t\t\t\t<span class=\"Field ClearedField\"><input type=\"text\" name=\"description\" id=\"add-task-title\"></span>\n\t\t\t\t\t\t<fieldset style=\"clear: both;\">\n\t\t\t\t\t\t\t<span class=\"Field\"><label>Type</label> <select name=\"taskType\">\n\t\t\t\t\t\t\t\t[% \t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$.each(task_types,function(i,n){\n\t\t\t\t\t\t\t\t\t%]\n\t\t\t\t\t\t\t\t\t<option value=\"[%=n.id%]\">\n\t\t\t\t\t\t\t\t\t\t[%=n.name%]\n\t\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t\t[%\n\t\t\t\t\t\t\t\t}); \n\t\t\t\t\t\t\t\t%]\n\t\t\t\t\t\t\t</select></span> <span class=\"Field\"><label>Assigned To</label> <select name=\"assignTo\">\n\t\t\t\t\t\t\t[%\n                                $.each(users,function(o,p){\n                            %]\n                                <option value=\"[%=p.id%]\">[%=user_fullname(p)%]</option>\n                            [%\n                                });\n                            %]\n\t\t\t\t\t\t\t</select></span> \n\t\t\t\t\t\t\t<span class=\"Field\">\n                                <label>Due</label>\n                                <input type=\"text\" name=\"due\"/>\n                            </span>\n\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t\t<div class=\"Actions\">\n\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t<input type=\"button\" id=\"add-task-action\" value=\"Add Task\">\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div id=\"deal-tasks-list\">\n\t\t\t\t<p>THE TASKS GO HERE</p>\n\t\t\t</div>\n\t\t</div>\n\t\t\n\t</div>\n\t<div id=\"\" class=\"deals-meta-pane\">\n\t\t<h2>Status..</h2>\n\t\t[%\n\t\tvar stat=status_map(deal,deals);\n\t\t%]\n\t\t<ul class=\"status\">\n\t\t\t<li class=\"[%=stat[0]%]\"><a title=\"Mark deal as in progress\" id=\"inprogress\" href=\"#\">In Progress</a></li>\n\t\t\t<li class=\"[%=stat[1]%]\"><a title=\"Mark deal as won\" id=\"won\" href=\"#\">Won</a></li>\n\t\t\t<li class=\"[%=stat[2]%] last\"><a title=\"Mark deal as lost\" id=\"lost\"href=\"#\">Lost</a></li>\n\t\t</ul>\n\t\t\n\t\t\n\t\t<dl id=\"deals-involved-list\">\n\t\t\t<dt style=\"\" id=\"contacts-involved\" rel=\"Contacts\">Contacts</dt>\n\t\t\t<dt style=\"\" id=\"users-involved\" rel=\"Users\">Users</dt>\n\t\t</dl>\n\t</div>\t\n\t\n</div>\n",
	"deals/deals-list":"<dl>\n\t[%\n\tif(deals_count!=0){\n\t$.each(groups,function(gindex,group){\n\t\tif(group!=null){\n\t\t\t\n\t\t\tif(groups.length!=1){\n\t\t%]<dt rel=\"inprogress\">[%=group.title%]</dt>[%\n\t\t}\n\t\t\n\t\t\t/* Loop through the deals */\n\t\t\t$.each(group.order,function(dindex,deal_id){\n\t\t\t\t\n\t\t\t\tvar deal=group.deals[deal_id];\n\t\t\t\tvar sel=is_selected(selected_lookup[deal.id]);\n\t\t\n\t\t\n\t\t\t%]\n\t\t\t<dd class=\"\" letter=\"\" rel=\"[%=deal.id%]\"  title=\"The description for this deal.\">\n\t\t\t\t<input type=\"checkbox\" [%=sel%] rel=\"[%=deal.id%]\">\n\t\t\t\t<div class=\"title\">[%=deal.name%]&nbsp;<em>[%=format_currency(deal.amount)%]</em></div>\n\t\t\t</dd>\n\t\t\t[%\n\t\t\t});\n\t\t}\n\t});\n\t}else{\n\t\t%]\n\t\t<div class=\"feedback notification\"><p>No deals found.</p></div>\n\t\t[%\n\t}\n\t%]\n</dl>\n",
	"deals/deals-many-selected":"<div class=\"deals-holder\" style=\"display: block;\">\n\t<div class=\"deals-card-panel\">\n\t\t<div class=\"gen-toolbar toolbar\">\n\t\t\t<ul id=\"general_toolbar\">\n\t\t\t\t<li>\n\t\t\t\t\t<a id=\"link-deal-assign\" href=\"#\" title=\"Delete\" name=\"link-contact-delete\">Assign To</a>\n\t\t\t\t\t\n\t\t\t\t\t<a id=\"link-deal-status\" href=\"#\" title=\"Change the status of these deals.\" name=\"link-contact-delete\">Status</a>\n\t\t\t\t\t\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t\t<span id=\"link-deal-status-options\" class=\"hide\">\n\t\t\t<ul>\n\t\t\t\t<li><a id=\"inprogress-deal-status\" href=\"#\">In Progress</a></li>\n\t\t\t\t<li><a id=\"won-deal-status\" href=\"#\">Won</a></li>\n\t\t\t\t<li><a id=\"lost-deal-status\" href=\"#\">Lost</a></li>\n\t\t\t\t<li><a id=\"cancel-deal-status\" href=\"#\">Cancel</a></li>\n\t\t\t</ul>\n\t\t\t</span>\n\t\t\t\n\t\t\t<span id=\"link-deal-assign-options\" class=\"hide\">\n\t\t\t<ul>\n\t\t\t\t<li>\n\t\t\t\t\t<select id=\"assign-to-user-select\">\n\t\t\t\t\t\t<option value=\"-1\">-- Select a user --</option>\n\t\t\t\t\t\t[%\n\t\t\t\t\t\t$.each(users,function(i,n){\n\t\t\t\t\t\t%]\n\t\t\t\t\t\t<option value=\"[%=n.id%]\">[%=user_fullname(n)%]</option>\n\t\t\t\t\t\t[%\t\n\t\t\t\t\t\t});\n\t\t\t\t\t\t%]\n\t\t\t\t\t</select>\n\t\t\t\t</li>\n\n\t\t\t\t<li><a id=\"cancel-deal-assign\" href=\"#\">Cancel</a></li>\n\t\t\t</ul>\n\t\t\t</span>\n\t\t\t\n\t\t\t<span class=\"contact-name\">Selected Deals</span>\n\t\t</div>\n\t</div>\n\t\n\t\n\t<div id=\"deals-NT\" class=\"deals-editlist-pane\">\n\t\t<div class=\"feedback hide\">\n\t\t\t<p>Many selected</p>\n\t\t</div>\n\t\t\n\t\t<div class=\"GenericTable GreyTable NewTable\">\n\t\t<table id=\"issueList\">\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th>Deal Name</th>\n\t\t\t\t<th>Value</th>\n\t\t\t\t<th>Probability</th>\n\t\t\t\t<th>Assigned To</th>\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t[%\n\t\t\t$.each(groups,function(gindex,group){\n\t\t\t\tif(groups_selected_lookup[gindex]!=0 && group!=null){\n\t\t\t\t%]\n\t\t\t\t<tr class=\"group-title group-title-[%=group.css%]\"><td colspan=\"5\">[%=group.title%]</td></tr>\n\t\t\t\t[%\n\t\t\t\tvar alt=false;\n\t\t\t\t\t$.each(groups_selected_deals_lookup[gindex],function(dindex,deal_id){\n\t\t\t\t\n\t\t\t\tvar deal=deals[deal_id];\n\n\t\t\t\talt=!alt;\n\t\t\t\t%]\n\n\t\t\t\t<tr class=\"[%=(alt==true)?\'odd\':\'\'%]\">\n\t\t\t\t\t<td class=\"cell_deal_name\">[%=deal.name%]</td>\n\t\t\t\t\t\n\t\t\t\t\t<td class=\"cell_deal_amount_column darker\">[%=format_currency(deal.amount)%]</td>\n\t\t\t\t\t<td class=\"cell_deal_probability\">[%=deal.probability%]%</td>\n\t\t\t\t\t<td class=\"cell_deal_assignedto\">[%=user_fullname(users[deal.assignedTo])%]</td>\n\t\t\t\t</tr>\n\n\t\t\t\t[%\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t});\t\n\t\t\t\t}\n\n\t\t\t});\n\t\t\t%]\n\t\t</tbody>\n</div>\n",
	"deals/deals-non-selected":"<div class=\"\" style=\"display: block;\">\n\t<div id=\"deals-NT\" class=\"-deals-information-pane\">\n\t\t<div class=\"feedback notification\">\n\t\t\t<p>Select a deal from the left to view it.</p>\n\t\t</div>\n\t</div>\n</div>\n",
	"general/FeedbackView":"<div class=\"feedback\">\n    <p>[%=message%]</p>\n</div>\n",
	"general/flash-message":"<div class=\"feedback [%=type%] fm-container\"><p>[%=message%]</p></div>\n",
	"general/LabBox":"<div id=\"facebox\" style=\"display:none;\">\n      <div class=\"popup Pane\">\n        <table>\n          <tbody>\n            <tr>\n              <td class=\"tl\"/><td class=\"b\"/><td class=\"tr\"/>\n            </tr>\n            <tr>\n              <td class=\"b\"/>\n              <td class=\"body\">\n                <div class=\"content\">\n                </div>\n                <div class=\"footer Actions\">\n                  <ul>\n                  [%\n                    $.each(model,function(i,n){\n                  %]\n\t\t\t\t[%\n\t\t\t\t\tvar but=String(n).replace(\' \',\'-\');\n\t\t\t\t%]\n                      <li><a href=\"#\" class=\"lb-[%=but%]\">[%=n%]</a></li>\n                  [%\n                    });\n                  %]\n                  </ul>\n                </div>\n              </td>\n              <td class=\"b\"/>\n            </tr>\n            <tr>\n              <td class=\"bl\"/><td class=\"b\"/><td class=\"br\"/>\n            </tr>\n          </tbody>\n        </table>\n      </div>\n    </div>\n",
	"tags/tag-table":"<dl>\n[%\n    if(tags){\n    var _groups=get_tag_groups(tags.tag);\n\n    \n    $.each(_groups,function(i,n){\n    %]<dt>[%=n.title%]</dt>[%\n        $.each(n.tags,function(ii,nn){\n\n\n            %]<dd><a class=\"[%=(indices[nn.id]!=null)?\'checked\':\'\'%]\" href=\"#[%=i%]:[%=ii%]\">[%=nn.label%]</a></dd>[%\n        });\n    });\n    }\n%]\n\n</dl>\n<input type=\"button\" id=\"filter_by_tags_done\" value=\"Done\"/>\n",
	"tags/tag_contacts":"<div class=\"Pane\">\n\n<h2 class=\"title\"><span>[%\n    if(indices.length==1){\n    %]\n        Tag [%=contacts[indices[0]].firstName%]&nbsp;[%=contacts[indices[0]].lastName%]\n    [%\n    }else{\n    %]\n        Tag [%=indices.length%] selected contacts \n    [%\n    }\n%]</span></h2>\n\n<form>\n    <span class=\"Field\">\n        <label>Enter tags</label>\n        <input type=\"text\" name=\"tags\"/>\n    </span>\n   \n</form>\n</div>\n",
	"tasks/new-note-view":"[%var id=\'New\';%]\n<div class=\"task-list-item-edit\" id=\"ed[%=id%]\">\n  <textarea class=\"edit-note-form edit-note-body expanding\" id=\"noteBody[%=id%]\" value=\"Body\">New Note</textarea>\n  <span class=\"edit-note-form edit-note-type hide\"></span>\n  <span class=\"edit-note-form edit-note-contact\"></span><br/>\n  <input class=\"edit-note-form edit-note-save\" id=\"saveNote[%=id%]\" type=\"button\" value=\"Save\"/>\n  <input class=\"edit-note-form edit-note-cancel hide\" type=\"button\" value=\"Cancel\"/>\n</div>\n",
	"tasks/new-task-view":"[%var id=\'New\';%]\n\n<div class=\"task-list-item-edit\" id=\"ed[%=id%]\">\n<h2>New Task</h2>\n    <form>\n    <span class=\"Field MediumField\">\n        \n        <input class=\"edit-task-form \" id=\"ti[%=id%]\" name=\"title\" value=\"[%=task.title%]\"/><br/>\n    </span>\n\n    <span class=\"Field \">\n        <label>Type</label>\n        <select name=\"type\">[%\n\n            $.each(task_types.model.taskType,function(i,n){\n                %]<option value=\"[%=n.id%]\">[%=n.name%]</option>[%\n            });\n\n        %]</select>\n    </span>\n    <span class=\"Field\">\n        <label>Due on</label>\n        <input class=\"edit-task-form edit-task-due date-pick\" id=\"due[%=id%]\" name=\"dueOn\"/>\n    </span>\n    <span class=\"Field\">\n        <label>Assigned To</label>\n\n        <select name=\"assignedTo\">[%\n\n           $.each(users.model.user,function(i,n){\n            %]<option value=\"[%=n.id%]\">[%=n.firstName%] [%=n.lastName%]</option>[%\n           });\n\n        %]</select>\n    </span>\n\n    <span class=\"Field\">\n        <label>Contact</label>\n        <select name=\"contact\">[%\n\n           $.each(contacts.model.contact,function(i,n){\n            %]<option value=\"[%=n.id%]\">[%=n.firstName%] [%=n.lastName%]</option>[%\n           });\n\n        %]</select>\n    </span>\n  </div>\n\n  <div class=\"Actions\">\n    <ul>\n        <li><input class=\"edit-task-form edit-task-save\" id=\"sv[%=id%]\" type=\"button\" value=\"Save\"/></li>\n        <li><input class=\"edit-task-form edit-task-cancel\" type=\"button\" value=\"Cancel\"/></li>\n    </ul>\n    </div>\n    </form>\n</div>\n",
	"tasks/NoTasksListView":"<div class=\"feedback notification\">\n    <p>No Tasks Found</p>\n</div>\n",
	"tasks/note-list-view":"<ol>\n[%\n$.each(note_model.model.note,function(i,n){\nvar evenodd = \'un\';\n(i%2==0) ? evenodd=\'odd\' : evenodd=\'even\';\nif (n.createdBy!=null) {\n  var _email = user_model.user_by_id(n.createdBy).email;\n  n.createdByAvatar=\'http://www.gravatar.com/avatar/\'\n  +$.md5(_email)\n  +\'?s=48&d=identicon\';\n  n.createdByName = user_model.user_by_id(n.createdBy).firstName + \' \' + user_model.user_by_id(n.createdBy).lastName;\n}\nif (n.contact!=null) {\n  var _email = contact_model.contact_by_id(n.contact).emailAddresses.emailAddress[0].address;\n  n.contactAvatar=\'http://www.gravatar.com/avatar/\'\n  +$.md5(_email)\n  +\'?s=48&d=identicon\';\n  n.contactName = contact_model.contact_by_id(n.contact).firstName + \' \' + contact_model.contact_by_id(n.contact).lastName;\n}\n%]\n<li>\n<div class=\"CommentItem hentry\">\n    \n    <h3>\n    <span class=\"perma\"><a rel=\"bookmark\" href=\"#comment_196\" title=\"Permalink\">#</a></span>\n    <span class=\"vcard\"><a href=\"/profile/[%=n.createdByName%]\"><strong class=\"fn author\">[%=n.createdByName%]</strong></a></span>\n    <em>\n        <abbr class=\"published updated timeago\" title=\"[%=n.createdAt%]\">[%=n.createdAt%]</abbr>\n    </em>\n    \n    </h3>\n    [%\n        var av=n.createdByAvatar;\n\n    %]\n    \n    \n    <div class=\"indented\" style=\"background-image: url([%=n.createdByAvatar%]);\">\n        <div class=\"entry-content\">\n            <p>[%=n.body%]</p>\n        </div>\n    </div>\n</div>\n</li>\n\n\n[%\n});\n%]\n</ol>\n",
	"tasks/single-contact-task":"<li rel=\"<%= id %>\" class=\"TaskItem editable-item\">\n    <ul class=\"editable-item-actions\">\n        <li><a class=\"action-edit\" href=\"#\">edit</a></li>\n        <li><a class=\"action-delete hide\" href=\"#\">delete</a></li>\n    </ul>\n    <dl class=\"editable-item-info-view css-Todo\">\n        <dt><%= id %></dt>\n        <dd rel=\"\" class=\"editable-property type\">\n            <% if (typeof type != \'undefined\') { %>\n                <span id=\"task-<%= type %>-type\">&nbsp;</span>\n            <% } else { %>\n                &nbsp;\n            <% } %>\n        </dd>\n        <dd rel=\"\" class=\"editable-property title\"><%= title %></dd>\n        <dd rel=\"\" class=\"editable-property task-info\">\n                <% if (typeof dueOn != \'undefined\') { %>\n                    <%= __(\'text.tasks.index.due\') %>                     \n                    <% task_time = jQuery.timeago(dueOn.toString()); %>\n                    <abbr id=\"task-<%= id %>-time\" class=\"timeago\" title=\"<%= dueOn %>\"><%= task_time %></abbr>\n                <% } else { %>\n                    &nbsp;\n                <% } %>\n                <% if (typeof assignedTo != \'undefined\') { %>\n                    <%= __(\'text.tasks.index.andasssignedto\') %>\n                    <span id=\"task-<%= id %>-assignedto\">&nbsp;</span>\n                <% } else { %>\n                    &nbsp;\n                <% } %>\n        </dd>\n    </dl>\n</li>\n",
	"tasks/subscribe-to-calendar":"<div><p><strong>[%=resource_string(\'title.tasks.calendar\')%]</strong></p>\n\n<p>[%=resource_string(\'text.tasks.calendar.info\')%]</p>\n\t\n<p><strong><a  id=\"ical-url\" href=\"[%=resource_string(\'label.task.subscribetocalendar\',server_url,hash)%]\">[%=resource_string(\'label.task.subscribetocalendar\',server_url,hash)%]</a></strong></p>\n<div class=\"feedback notification\">\n\t<p>[%=resource_string(\'text.tasks.calendar.reset\')%] \n\t\t<a id=\"reset-hash-action\" href=\"\">[%=resource_string(\'action.tasks.calendar.reset\')%]</a></p>\n</div>\n</div>\n\n\n\n",
	"tasks/task-list-view":"<ol>\n[%\n$.each(tasks.model.task,function(i,n){\nvar evenodd = \'un\';\nvar id = n.id;\nvar date = Date.parse(n.dueOn).toLocaleDateString();\n(i%2==0) ? evenodd=\'odd\' : evenodd=\'even\';\n%]\n<li class=\"task-list-item [%=evenodd%]-table\">\n  <div class=\"task-list-item-vis\" id=\"vis[%=n.id%]\">\n    <span class=\"task-checkbox-cont\"><input type=\"checkbox\" id=\"ck[%=n.id%]\" class=\"task-checkbox\"[%if(n.complete==\'true\'){%] checked=\"checked\"[%}%]/></span>\n    [%=n.title%]\n    <span class=\"task-label task-label-[%=task_types.type_by_id(n.type).name%]\">[%=task_types.type_by_id(n.type).name%]</span>\n    <div class=\"edit-task-controls\">\n      <span style=\"\"><abbr class=\"timeago\" title=\"[%=n.dueOn%]\">[%=n.dueOn%]</abbr></span>\n    </div>\n  </div>\n  <div class=\"task-list-item-edit hide\" id=\"ed[%=id%]\">\n    <form>\n      <span class=\"\">\n        <input class=\"edit-task-form edit-task-title\" id=\"ti[%=id%]\" name=\"title\" value=\"[%=n.title%]\"/>\n      </span>\n      <br/>\n      <span class=\"\">\n        <label>Due on</label>\n        <input class=\"edit-task-form edit-task-due date-pick\" id=\"due[%=id%]\" name=\"dueOn\" value=\"[%=date%]\"/>\n      </span>\n      <span class=\"\">\n        <label>Type</label>\n        <select name=\"type\" id=\"ty[%=id%]\">\n          [%$.each(task_types.model().taskType,function(i,taskType){%]\n            <option value=\"[%=taskType.id%]\"[%if(n.type==taskType.id){%] selected=\"selected\"[%}%]>[%=taskType.name%]</option>\n          [%});%]\n        </select>\n      </span>\n      <span class=\"\">\n        <label>Contact</label>\n        <select name=\"contact\" id=\"co[%=id%]\">\n          [%$.each(contacts.model.contact,function(i,contact){%]\n            <option value=\"[%=contact.id%]\"[%if(n.contact==contact.id){%] selected=\"selected\"[%}%]>[%=contact.firstName%] [%=contact.lastName%]</option>\n          [%});%]\n        </select>\n      </span>\n      <span class=\"\">\n        <label>Assigned To</label>\n        <select name=\"assignedTo\" id=\"as[%=id%]\">\n          [%$.each(users.model.user,function(i,user){%]\n            <option value=\"[%=user.id%]\"[%if(n.assignedTo==user.id){%] selected=\"selected\"[%}%]>[%=user.firstName%] [%=user.lastName%]</option>\n          [%});%]\n        </select>\n      </span>\n      <input class=\"edit-task-form edit-task-save\" id=\"sv[%=id%]\" type=\"button\" value=\"Save\"/>\n      <input class=\"edit-task-form edit-task-cancel\" type=\"button\" value=\"Cancel\"/>\n    </form>\n  </div>\n</li>\n[%});%]\n</ol>\n",
	"tasks/task-type-dropdown-selector-view":"<select>\n[%\n$.each(model.taskType,function(i,n){\n%]\n<option value=\"[%=n.id%]\">[%=n.name%]</option>\n[%\n});\n%]\n</select>\n",
	"tasks/task-type-options":"<option value=\"\">None</option>\n<% $.each(taskType, function(index, type) { %>\n        <option value=\"<%= type.id %>\"><%= type.name %></option>\n<% }); %>\n",
	"tasks/title-view":"<h2 style=\"position:relative;\" class=\"title\">\n<span class=\"title-link\">\n    <a class=\"toggle-new-task hide\" title=\"New Task\" href=\"#\">New Task</a>\n</span>\n\n<span>[%=taskType%] tasks for [%=user.firstName%] [%=user.lastName%]\n[%if (date!=null) {%] due [%=date}%]</span>\n\n</h2>\n",
	"users/no-users-found":"<div class=\"feedback \">\n<p>[%=resource_string(\'feedback.users.index.nousersfound\',term)%]</p>\n</div>\n",
	"users/user-edit":"<form method=\"post\" action=\"/profile/1\" onsubmit=\"return true;\" name=\"profile/1\" id=\"useredit\" autocomplete=\"off\">\n\t<input type=\"hidden\" id=\"profile_1__method\" value=\"put\" name=\"_method\"/>\n\t<h2 class=\"title\">\n\t[%\n\tif(user.id==null){\n\t\t%]Create a new user[%\n\t}else{\n\t\t%]Editing [% %]  [%=user.username%][%\n\t}\n\t%]\n\t</h2>\n\t<span class=\"Field ClearedField\">\n\t\t<span class=\"error\"></span>\n\t\t<label class=\"desc\" >Username <span class=\"req\">*</span></label>\n\t\t[%\n\t\tif(user.id==null){\n\t\t%]\n\t\t<input type=\"text\" class=\"noborder\" id=\"username\" value=\"[%=user.username%]\" name=\"username\" autocomplete=\"off\"/>\n\t\t[%}else{%]\n\t\t<input type=\"text\" class=\"noborder\" id=\"username\" value=\"[%=user.username%]\" name=\"username\" disabled=\"disabled\" autocomplete=\"off\"/>\n\t\t[%}%]\n\t\t\n\t</span>\n\t<span class=\"Field ClearedField\">\n\t\t<span class=\"error\"></span>\n\t\t<label class=\"desc\" >First name</label> <input type=\"text\" maxlength=\"30\" id=\"firstName\" value=\"[%=user.firstName%]\" name=\"firstName\">\n\t</span>\n\t<span class=\"Field ClearedField\">\n\t\t<span class=\"error\"></span>\n\t\t<label class=\"desc\">Last name</label> <input type=\"text\" id=\"lastName\" value=\"[%=user.lastName%]\" maxlength=\"30\" name=\"lastName\">\n\t</span>\n\t<span class=\"Field MediumField ClearedField\">\n\t\t<span class=\"error\"></span>\n\t\t<label class=\"desc\" >Email <span class=\"req\">*</span></label>\n\t\t<input type=\"text\" id=\"profile_1_email\" value=\"[%=user.email%]\" name=\"email\">\n\t</span>\n\t\n\t[%\n\tif(can_user_role_be_changed(user,this_user)){\n\t\n\tif(user_is_admin(user)){\n\t%]\n\t\n\t\n\t[%\n\t}else{\n\t%]\n\t\t<span class=\"Field HugeField inline\">\n\t\t\t<input type=\"checkbox\" name=\"make_admin\" id=\"make_admin\" class=\"Checkbox inline\">\n\n\t\t\t<label >Make user an admin.</label>\n\t\t</span>\n\t[%\t\n\t}\n\t}\n\t%]\n\t\n\t[%\n\tvar _password_change=true;\n\tif(user.id==null){\n\t\t_password_change=false;\n\t\t%]\n\t\t<span class=\"Field HugeField inline\" style=\"display:none;\">\n\t\t\t<input type=\"checkbox\" name=\"change_password\" id=\"change_password\" checked=\"checked\" class=\"Checkbox inline\"/>\n\t\t</span>\n\t\t[%\n\t}else{\n\t\t%]\n\t\t<span class=\"Field HugeField inline\">\n\t\t\t\n\t\t\t<input type=\"checkbox\" name=\"change_password\" id=\"change_password\" class=\"Checkbox inline\"/>\n\t\t\t<label >Change the users password.</label>\n\t\t</span>\n\t\t[%\t\n\t}\n\t\n\t\n\tvar _hide=\'\';\n\tif(_password_change){\n\t\t_hide=\'hide\';\n\t}\n\t%]\n\t\n\t<div id=\"set_password\" class=\"[%=_hide%]\">\n\t\t<h2 class=\"title\">\n\t\t[%\n\t\tif(user.id==null){\n\t\t%]\n\t\tCreate Password\n\t\t[%}else{%]\n\t\tChange Password\n\t\t[%}%]\n\t\t</h2>\n\t\t<span class=\"Field ClearedField\">\n\t\t\t<span class=\"error\"></span>\n\t\t\t<label class=\"desc\" for=\"password\">Password</label>\n\t\t\t<input type=\"password\" id=\"password\" name=\"password\"/>\n\t\t</span>\n\t\t<span class=\"Field ClearedField\">\n\t\t\t<span class=\"error\"></span>\n\t\t\t<label class=\"desc\" for=\"password\">Confirm password</label>\n\t\t\t<input type=\"password\" id=\"passwordconfirm\" name=\"passwordconfirm\"/>\n\t\t</span>\n\t</div>\n</form>\n",
	"users/user-options":"<option value=\"\">No</option>\n<% $.each(user, function(index, user) { %>\n        <option value=\"<%= user.id %>\"><%= user.firstName %> <%= user.lastName %></option>\n<% }); %>\n",
	"show_user":"\n\t<dl class=\"Contact vcard enabled-[%=user.enabled%]\" [%if(user.enabled==\'false\'){%]title=\"This user has been disabled\"[%}%]>\n        <dt class=\"fn\"><a rel=\"[%=index%]\" href=\"/admin/users/[%=user.id%]\" class=\"actEdit\">[%=user_fullname(user)%]</a></dt>\n        <dd class=\"avatar\"><img width=\"32\" height=\"32\" class=\"photo\" src=\"/api/users/[%=user.id%]/avatar\"/></dd>\n        <dd class=\"tel mob\"> </dd>\n        <dd class=\"email\"><a href=\"mailto:[%=user.email%]\">[%=user.email%]</a></dd>\n    </dl>\n",
	"users/users-list":"\n\n<ul class=\"Contacts\">\n\t[%\n\t$.each(user,function(index,user){\n\t%]\n\t<li>\n\t[%=render_partial(\'show_user\',{user:user,index:index});%]\n\t</li>\n\t[%\t\n\t});\n\t%]\n</ul>\n",
	"_end_":""};