docbrown/app/views/users/_publishing_from_rss.html.erb
Mohab Abd El-Dayem 2c80e9da42 Make The Default Email An Enviroment Variable. (#4677)
* Make the default email an enviroment variable

* Added spaces in Envfile for readability
2019-11-01 09:03:06 -04:00

65 lines
2.7 KiB
Text

<h3>Publishing to dev.to from RSS</h3>
<% if @user.feed_url.present? %>
<%= form_for(@user) do |f| %>
<div class="field">
<label></label>
<%= f.hidden_field :feed_url, value: @user.feed_url %>
<%= f.hidden_field :tab, value: @tab %>
<%= f.submit "Fetch Feed Now", class: "cta" %>
<p><em>
Last Fetched: <time id="rss-fetch-time" datetime="<%= @user.feed_fetched_at.iso8601 %>">
</time>
</em></p>
</div>
<% end %>
<% end %>
<p>
Posts will land in your <a href="/dashboard">dashboard</a>
<b><em>as drafts</em></b>, and then you can publish from there (or give dev.to admins permission to do so).
</p>
<p>
Formatting will typically look good, but you may have to make manual fixes. In the case of Medium, you may have to manually fix embeds.
</p>
<p>
To find out more about how drafts are created from your feed, read this
<a href="/p/publishing_from_rss_guide">guide</a>.
</p>
<p>
Your feed will be fetched every time you submit this form and updates will be automatically fetched periodically thereafter. Contact
<a href="mailto:<%= ApplicationConfig["DEFAULT_SITE_EMAIL"] %>"><%= ApplicationConfig["DEFAULT_SITE_EMAIL"] %></a> if you encounter issues.
</p>
<p>
FYI: Medium RSS feed URLs are <em>https://medium.com/feed/@your_username</em>
</p>
<p>
<em>By submitting your RSS Feed URL, you agree that you own and/or have permission to syndicate the associated content.</em>
</p>
<%= form_for(@user) do |f| %>
<div class="field">
<b><%= f.label :feed_url, "RSS Feed URL" %></b>
<%= f.url_field :feed_url, placeholder: "https://www.your-site-here.com/feed/" %>
</div>
<div class="checkbox-field">
<div class="sub-field">
<%= f.check_box :feed_mark_canonical %>
<%= f.label :feed_mark_canonical, "Mark the RSS source as canonical URL by default" %>
<div class="field-explainer">
If you check this box, the post will automatically mark the feed source as the canonical URL.
</div>
</div>
<div class="sub-field">
<%= f.check_box :feed_referential_link %>
<%= f.label :feed_referential_link, "Replace self-referential links with DEV-specific links" %>
<div class="field-explainer">
If you check this box, the post will automatically change any URLs included in the post to refer to the version of that article on DEV if available. This is primarily meant for folks migrating their entire blog onto DEV.
</div>
</div>
</div>
<div class="field">
<label></label>
<%= f.hidden_field :tab, value: @tab %>
<% button_text = @user.feed_url.present? ? "UPDATE" : "SUBMIT" %>
<%= f.submit button_text, class: "cta" %>
</div>
<% end %>