mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-15 16:32:16 +00:00
Gutting all habit views from server
This commit is contained in:
parent
87a9f54c79
commit
df0783b834
6 changed files with 0 additions and 88 deletions
|
|
@ -1,29 +0,0 @@
|
|||
<%= form_for(@habit) do |f| %>
|
||||
<% if @habit.errors.any? %>
|
||||
<div id="error_explanation">
|
||||
<h2><%= pluralize(@habit.errors.count, "error") %> prohibited this habit from being saved:</h2>
|
||||
|
||||
<ul>
|
||||
<% @habit.errors.full_messages.each do |msg| %>
|
||||
<li><%= msg %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :name %><br />
|
||||
<%= f.text_field :name %>
|
||||
</div>
|
||||
<div class="field">
|
||||
<%= f.label :habit_type %><br />
|
||||
<%= f.select :habit_type, options_for_select([['Always',1], ['Daily',2], ['One-time',3]], @habit.habit_type) %>
|
||||
</div>
|
||||
<div class="field">
|
||||
<%= f.label :notes %><br />
|
||||
<%= f.text_area :notes %>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<%= f.submit %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
<li id="habit_<%= habit.id %>" class="habit <%= habit_type(habit) %> <%= score_color(habit) %>">
|
||||
<% if habit.habit_type==Habit::ALWAYS %>
|
||||
<%= vote_link(habit, 'up') %>
|
||||
<%= vote_link(habit, 'down') %>
|
||||
<%= habit.name %>
|
||||
<% else %>
|
||||
<% if habit.done %>
|
||||
<%= vote_link(habit, 'checked') %>
|
||||
<strike><%= habit.name %></strike>
|
||||
<% else %>
|
||||
<%= vote_link(habit, 'unchecked') %>
|
||||
<%= habit.name %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class='edit'>
|
||||
<% if habit.notes.present? %>
|
||||
<%= image_tag('comment.png', :class=>'comment') %><div class='qtip'><%= habit.notes %></div>
|
||||
<% end %>
|
||||
<%= link_to 'Edit', edit_habit_path(habit) %>
|
||||
</div>
|
||||
</li>
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
<%= link_to 'Back', habits_url %>
|
||||
|
||||
<table id="layout">
|
||||
<tr>
|
||||
|
||||
<td class="panel">
|
||||
<div class="block">
|
||||
<div class='content'>
|
||||
<h2 class='title'>Completed</h2>
|
||||
<div class='inner'>
|
||||
<ul id="daily">
|
||||
<% @one_time.each do |habit| %>
|
||||
<%= render :partial => "habit", :locals => { :habit => habit } %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<h1>Editing habit</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Destroy', @habit, confirm: 'Are you sure?', method: :delete %> |
|
||||
<%= link_to 'Back', habits_path %>
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
<h1>New habit</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Back', habits_path %>
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
<% unless @habit.habit_type==Habit::ONE_TIME %>
|
||||
$('#habit_<%= @habit.id %>').replaceWith("<%= escape_javascript(render :partial => "habit", :locals => { :habit => @habit }) %>");
|
||||
<% end %>
|
||||
$('#progressbar').replaceWith("<%= escape_javascript(render :partial => "shared/progressbar") %>");
|
||||
$('#money').replaceWith("<%= escape_javascript(render 'shared/money') %>");
|
||||
Loading…
Reference in a new issue