Showing 2 changed files with 50 additions and 5 deletions
+6
public/css/common.css
... ...
@@ -77,6 +77,12 @@
77 77
   padding:13px 12px;
78 78
   
79 79
 }
80
+
81
+.pull-command-line {
82
+  border:1px solid #95c97e;
83
+  border-radius:3px;
84
+}
85
+
80 86
 .pull-request-form {
81 87
   border:1px solid #95c97e;
82 88
   border-radius:3px;
+44 -5
templates/pull.html.ep
... ...
@@ -322,9 +322,8 @@
322 322
       
323 323
       % if ($api->can_write_access($session_user_id, $base_user_id, $base_project_id)) {
324 324
         % if ($commits_count && $merge_success && $pull_request->{open}) {
325
-          <form action="<%= url_for %>" method="post">
326
-            <%= hidden_field op => 'merge' %>
327
-            <div class="pull-request-form">
325
+          <div class="pull-request-form">
326
+            <div>
328 327
               <div style="overflow:hidden">
329 328
                 <div style="float:left;padding:10px;padding-right:0">
330 329
                   <div style="width:30px;height:30px;text-align:center;border-radius:15px;background:#95c97e;color:white;padding-top:5px;"><%= "\x{2714}" %></div>
... ...
@@ -341,10 +340,50 @@
341 340
                 </div>
342 341
               </div>
343 342
               <div class="pull-request-form-button">
344
-                <%= submit_button 'Merge pull request', class => "btn btn-success" %>
343
+                <form action="<%= url_for %>" method="post">
344
+                  <%= hidden_field op => 'merge' %>
345
+                  <%= submit_button 'Merge pull request', class => "btn btn-success" %>
346
+                  <span style="margin-left:5px">
347
+                    You can also view <a href="javascript:void(0)" onclick="$('#command-line-instructions').toggle()" >command line instructions</a>.
348
+                  </span>
349
+                </form>
350
+                
351
+                <div id="command-line-instructions">
352
+                  <div style="margin-top:15px;border-top:1px solid #d8d8d8;">
353
+                  <div style="font-size:18px;padding:10px 0">
354
+                    Merging via command line
355
+                  </div>
356
+
357
+                  <div>
358
+                    If you do not want to use the merge button or an automatic merge cannot be performed, you can perform a manual merge on the command line.
359
+                  </div>
360
+                  <div style="margin-top:10px">
361
+                    <button>HTTPS</button> <button>Git</button> <button>Patch</button>
362
+                    <%= text_field clone_url => "https://github.com/kaloyan13/gitprep.git" %>
363
+                  </div>
364
+
365
+                  <div style="margin-top:15px;margin-bottom:5px;">
366
+                    <b>Step 1:</b> From your project repository, check out a new branch and test the changes.
367
+                  </div>
368
+
369
+<pre style="background:#f2f2f2; padding:10px; border-radius:3px">
370
+git checkout -b kaloyan13-master master
371
+git pull https://github.com/kaloyan13/gitprep.git master
372
+</pre>
373
+
374
+                  <div style="margin-top:15px;margin-bottom:5px;">
375
+                    <b>Step 2:</b> Merge the changes and update on GitPrep.
376
+                  </div>
377
+
378
+<pre style="background:#f2f2f2; padding:10px; border-radius:3px">
379
+git checkout master
380
+git merge --no-ff kaloyan13-master
381
+git push origin master
382
+</pre>
383
+                </div>
345 384
               </div>
346 385
             </div>
347
-          </form>
386
+          </div>
348 387
         % }
349 388
         
350 389
         % if ($pull_request->{open}) {