Commit 22bb925a40c99f76116c1cfcd47f978503b8b5dc

Authored by Dmitriy Zaporozhets
2 parents e5852d41 59445156

Merge pull request #88 from iamntz/master

small UI changes
app/assets/stylesheets/style.scss
... ... @@ -444,7 +444,24 @@ float: right;
444 444 }
445 445  
446 446 .account-box.hover{height: 138px;}
447   -.account-box.hover .account-links, .account-box.hover .arrow-up{display: block;}
  447 +
  448 +.account-box:hover > .account-links{display: block;}
  449 +header .account-links{background: white; display: none; border-radius: 5px; width: 100px; margin-top: 0; float: right; box-shadow: 0 1px 1px rgba(0,0,0,.2); position:relative;}
  450 +header .account-links:before {
  451 + content: ".";
  452 + width:0;
  453 + height:0;
  454 + position:absolute;
  455 + border:5px solid transparent;
  456 + border-color:rgba(255,255,255,0);
  457 + border-bottom-color:#fafafa;
  458 + text-indent:-9999px;
  459 + top:-10px;
  460 + line-height:0;
  461 + right:10px;
  462 + z-index:10;
  463 +}
  464 +
448 465  
449 466 /* Inspired by http://maxvoltar.com/temp/nowplaying/ */
450 467 header .account-links{background: white; display: none; z-index: 100000; border-radius: 5px; width: 100px; position: absolute; right: 20px; top: 46px; margin-top: 0; float: right; box-shadow: 0 1px 1px rgba(0,0,0,.2); }
... ... @@ -477,18 +494,15 @@ header .account-links a:last-child{
477 494 border-bottom: 0;
478 495 }
479 496  
480   -header a.arrow-up{
481   - display: none;
482   - width: 0;
483   - height: 0;
484   - float: right;
485   - margin-right: 26px;
486   - margin-bottom: 0;
487   - border-left: 5px solid transparent;
488   - border-right: 5px solid transparent;
489   -
490   - border-bottom: 5px solid white;
  497 +#no_ssh_key_defined {
  498 + border:1px solid #ee8801;
  499 + margin:20px;
  500 + padding:20px;
  501 + background:#ffe3f0;
  502 + h2{margin:0;}
  503 + p {margin:10px 0 0;}
491 504 }
  505 +
492 506 /* eo Account Box */
493 507 input.search-input{float: left; text-shadow: none; width: 116px; background-image: url('icon-search.png') ; background-repeat: no-repeat; background-position: 10px; border-radius: 100px; border: 1px solid rgba(0,0,0,.7); box-shadow: 0 1px 0 rgba(255,255,255,.2), 0 2px 2px rgba(0,0,0,.4) inset ; background-color: #D2D5DA; background-color: rgba(255,255,255,.5); padding: 5px; padding-left: 26px; margin-top: 4px; margin-right: 10px }
494 508 input.search-input:focus{ background-color: white; width: 216px;}
... ... @@ -553,7 +567,17 @@ body.project-page h2.icon span{ background-position: -78px -68px; }
553 567 body.project-page .project-container{ position: relative; float: left; width: 100%; height: 100%; }
554 568 body.project-page .page-title{margin-bottom: 0}
555 569 body.project-page .project-sidebar {width: 220px; left: 0; top: 0; height: 100%; bottom: 0; position: absolute; background-color: #f7f7f7; float: left; display: inline-block; background: #f7f7f7; padding: 20px 0 20px 2%; margin: 0; }
556   -body.project-page .project-sidebar input.text.git-url{ font-size: 12px; border-radius: 5px; color: #666; box-shadow: 0 1px 2px rgba(0,0,0,.2) inset; padding: 8px 14px 8px 30px; margin-bottom: 20px; background: white url('images.png') no-repeat 8px -40px;}
  570 +
  571 +body.project-page input.text.git-url,
  572 +body.projects-page input.text.git-url{ font-size: 12px; border-radius: 5px; color: #666; box-shadow: 0 1px 2px rgba(0,0,0,.2) inset; padding: 5px 14px 5px 30px; margin-bottom: 20px; background: white url('images.png') no-repeat 8px -43px;width:100%;border:0;}
  573 +
  574 +body.projects-page input.text.git-url {margin:10px 0 0 }
  575 +
  576 +.git_url_wrapper { margin-right:50px }
  577 +
  578 +.projects_selector:hover > .project-box{ -moz-box-shadow:0px 0px 10px rgba(0, 0, 0, .5); -webkit-box-shadow:0px 0px 10px rgba(0, 0, 0, .5); box-shadow:0px 0px 10px rgba(0, 0, 0, .5); }
  579 +
  580 +
557 581 body.project-page .project-sidebar aside{width: 219px}
558 582 body.project-page .project-sidebar aside a{display: block; position: relative; background: white; padding: 15px 10px; border-bottom: 1px solid #eee}
559 583 body.project-page .project-sidebar aside a:first-child{
... ...
app/views/layouts/_head_panel.html.erb
... ... @@ -8,8 +8,6 @@
8 8 <%= image_tag gravatar_icon(current_user.email) %>
9 9 <% end %>
10 10  
11   - <a href="#" class="arrow-up"></a>
12   -
13 11 <div class="account-links">
14 12 <%= link_to profile_path, :class => "username" do %>
15 13 <%#= current_user.name %>
... ... @@ -50,3 +48,11 @@
50 48 });
51 49 <% end %>
52 50 <% end %>
  51 +
  52 +<% if current_user.keys.all.empty? %>
  53 + <div id="no_ssh_key_defined">
  54 + <h2>ATTENTION!</h2>
  55 + <p>No SSH Key is defined. You won't be able to use any Git command!
  56 + <p>Click <%=link_to( 'here', keys_path ) %> to add one!
  57 + </div>
  58 +<% end %>
53 59 \ No newline at end of file
... ...
app/views/layouts/project.html.haml
... ... @@ -16,7 +16,8 @@
16 16 .project-container
17 17 .project-sidebar
18 18 .fixed
19   - %input.git-url.text{:id => "", :name => "", :readonly => "", :type => "text", :value => @project.url_to_repo, :class => "one_click_select"}
  19 + .git_url_wrapper
  20 + %input.git-url.text{:id => "", :name => "", :readonly => "", :type => "text", :value => @project.url_to_repo, :class => "one_click_select"}
20 21 %aside
21 22 = link_to "History", project_path(@project), :class => current_page?(:controller => "projects", :action => "show", :id => @project) ? "current" : nil
22 23 = link_to "Tree", tree_project_path(@project), :class => current_page?(:controller => "projects", :action => "tree", :id => @project) ? "current" : nil
... ...
app/views/projects/_tile.html.haml
1 1 - @projects.in_groups_of(3, false) do |projects|
2 2 - projects.each_with_index do |project, i|
3   - %div.grid_1
  3 + %div.grid_1.projects_selector
4 4 %div{ :class => "project-box ui-box ui-box-big" }
5 5 = link_to project_path(project) do
6 6 %h3= project.name
7 7 .data
8   - %p.title.repository
  8 + %p.title.repository.git_url_wrapper
9 9 %span Repository:
10   - = project.url_to_repo
  10 + %input{ :value => project.url_to_repo, :class => ['git-url', 'one_click_select', 'text', 'project_list_url'], :readonly => 'readonly' }
11 11 %p.title.activity
12 12 %span Last Activity:
13 13 - last_note = project.notes.last
... ...