### codetube
    Copyright (C) 2011 payload payload@lavabit.com
    Copyright (C) 2011 dodo dodo.the.last@gmail.com

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>
###

project = @content
buttons = [{
    class: 'wiki'
    text : 'W'
    href : '#'},{
    class: 'issues'
    text : '12⚗'
    href : '#'},{
    class: 'forks'
    text : '3⎇'
    href : '#'},{
    class: 'watchers'
    text : '7♻'
    href : '#'}
]
owner_href   = "/#{project.owner.id}"
project_href = "/#{project.owner.id}/#{project.id}"
owner_name   = project.owner.name or project.owner.id

div class: 'project-item', ->
    ###
    ul class: 'btns', ->
        for btn in buttons
            li -> a href: btn.href, ->
                div class: btn.class, -> btn.text
    ###
    div class: 'name', ->
        a class: 'project', href: project_href, -> project.name
        if project.owner.id != @me?.id
            span class: 'by', -> @_(" by ")
            a class: 'owner', href: owner_href, -> owner_name
    div class: 'description', ->
        project.description or @_("no description")

