userProfile.html 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <template name='profile'>
  2. {{ # if profile }}
  3. <div class="tabbed-pane-header">
  4. <div class="tabbed-pane-header-wrapper clearfix">
  5. <a class="tabbed-pane-header-image profile-image ed js-change-avatar-profile" href="#">
  6. {{> userAvatar user=profile size="large"}}
  7. </a>
  8. <div class="tabbed-pane-header-details">
  9. <div class="js-current-details">
  10. <div class="tabbed-pane-header-details-name">
  11. <h1 class="inline"> {{ profile.profile.name }} </h1>
  12. <p class="window-title-extra quiet"> @{{ profile.username }} </p>
  13. </div>
  14. <div class="tabbed-pane-header-details-content">
  15. <p>{{ profile.profile.bio }}</p>
  16. </div>
  17. <div class="tabbed-pane-header-details-content"></div>
  18. </div>
  19. {{ > profileEditForm }}
  20. </div>
  21. </div>
  22. </div>
  23. {{ else }}
  24. {{ > message label='user-profile-not-found' }}
  25. {{ /if }}
  26. </template>
  27. <template name="settings">
  28. {{ > profile profile=currentUser }}
  29. <div class="tabbed-pane-main-col clearfix">
  30. <div class="tabbed-pane-main-col-loading hide js-loading-page">
  31. <span class="tabbed-pane-main-col-loading-spinner spinner"></span>
  32. </div>
  33. <div class="tabbed-pane-main-col-wrapper js-content">
  34. <div class="window-module clearfix">
  35. <div class="window-module-title">
  36. <h3>{{_ "account-details"}}</h3>
  37. </div>
  38. <a class="big-link js-change-name-and-bio" href="#">
  39. <span class="text">{{_ 'change-name-initials-bio'}}</span>
  40. </a>
  41. <a class="big-link js-change-avatar" href="#">
  42. <span class="text">{{_ 'change-avatar'}}</span>
  43. </a>
  44. <a class="big-link js-change-password" href="#">
  45. <span class="text">{{_ 'change-password'}}</span>
  46. </a>
  47. <a class="big-link js-change-email" href="#">
  48. <span class="text">{{_ 'change-email'}}</span>
  49. </a>
  50. </div>
  51. </div>
  52. </div>
  53. </template>
  54. <template name="profileEditForm">
  55. {{#if $eq currentUser.username profile.username }}
  56. {{# if session 'ProfileEditForm' }}
  57. <form id="ProfileEditForm" class="js-profile-form">
  58. <p class="error js-profile-form-error hide"></p>
  59. <label>{{_ "username"}}</label>
  60. <input type="text" id="username" value="{{ profile.username }}" disabled>
  61. <label>{{_ "fullname"}}</label>
  62. <input type="text" id="name" value="{{ profile.profile.name }}">
  63. <label>
  64. {{_ "bio"}} <span class="quiet">({{_ 'optional'}})</span>
  65. </label>
  66. <textarea id="bio">{{ profile.profile.bio }}</textarea>
  67. <input type="submit" class="primary wide js-submit-profile" value="{{_ 'save'}}">
  68. <input type="button" class="js-cancel-edit-profile" value="{{_ 'cancel'}}">
  69. </form>
  70. {{ else }}
  71. <a class="button-link tabbed-pane-header-details-edit js-edit-profile" href="#">
  72. <span class="icon-sm fa fa-pencil"></span>
  73. {{_ "edit-profile"}}
  74. </a>
  75. {{ /if }}
  76. {{ /if }}
  77. </template>