Permalink
Browse files

started markup of repo index view

  • Loading branch information...
1 parent 3c166b6 commit a5c4d73c6d58652cc428c2d32b4779168c0fd20f @thomasklemm committed Feb 2, 2012
@@ -38,24 +38,9 @@ def show
end
end
- # GET /repos/new
- # GET /repos/new.json
- def new
- @repo = Repo.new
-
- respond_to do |format|
- format.html # new.html.erb
- format.json { render json: @repo }
- end
- end
-
- # GET /repos/1/edit
- def edit
- @repo = Repo.find(params[:id])
- end
-
# POST /repos
# POST /repos.json
+ # ADD A NEW REPOSITORY VIA BOOKMARKLET OR FORM FIELDS
def create
# Create an empty repo in memory
repo = Repo.new
@@ -107,6 +92,25 @@ def create
end
end
end
+
+=begin
+ # UNUSED METHODS GENERATED VIA SCAFFOLDING
+
+ # GET /repos/new
+ # GET /repos/new.json
+ def new
+ @repo = Repo.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.json { render json: @repo }
+ end
+ end
+
+ # GET /repos/1/edit
+ def edit
+ @repo = Repo.find(params[:id])
+ end
# PUT /repos/1
# PUT /repos/1.json
@@ -135,4 +139,6 @@ def destroy
format.json { head :ok }
end
end
+=end
+
end
@@ -4,15 +4,14 @@
%meta(charset="utf-8")
%title discovery!
-# = stylesheet_link_tag "application"
-
+ = javascript_include_tag "application"
-# Whats nescessary to serve the less css stylesheets
%link(rel="stylesheet/less" href="/stylesheets/less/bootstrap.less")
%link(rel="stylesheet/less" href="/stylesheets/less/foundation.less")
%link(rel="stylesheet/less" href="/stylesheets/less/discovery.less")
%script(src="http://lesscss.googlecode.com/files/less-1.2.1.min.js" type="text/javascript")
- -# = javascript_include_tag "application"
-
+
= csrf_meta_tags
%body
@@ -40,6 +39,9 @@
%a.navitem.active(href="/repos") Repos
- else
%a.navitem(href="/repos") Repos
+
+ - if notice
+ = notice
@@ -1,37 +1,18 @@
-%h1 Listing repos
+.h4 Repos
-%table
- %tr
- %th Ident
- %th Name
- %th Owner
- %th Description
- %th Watchers
- %th Forks
- %th Html url
- %th Homepage
- %th Last updated
- %th Community text
- %th
- %th
- %th
+- @repos.each do |repo|
+ .repo
+ .ident
+ .owner= repo.owner
+ .name= repo.name
+ .description= repo.description
+ .community_text= repo.community_text
+ .watchers= repo.watchers
+ .forks= repo.forks
+ %a.html_url(href="#{ repo.html_url }")
+ %a.homepage(href="#{ repo.homepage }")
+ .acitivity
+ .last_updated= repo.last_updated
+ .activity_wheel
- - @repos.each do |repo|
- %tr
- %td= repo.ident
- %td= repo.name
- %td= repo.owner
- %td= repo.description
- %td= repo.watchers
- %td= repo.forks
- %td= repo.html_url
- %td= repo.homepage
- %td= repo.last_updated
- %td= repo.community_text
- %td= link_to 'Show', repo
- %td= link_to 'Edit', edit_repo_path(repo)
- %td= link_to 'Destroy', repo, :confirm => 'Are you sure?', :method => :delete
-
-%br
-
-= link_to 'New Repo', new_repo_path
+= render(partial: "shared/add_repo")
@@ -0,0 +1,11 @@
+#add_repo
+
+ .h6 Add a new repo
+
+ %form.nice(accept-charset="UTF-8" action="/repos" method="post")
+ %input.input_text(type="text" size="30" name="repo[owner]" placeholder="Owner's Github Name" autocomplete="off")
+ \ /
+ %input.input_text(type="text" size="30" name="repo[name]" placeholder="Repo Name" autocomplete="off")
+
+ %input(type="submit" value="Add repo")
+

0 comments on commit a5c4d73

Please sign in to comment.