mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 03:52:14 +00:00
Remove show action
This commit is contained in:
parent
d2fe179494
commit
34c1d5d46f
3 changed files with 0 additions and 57 deletions
|
|
@ -7,7 +7,6 @@ class HabitTracker.Routers.HabitsRouter extends Backbone.Router
|
|||
"/new" : "newHabit"
|
||||
"/index" : "index"
|
||||
"/:id/edit" : "edit"
|
||||
"/:id" : "show"
|
||||
".*" : "index"
|
||||
|
||||
newHabit: ->
|
||||
|
|
@ -18,12 +17,6 @@ class HabitTracker.Routers.HabitsRouter extends Backbone.Router
|
|||
@view = new HabitTracker.Views.Habits.IndexView(habits: @habits)
|
||||
$("#habits").html(@view.render().el)
|
||||
|
||||
show: (id) ->
|
||||
habit = @habits.get(id)
|
||||
|
||||
@view = new HabitTracker.Views.Habits.ShowView(model: habit)
|
||||
$("#habits").html(@view.render().el)
|
||||
|
||||
edit: (id) ->
|
||||
habit = @habits.get(id)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,42 +0,0 @@
|
|||
<p>
|
||||
<b>Name:</b>
|
||||
<%= name %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Habit type:</b>
|
||||
<%= habit_type %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Score:</b>
|
||||
<%= score %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Notes:</b>
|
||||
<%= notes %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Up:</b>
|
||||
<%= up %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Down:</b>
|
||||
<%= down %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Done:</b>
|
||||
<%= done %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Position:</b>
|
||||
<%= position %>
|
||||
</p>
|
||||
|
||||
|
||||
<a href="#/index">Back</a>
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
HabitTracker.Views.Habits ||= {}
|
||||
|
||||
class HabitTracker.Views.Habits.ShowView extends Backbone.View
|
||||
template: JST["backbone/templates/habits/show"]
|
||||
|
||||
render: ->
|
||||
$(@el).html(@template(@model.toJSON() ))
|
||||
return this
|
||||
Loading…
Reference in a new issue