File size: 5,314 Bytes
9eee17e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
{% extends "base.html" %}
{% block content %}
<section class="workspace-shell page-shell" data-workspace-view="{{ workspace_view }}" data-auth-state="{{ 'authenticated' if signed_in else 'anonymous-boundary' }}">
  {% if workspace_view == "dashboard" %}
  <header class="workspace-heading">
    <p class="eyebrow">Buyer workspace</p>
    <h1>My Account</h1>
  </header>
  <div class="workspace-card-grid">
    <a class="workspace-card" href="/workspace/saved/products/">
      <span class="workspace-card-icon" aria-hidden="true">&#9825;</span>
      <span><strong>Saved Products</strong><small>Access your favorites here</small></span>
      <span aria-hidden="true">&rsaquo;</span>
    </a>
    <a class="workspace-card" href="/p/186596/Notion/reviews/">
      <span class="workspace-card-icon" aria-hidden="true">&#9734;</span>
      <span><strong>My Reviews</strong><small>Your published reviews and drafts</small></span>
      <span aria-hidden="true">&rsaquo;</span>
    </a>
    <div class="workspace-card workspace-card-muted">
      <span class="workspace-card-icon" aria-hidden="true">&#127873;</span>
      <span><strong>My Rewards</strong><small>Claim your rewards for eligible reviews</small></span>
      <span aria-hidden="true">&rsaquo;</span>
    </div>
    <a class="workspace-card" href="/workspace/profile/">
      <span class="workspace-card-icon" aria-hidden="true">&#9786;</span>
      <span><strong>My Profile</strong><small>Add your industry and role information</small></span>
      <span aria-hidden="true">&rsaquo;</span>
    </a>
  </div>
  {% elif workspace_view == "saved-products" %}
  <header class="workspace-heading workspace-heading-row">
    <div><p class="eyebrow">Buyer workspace</p><h1>Saved Products</h1></div>
    <a class="text-link" href="/workspace/">Back to My Account</a>
  </header>
  {% if signed_in and saved_products %}
  {% for product in saved_products %}
  <article class="workspace-saved-product" data-saved-product="{{ product.id }}">
    {% if product.logo_asset %}
    <img class="product-logo" src="{{ product.logo_asset }}" alt="" width="48" height="48">
    {% else %}
    <span class="result-monogram" aria-hidden="true">{{ product.name[0] }}</span>
    {% endif %}
    <div>
      <h2>{{ product.name }}</h2>
      <p>Saved to your Capterra workspace for quick access and comparison.</p>
      <p class="rating"><span class="stars rating-{{ product.rating | string | replace('.', '-') }}" aria-hidden="true"></span> {{ "%.1f" | format(product.rating) }} ({{ product.local_review_count }})</p>
    </div>
    <div class="result-actions">
      <a class="secondary-button" href="/p/{{ product.id }}/{{ product.url_slug }}/">View product</a>
      <a class="text-link" href="/favorites/software/{{ product.id }}?next=/workspace/saved/products/">Manage</a>
    </div>
  </article>
  {% endfor %}
  {% else %}
  <section class="workspace-empty-state" aria-labelledby="saved-empty-title">
    <span class="workspace-empty-icon" aria-hidden="true">&#9825;</span>
    <h2 id="saved-empty-title">No saved products yet</h2>
    <p>Start saving products to compare your options and find them here later.</p>
    <a class="primary-button" href="/categories/">FIND A PRODUCT TO SAVE</a>
  </section>
  {% endif %}
  {% else %}
  <header class="workspace-heading workspace-heading-row">
    <div><p class="eyebrow">Buyer workspace</p><h1>My Profile</h1></div>
    <a class="text-link" href="/workspace/">Back to My Account</a>
  </header>
  {% if signed_in %}
  <section class="workspace-profile-card" aria-labelledby="profile-details-title">
    <div class="workspace-profile-avatar" aria-hidden="true">{{ reviewer_initials }}</div>
    <div>
      <h2 id="profile-details-title">Profile details</h2>
      <dl>
        <div><dt>Name</dt><dd>{{ reviewer_name }}</dd></div>
        <div><dt>Email</dt><dd>{{ reviewer_email }}</dd></div>
        {% if profile_stats %}
        <div><dt>Member since</dt><dd>{{ profile_stats.member_since }}</dd></div>
        <div><dt>Saved products</dt><dd>{{ profile_stats.favorite_count }}</dd></div>
        <div><dt>Reviews written</dt><dd>{{ profile_stats.review_count }}</dd></div>
        {% endif %}
      </dl>
      {% if profile_stats and profile_stats.review_count %}
      <p class="muted"><a class="text-link" href="/workspace/saved/products/">Open your saved products</a> or keep researching from the <a class="text-link" href="/categories/">category directory</a>.</p>
      {% endif %}
      <p class="muted">Your local Capterra profile belongs only to this offline site.</p>
    </div>
  </section>
  {% else %}
  <div class="workspace-profile-placeholder" aria-hidden="true"></div>
  {% endif %}
  {% endif %}
</section>

{% if not signed_in %}
<section class="workspace-auth-boundary" role="dialog" aria-modal="true" aria-labelledby="workspace-auth-title">
  <div class="workspace-auth-card">
    <p class="eyebrow">WELCOME TO CAPTERRA</p>
    <h2 id="workspace-auth-title">Sign in to your account</h2>
    <p>Save products, manage your profile, and keep your software research together.</p>
    <a class="primary-button" href="/auth/login?next={{ current_path | urlencode }}">Join or Log in</a>
    <small>Production Capterra credentials do not work here.</small>
  </div>
</section>
{% endif %}
{% endblock %}