remove a space and refactor conditions (#4437)

* remove a space and refactor conditions

* fix the condition to present check
This commit is contained in:
Dmitrii Pashutskii 2019-10-15 23:24:19 +08:00 committed by Ben Halpern
parent 436499135a
commit ea4d1fee63

View file

@ -134,8 +134,7 @@
<input type="hidden" name="article_id" value="<%= article.id %>" />
<p> Twitter MAIN</p>
<textarea cols="37" rows="6" wrap="hard" name="tweet" maxlength="255"><%= article.title %>
<% if !article.user.twitter_username.blank? %>&#013{ author: @<%= article.user.twitter_username %> } #DEVCommunity<% end %>
</textarea>
<% if article.user.twitter_username? %>&#013{ author: @<%= article.user.twitter_username %> } #DEVCommunity<% end %></textarea>
<button class="btn btn-info" style="font-size:1em;">🦅 Tweet to @<%= ApplicationConfig["SITE_TWITTER_HANDLE"] %></button>
<% end %>
<% if (article.decorate.cached_tag_list_array & Tag.bufferized_tags).any? %>
@ -144,8 +143,7 @@
<input type="hidden" name="article_id" value="<%= article.id %>" />
<p> Twitter Satellite</p>
<textarea cols="37" rows="6" wrap="hard" name="tweet" maxlength="255"><%= article.title %>
<% if !article.user.twitter_username.blank? %>&#013{ author: @<%= article.user.twitter_username %> }<% end %>
</textarea>
<% if article.user.twitter_username? %>&#013{ author: @<%= article.user.twitter_username %> }<% end %></textarea>
<button class="btn btn-info" style="font-size:1em;">🐦 Tweet to satellites</button>
<% end %>
<% end %>