public
Description: probably a waste of time
Clone URL: git://github.com/claude/git_local.git
git_local / views / index.haml
100644 54 lines (51 sloc) 2.195 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
%h1 Git Local
- if @config != {}
%p= "Your repository is located at #{@config['path']}"
- end
 
- if @config == {}
%form{:action => '/create_repo_path', :method => 'post'}
  %h2 Set Up Your Server
  %p
    %label{:for => 'path'} Create a path for your repository:
    %i ie: /Users/your_username/git
    %input#path{:type => 'text', :name => 'path'}
    %label{:for => 'username'} Your ssh username for this machine
    %input#username{:type => 'text', :name => 'username'}
    %input{:type => 'submit', :value => 'Create'}
-end
- unless @config['username'] || @config == {}
%form{:action => '/create_repo_path', :method => 'post'}
  %p
    %label{:for => 'username'} Enter your ssh username for this machine
    %input#username{:type => 'text', :name => 'username'}
    %input#path{:type => 'hidden', :name => 'path', :value => "#{@config['path']}"}
    %input{:type => 'submit', :value => 'Create'}
- end
 
- unless @config == {}
%form{:action => '/add_repo', :method => 'post'}
  %p
    %label{:for => 'name'}Create a new project:
    %input#name{:type => 'text', :name => 'name'}
    %input{:type => 'submit', :value => 'Create'}
- end
 
-if @all_repos
%div#admin_repos
  %h2 Your Projects:
  %ul
    - @all_repos.each do |key,value|
      %li
        %a{:href => "/tree/#{value['formatted_name']}"}= value['name']
        %span
          %a{:href => "##{value['formatted_name']}", :rel => '#facebox'} ?
          %div{:id => "#{value['formatted_name']}", :style => 'display:none;', :class => 'boxy'}
            %p
              %h3= "Push to #{value['name']}"
              If this is a new repository for an existing project in your working tree, you might want to use the command below to add git_local as a remote source for you to push to:
              - text = "[code lang='default']git add remote local #{@config['username']}@#{request.host}:#{value['path']}[/code]"
              #help_text~ Syntaxi.new(text).process
              This way, you can just do
              - text = "[code lang='default']git push local +branch+[/code]"
              #push_text~ Syntaxi.new(text).process
              where +branch+ is the branch you're pushing to
              %i ie: master
-end