* Create DiscussionLocks
* Fix specs
* Update nullify_blank_notes_and_reason
* Update before_validation call
* Updated DiscussionLockPolicy for clarity
* Move permitted_attributes to a constant
* Update route
* Apply suggestions from code review for frontend
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* Add title tags
* Wrap unlock confirm in main element
* Wrap flash messages up in div
* Actually fix title tags
* Hide comment reply button when discussion is locked
* Add E2E tests
* Try to fix E2E tests
* Cypress...you work locally but not in CI...why!?
* PR feedback
* Update E2E tests
* More E2E updates 😭
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
63 lines
4.1 KiB
Text
63 lines
4.1 KiB
Text
<% title "Manage #{@article.title}" %>
|
|
<main id="main-content">
|
|
<div class="dashboard-manage-header">
|
|
<div class="dashboard-manage-header-inner-container">
|
|
<div class="dashboard-manage-nav">
|
|
<a href="/dashboard">Dashboard</a> 👉 Manage Your Post
|
|
</div>
|
|
<% if flash[:error] %>
|
|
<div role="alert">
|
|
<h3 class="manage-page-error">Uh Oh! <%= flash[:error] %> 😬</h3>
|
|
</div>
|
|
<% end %>
|
|
<% if flash[:success] %>
|
|
<div role="alert">
|
|
<h3 class="manage-page-success"><%= flash[:success] %></h3>
|
|
</div>
|
|
<% end %>
|
|
<h2>Tools:</h2>
|
|
<p><strong>Experience Level of Post:</strong> Is your post written more for a beginner or an advanced audience? Adjust this level as a <em>gentle</em> indicator which will help show the post to the people who will benefit the most.
|
|
<h2>Tips:</h2>
|
|
<ol>
|
|
<li>
|
|
Write your own tweet about the post, describing personally why you wrote it or why people might find it useful. We may retweet you.
|
|
</li>
|
|
<li>
|
|
Share to link aggregators such as <a href="https://www.reddit.com">Reddit</a>. Try to choose the most topic-specific subreddits, such as <a href="https://www.reddit.com/r/javascript">/r/javascript</a> or <a href="https://www.reddit.com/r/python">/r/python</a>, etc. <em>Warning: jerks and trolls may be lurking.</em>
|
|
</li>
|
|
<li>
|
|
Share with your co-workers or local communities. Ask people to leave questions for you in the comments. It's a great way to spark additional discussion.
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="dashboard-container crayons-layout">
|
|
<%= render "dashboards/dashboard_article", article: @article, discussion_lock: @discussion_lock, organization: @article.organization, org_admin: @user.org_admin?(@article.organization), manage_view: true %>
|
|
<div class="single-article single-article-manage-form-wrapper">
|
|
<%= form_for(RatingVote.new) do |f| %>
|
|
<h2>Experience Level of Post</h2>
|
|
<%= f.hidden_field :article_id, value: @article.id %>
|
|
<%= f.hidden_field :group, value: "experience_level" %>
|
|
<span class="button-section button-section-newbie">
|
|
<button value="1" name="rating_vote[rating]" class="level-rating-button <%= "selected" if @rating_vote&.rating.to_d == 1.0.to_d %>">1</button>
|
|
<button value="2" name="rating_vote[rating]" class="level-rating-button <%= "selected" if @rating_vote&.rating.to_d == 2.0.to_d %>">2</button>
|
|
<button value="3" name="rating_vote[rating]" class="level-rating-button <%= "selected" if @rating_vote&.rating.to_d == 3.0.to_d %>">3</button>
|
|
</span>
|
|
<span class="button-section button-section-intermediate">
|
|
<button value="4" name="rating_vote[rating]" class="level-rating-button <%= "selected" if @rating_vote&.rating.to_d == 4.0.to_d %>">4</button>
|
|
<button value="5" name="rating_vote[rating]" class="level-rating-button <%= "selected" if @rating_vote&.rating.to_d == 5.0.to_d %>">5</button>
|
|
<button value="6" name="rating_vote[rating]" class="level-rating-button <%= "selected" if @rating_vote&.rating.to_d == 6.0.to_d %>">6</button>
|
|
<button value="7" name="rating_vote[rating]" class="level-rating-button <%= "selected" if @rating_vote&.rating.to_d == 7.0.to_d %>">7</button>
|
|
</span>
|
|
<span class="button-section button-section-senior">
|
|
<button value="8" name="rating_vote[rating]" class="level-rating-button <%= "selected" if @rating_vote&.rating.to_d == 8.0.to_d %>">8</button>
|
|
<button value="9" name="rating_vote[rating]" class="level-rating-button <%= "selected" if @rating_vote&.rating.to_d == 9.0.to_d %>">9</button>
|
|
<button value="10" name="rating_vote[rating]" class="level-rating-button <%= "selected" if @rating_vote&.rating.to_d == 10.0.to_d %>">10</button>
|
|
</span>
|
|
<p>Who is this post most relevant for?</p>
|
|
<p><span class="scale-pod">👈 Beginner</span><span class="scale-pod">Expert 👉</span></p>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
</main>
|