diff --git a/Gemfile b/Gemfile
index 7fd1a784b..af5c5b47a 100644
--- a/Gemfile
+++ b/Gemfile
@@ -43,8 +43,8 @@ gem 'jquery-rails', '~> 2.0.1'
group :assets do
gem 'sass-rails', '~> 3.2.4'
gem 'coffee-rails', '~> 3.2.2'
+ gem 'compass-rails', '~> 1.0.0.rc.3'
gem 'uglifier', '~> 1.2.1'
- gem 'compass', '~> 0.12.rc.1' # :git => 'git://github.com/chriseppstein/compass.git', :branch => 'rails31'
gem 'therubyracer', '~> 0.9.10'
end
@@ -62,7 +62,6 @@ group :development do
# deploy
gem 'whenever', :require => false
gem 'capistrano', :require => false
- gem 'capistrano-ext', :require => false
gem 'cape', :require => false
gem 'capistrano_colors', :require => false
end
diff --git a/Gemfile.lock b/Gemfile.lock
index e8ae4e140..a5090aea5 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -76,8 +76,6 @@ GEM
net-sftp (>= 2.0.0)
net-ssh (>= 2.0.14)
net-ssh-gateway (>= 1.1.0)
- capistrano-ext (1.2.1)
- capistrano (>= 1.0.0)
capistrano_colors (0.5.5)
chronic (0.6.7)
chunky_png (1.2.5)
@@ -93,6 +91,8 @@ GEM
chunky_png (~> 1.2)
fssm (>= 0.2.7)
sass (~> 3.1)
+ compass-rails (1.0.0.rc.3)
+ compass (~> 0.12.rc.0)
creole (0.4.2)
daemons (1.1.6)
delayed_job (3.0.1)
@@ -111,7 +111,7 @@ GEM
execjs (1.3.0)
multi_json (~> 1.0)
expression_parser (0.9.0)
- factory_girl (2.6.0)
+ factory_girl (2.6.1)
activesupport (>= 2.3.9)
factory_girl_rails (1.7.0)
factory_girl (~> 2.6.0)
@@ -304,10 +304,9 @@ DEPENDENCIES
cancan (~> 1.6.7)
cape
capistrano
- capistrano-ext
capistrano_colors
coffee-rails (~> 3.2.2)
- compass (~> 0.12.rc.1)
+ compass-rails (~> 1.0.0.rc.3)
creole
daemons (= 1.1.6)
delayed_job_active_record (~> 0.3.2)
diff --git a/app/assets/images/error-arrow.png b/app/assets/images/error-arrow.png
new file mode 100644
index 000000000..3e2e9734f
Binary files /dev/null and b/app/assets/images/error-arrow.png differ
diff --git a/app/assets/javascripts/design/radio.js b/app/assets/javascripts/design/radio.js
index 31650da65..179027de2 100644
--- a/app/assets/javascripts/design/radio.js
+++ b/app/assets/javascripts/design/radio.js
@@ -76,7 +76,8 @@ function changeRadioStart(el) {
}
el.next().bind("mousedown", function(e) {
- changeRadio($(this))
+ changeRadio($(this));
+ $(this).find("input:radio").change();
});
if($.browser.msie) {
el.next().find("input").eq(0).bind("click", function(e) {
diff --git a/app/assets/javascripts/login.js b/app/assets/javascripts/login.js
index 975ee33d8..74dbb2e36 100644
--- a/app/assets/javascripts/login.js
+++ b/app/assets/javascripts/login.js
@@ -1,55 +1,23 @@
-function disError(elem) {
- $("#hint").fadeOut("fast");
- if (document.getElementById("user_login").className=="registartion-input-error") {
- if (this.id=="user_login") {
- document.getElementById("user_login").className="registartion-input-focus";
- } else {
- document.getElementById("user_login").className="registartion-input-no-focus";
- }
- }
- if (document.getElementById("user_password").className=="registartion-input-error") {
- if (this.id=="user_password") {
- document.getElementById("user_password").className="registartion-input-focus";
- } else {
- document.getElementById("user_password").className="registartion-input-no-focus";
- }
- }
- buttonCheck();
-}
+//= require jquery
-function buttonCheck() {
- var login_default = document.getElementById("login_default").value;
- var pass_default = document.getElementById("password_default").value;
- if ((document.getElementById("user_login").value!="")&&(document.getElementById("user_login").value!=login_default)&&
- (document.getElementById("user_password").value!="")&&(document.getElementById("user_password").value!=pass_default)) {
- document.getElementById("btnLogin").className = "button";
- } else {
- document.getElementById("btnLogin").className = "button disabled";
- }
-}
+$(document).ready(function() {
+ var login_default = $('#login_default').val();
+ var pass_default = $('#password_default').val();
-function changeCheck(el) {
- var el = el,
- input = el.getElementsByTagName("input")[0];
+ $('.registartion-input').live('keydown', function() {
+ var id = $(this).attr('id');
+ if(id == 'user_login' || id == 'user_password') { id = 'login_error'}
+ $('.error.'+id).fadeOut('slow');
+ }).live('focus', function() {
+ var id = $(this).attr('id');
+ if(id == 'user_login' && $(this).val() == login_default) { $(this).val('')}
+ else if(id == 'user_password' && $(this).val() == pass_default) { $(this).val('')}
+ $(this).addClass('registartion-input-focus').removeClass('registartion-input-error');
+ }).live('blur', function() {
+ var id = $(this).attr('id');
+ if(id == 'user_login' && $(this).val() == '') { $(this).val(login_default)}
+ else if(id == 'user_password' && $(this).val() == '') { $(this).val(pass_default)}
+ $(this).addClass('registartion-input-no-focus').removeClass('registartion-input-focus');
+ });
- if(input.checked) {
- el.style.backgroundPosition="0 0";
- input.checked=false;
- }
- else {
- el.style.backgroundPosition="0 -17px";
- input.checked=true;
- }
- return true;
-}
-
-function startChangeCheck(el) {
- var el = el,
- input = el.getElementsByTagName("input")[0];
- if(input.checked) { el.style.backgroundPosition="0 -17px"; }
- return true;
-}
-
-function startCheck() {
- startChangeCheck(document.getElementById("niceCheckbox1"));
-}
\ No newline at end of file
+});
diff --git a/app/assets/stylesheets/design/common.scss b/app/assets/stylesheets/design/common.scss
index c0b24ccf6..991c793d9 100644
--- a/app/assets/stylesheets/design/common.scss
+++ b/app/assets/stylesheets/design/common.scss
@@ -1,17 +1,27 @@
@import 'compass/utilities/tables';
-
table.info {
width: 100%;
border-spacing: 0;
td {padding: 5px;}
}
-
table.columns2 {
@include inner-table-borders;
th.first, td.first {width: 30%;}
}
-
table.columns3 {
@include alternating-rows-and-columns(#eee, #ccc, #000);
th.first, td.first, th.last, td.last {width: 30%;}
}
+
+@import 'blueprint/interaction';
+.flash {
+ .notice {
+ @include success;
+ }
+ .warning {
+ @include notice;
+ }
+ .error, .alert {
+ @include error;
+ }
+}
diff --git a/app/assets/stylesheets/design/custom.scss b/app/assets/stylesheets/design/custom.scss
index 51240598b..75a786165 100644
--- a/app/assets/stylesheets/design/custom.scss
+++ b/app/assets/stylesheets/design/custom.scss
@@ -283,6 +283,8 @@ div.comment div.comment-right {
float: right;
}
+div.comment textarea { resize: none }
+
#repo-wrapper div.file div.data .formatted {
overflow-x: auto;
overflow-y: none;
@@ -299,7 +301,7 @@ table.tablesorter tbody td a .issue_title {
#output.formatted {
width: auto;
font-family: "Consolas","Bitstream Vera Sans Mono","Courier New",Courier,monospace;
- padding: 10px 5px;
+ padding: 10px 5px 0px;
margin-left: 45px;
}
diff --git a/app/assets/stylesheets/devise/login.scss b/app/assets/stylesheets/devise/login.scss
new file mode 100644
index 000000000..94babbb81
--- /dev/null
+++ b/app/assets/stylesheets/devise/login.scss
@@ -0,0 +1,326 @@
+html, body {
+ margin: 0;
+ padding: 0;
+ font-family: Tahoma, Geneva, Helvetica, sans-serif;
+ color: #565667;
+ background: #1f60a1 image-url("bg.png") repeat-x;
+ min-width: 940px;
+ min-height: 300px;
+ text-align: center;
+ height: 100%;
+}
+
+header, section, footer, aside, nav, article, menu {
+ display: block;
+}
+
+input[type="text"]:focus { outline: none; }
+
+input[type="password"]:focus { outline: none; }
+
+input:focus { outline: none; }
+
+select:focus { outline: none; }
+
+a img { border: none; }
+
+.wrap {
+ width: 940px;
+ margin: 0 auto;
+ text-align: center;
+ min-height: 95%;
+}
+
+.both {
+ clear: both;
+}
+
+
+/* Header */
+
+header div.logo {
+ background: image-url("logo.png") no-repeat 50% 100%;
+ height: 89px;
+ width: 233px;
+ margin: 0 auto;
+ text-align: center;
+ padding-top: 12%;
+}
+
+header div.text {
+ color: #FFF;
+ font-size: 28px;
+ width: 800px;
+ text-align: left;
+ margin-left: 90px;
+ margin-top: 50px;
+ font-family: Arial;
+ text-shadow: 0px 1px 1px #000000;
+ filter: dropshadow(color=#000000, offx=0, offy=1);
+ padding-left: 0px;
+}
+
+.niceCheck {
+ width: 17px;
+ height: 17px;
+ display: inline-block;
+ cursor: pointer;
+ background: image-url("checkbox.png");
+}
+.niceCheck input {
+ display: none;
+}
+
+/* Content */
+
+article {
+ width: 257px;
+ height: 227px;
+ background: #1c394c image-url("bg-signup.png") repeat-x;
+ border-radius: 5px;
+ border: 1px solid #38658c;
+ margin: 0 auto;
+ text-align: center;
+ margin-top: 75px;
+ -webkit-box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.5);
+ -moz-box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.5);
+ box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.5);
+}
+
+a.button, input.button {
+ background: #125687;
+ background: image-url("button-green-normal.png");
+ border-radius: 3px;
+ color: #FFF;
+ font-family: Tahoma;
+ font-size: 12px;
+ -webkit-font-smoothing: antialiased;
+ font-weight: normal;
+ padding: 5px 25px;
+ text-align: center;
+ border: none;
+ height: 25px;
+ width: 106px;
+ text-decoration: none;
+}
+
+input.button {
+ padding: 3px 27px 8px 27px;
+ height: 25px;
+ width: auto;
+}
+
+a.button:hover, input.button:hover {
+ background: #1874b6;
+ background: image-url("button-green-hover.png");
+ cursor: pointer;
+}
+
+a.button:active, input.button:active{
+ background: image-url("button-green-press.png");
+}
+
+a.button:disabled, a.button.disabled, input.button:disabled, input.button.disabled {
+ background: #125687;
+ background: image-url("button-green-disabled.png");
+ cursor: default;
+ }
+
+article h1 {
+ color: #FFF;
+ font-size: 18px;
+ font-weight: normal;
+ font-family: Tahoma;
+ margin-bottom: 5px;
+}
+
+.registartion-input, .registartion-input-focus, .registartion-input-error, .registartion-input-no-focus {
+ height: 24px;
+ width: 217px;
+ border: 1px solid #8199a9;
+ border-radius: 2px;
+ color: #cfcfcf;
+ font-family: Tahoma;
+ font-size: 12px;
+ padding-left: 10px;
+ margin-top: 10px;
+}
+
+.registartion-input-focus, .registartion-input-focus-signup {
+ color: #575756;
+ -webkit-box-shadow: 0px 0px 7px 2px rgba(126, 183, 237, 0.75);
+ -moz-box-shadow: 0px 0px 7px 2px rgba(126, 183, 237, 0.75);
+ box-shadow: 0px 0px 7px 2px rgba(126, 183, 237, 0.75);
+}
+
+.registartion-input-no-focus, .registartion-input-no-focus-signup {
+ color: #575756;
+}
+
+.registartion-input-error, .registartion-input-error-signup {
+ border: 1px solid #bd4d40;
+ outline:1px solid #bd4d40;
+ outline-offset:-2px;
+}
+
+div.registration div.remember{
+ color: #FFF;
+ font-size: 12px;
+ float: left;
+ padding-left: 15px;
+ padding-top: 5px;
+}
+
+div.registration div.remember div.check {
+ float: left;
+ margin-top: 15px;
+ margin-right: 4px;
+}
+
+div.registration div.remember div.text {
+ float: left;
+ margin-top: 15px;
+}
+
+div.registration div.in {
+ float: right;
+ padding-right: 15px;
+ padding-top: 15px;
+}
+
+div.hr {
+ margin-top: 10px;
+ height: 1px;
+ width: 100%;
+ border-bottom: 1px solid #264862;
+ border-top: 1px solid #264862;
+}
+
+article div.other div.left{
+ float: left;
+ font-size: 12px;
+ color: #FFFFFF;
+ margin-top: 6px;
+ margin-left: 15px;
+}
+
+article div.other div.right {
+ float: right;
+ margin-right: 15px;
+ margin-top: 13px;
+}
+
+div.forgot {
+ width: 257px;
+ text-align: center;
+ margin: 0 auto;
+}
+div.password {
+ float: right;
+ padding-top: 4px;
+}
+
+div.password p {
+ margin: 0;
+ padding: 0;
+}
+
+div.password a {
+ color: #FFF;
+ font-size: 12px;
+ text-decoration: none;
+}
+
+div.password a:hover {
+ text-decoration: underline;
+}
+
+nav {
+ width: 96px;
+ height: 47px;
+ background: image-url("registration.png") no-repeat;
+ float: right;
+ cursor: pointer;
+}
+
+nav p {
+ font-size: 14px;
+ color: #FFF;
+ margin: 0;
+ padding: 0;
+ padding-top: 10px;
+}
+
+div.error {
+ width: auto;
+ height: auto;
+ font-size: 12px;
+ position: absolute;
+ margin-top: -159px;
+ margin-left: 582px;
+ display: none;
+}
+
+div.error div.img {
+ background: image-url("error-arrow.png") 0% 5px no-repeat;
+ width: 19px;
+ height: 35px;
+ float: left;
+}
+
+
+div.error div.msg {
+ background: #ededed;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+ width: auto;
+ height: auto;
+ float: left;
+ -webkit-box-shadow: 0px 6px 3px -3px rgba(0, 0, 0, 0.2);
+ -moz-box-shadow: 0px 6px 3px -3px rgba(0, 0, 0, 0.2);
+ box-shadow: 0px 6px 3px -3px rgba(0, 0, 0, 0.2);
+ padding: 5px 20px 5px;
+}
+
+
+
+div.error p{
+ margin:0;
+ padding: 0;
+ text-align: center;
+}
+
+/* Footer */
+
+footer {
+ height: 32px;
+ padding-left: 15px;
+ width: 900px;
+ margin: 0 auto;
+ text-align: center;
+}
+
+footer ul {
+ margin: 0;
+ padding: 0;
+ list-style: none;
+ font-size: 12px;
+ color: #FFF;
+ padding-top: 10px;
+ text-align: center;
+}
+
+footer ul li {
+ display: inline;
+}
+
+footer ul li a {
+ font-size: 12px;
+ color: #FFF;
+ text-decoration: none;
+}
+
+footer ul li a:hover {
+ text-decoration: underline;
+}
\ No newline at end of file
diff --git a/app/assets/stylesheets/devise/registration.scss b/app/assets/stylesheets/devise/registration.scss
index 098b9021b..5d7458f9b 100644
--- a/app/assets/stylesheets/devise/registration.scss
+++ b/app/assets/stylesheets/devise/registration.scss
@@ -1,223 +1,285 @@
html, body {
- margin: 0;
- padding: 0;
- font-family: Tahoma, Geneva, Helvetica, sans-serif;
- color: #565667;
- background: #1f60a1 image-url("bg.png") repeat-x;
- min-width: 940px;
- min-height: 300px;
- text-align: center;
- height: 100%; }
+ margin: 0;
+ padding: 0;
+ font-family: Tahoma, Geneva, Helvetica, sans-serif;
+ color: #565667;
+ background: #1f60a1 image-url("bg.png") repeat-x;
+ min-width: 940px;
+ min-height: 300px;
+ text-align: center;
+ height: 100%;
+}
header, section, footer, aside, nav, article, menu {
- display: block; }
+ display: block;
+}
-input {
- &[type="text"]:focus, &[type="password"]:focus, &:focus {
- outline: none; } }
-
-select:focus {
- outline: none; }
-
-a img {
- border: none; }
+input[type="text"]:focus { outline: none; }
+
+input[type="password"]:focus { outline: none; }
+
+input:focus { outline: none; }
+
+select:focus { outline: none; }
+a img { border: none; }
+
.wrap {
- width: 940px;
- margin: 0 auto;
- text-align: center;
- min-height: 95%; }
+ width: 940px;
+ margin: 0 auto;
+ text-align: center;
+ min-height: 95%;
+}
.both {
- clear: both; }
+ clear: both;
+}
+
/* Header */
-header div {
- &.logo {
- background: image-url("logo.png") no-repeat 50% 100%;
- height: 89px;
- width: 233px;
- margin: 0 auto;
- text-align: center;
- padding-top: 12%; }
- &.text {
- color: #FFF;
- font-size: 28px;
- width: 800px;
- text-align: left;
- margin-left: 90px;
- margin-top: 50px;
- font-family: Arial;
- text-shadow: 0px 1px 1px #000000;
- filter: dropshadow(color = black, offx = 0, offy = 1);
- padding-left: 0px; } }
+header div.logo {
+ background: image-url("logo.png") no-repeat 50% 100%;
+ height: 89px;
+ width: 233px;
+ margin: 0 auto;
+ text-align: center;
+ padding-top: 12%;
+}
+
+header div.text {
+ color: #FFF;
+ font-size: 28px;
+ width: 800px;
+ text-align: left;
+ margin-left: 90px;
+ margin-top: 50px;
+ font-family: Arial;
+ text-shadow: 0px 1px 1px #000000;
+ filter: dropshadow(color=#000000, offx=0, offy=1);
+ padding-left: 0px;
+}
.niceCheck {
- width: 17px;
- height: 17px;
- display: inline-block;
- cursor: pointer;
- background: image-url("checkbox.png");
- input {
- display: none; } }
+ width: 17px;
+ height: 17px;
+ display: inline-block;
+ cursor: pointer;
+ background: image-url("checkbox.png");
+}
+.niceCheck input {
+ display: none;
+}
/* Content */
article {
- width: 380px;
- height: 254px;
- background: #1c394c image-url("bg-signup.png") repeat-x;
- border-radius: 5px;
- border: 1px solid #38658c;
- margin: 0 auto;
- text-align: center;
- margin-top: 75px;
- -webkit-box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.5);
- -moz-box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.5);
- box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.5); }
+ width: 380px;
+ height: 254px;
+ background: #1c394c image-url("bg-signup.png") repeat-x;
+ border-radius: 5px;
+ border: 1px solid #38658c;
+ margin: 0 auto;
+ text-align: center;
+ margin-top: 75px;
+ -webkit-box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.5);
+ -moz-box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.5);
+ box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.5);
+}
a.button, input.button {
- background: #125687;
- background: image-url("button-green-normal.png");
- border-radius: 3px;
- color: #FFF;
- font-family: Tahoma;
- font-size: 12px;
- -webkit-font-smoothing: antialiased;
- font-weight: normal;
- padding: 5px 25px;
- text-align: center;
- border: none;
- height: 25px;
- width: 106px;
- text-decoration: none; }
-
-article div {
- &.left {
- float: left;
- font-size: 12px;
+ background: #125687;
+ background: image-url("button-green-normal.png");
+ border-radius: 3px;
color: #FFF;
- margin-left: 15px;
- margin-top: 16px; }
- &.right {
- float: right;
- margin-right: 15px;
- padding-bottom: 2px; } }
+ font-family: Tahoma;
+ font-size: 12px;
+ -webkit-font-smoothing: antialiased;
+ font-weight: normal;
+ padding: 5px 25px;
+ text-align: center;
+ border: none;
+ height: 25px;
+ width: 106px;
+ text-decoration: none;
+}
+
+article div.left {
+ float: left;
+ font-size: 12px;
+ color: #FFF;
+ margin-left: 15px;
+ margin-top: 16px;
+}
+
+article div.right {
+ float: right;
+ margin-right: 15px;
+ padding-bottom: 2px;
+}
.first {
- padding-top: 5px; }
+ padding-top: 5px;
+}
input.button {
- padding: 3px 27px 8px 27px;
- height: 25px;
- width: auto; }
+ padding: 3px 27px 8px 27px;
+ height: 25px;
+ width: auto;
+}
a.button:hover, input.button:hover {
- background: #1874b6;
- background: image-url("button-green-hover.png");
- cursor: pointer; }
+ background: #1874b6;
+ background: image-url("button-green-hover.png");
+ cursor: pointer;
+}
-a.button:active, input.button:active {
- background: image-url("button-green-press.png"); }
+a.button:active, input.button:active{
+ background: image-url("button-green-press.png");
+}
-a.button {
- &:disabled, &.disabled {
+a.button:disabled, a.button.disabled, input.button:disabled, input.button.disabled{
background: #125687;
- background: image-url("button-green-disabled.png");
- cursor: default; } }
-
-input.button {
- &:disabled, &.disabled {
- background: #125687;
- background: image-url("button-green-disabled.png");
- cursor: default; } }
-
+ background: image-url("button-green-disabled.png");
+ cursor: default;
+ }
+
article h1 {
- color: #FFF;
- font-size: 18px;
- font-weight: normal;
- font-family: Tahoma;
- margin-bottom: 5px; }
+ color: #FFF;
+ font-size: 18px;
+ font-weight: normal;
+ font-family: Tahoma;
+ margin-bottom: 5px;
+}
.registartion-input, .registartion-input-focus, .registartion-input-error, .registartion-input-no-focus {
- height: 24px;
- width: 217px;
- border: 1px solid #8199a9;
- border-radius: 2px;
- color: #cfcfcf;
- font-family: Tahoma;
- font-size: 12px;
- padding-left: 10px;
- margin-top: 10px; }
+ height: 24px;
+ width: 217px;
+ border: 1px solid #8199a9;
+ border-radius: 2px;
+ color: #cfcfcf;
+ font-family: Tahoma;
+ font-size: 12px;
+ padding-left: 10px;
+ margin-top: 10px;
+}
.registartion-input-focus, .registartion-input-focus-signup {
- color: #575756;
- -webkit-box-shadow: 0px 0px 7px 2px rgba(126, 183, 237, 0.75);
- -moz-box-shadow: 0px 0px 7px 2px rgba(126, 183, 237, 0.75);
- box-shadow: 0px 0px 7px 2px rgba(126, 183, 237, 0.75); }
+ color: #575756;
+ -webkit-box-shadow: 0px 0px 7px 2px rgba(126, 183, 237, 0.75);
+ -moz-box-shadow: 0px 0px 7px 2px rgba(126, 183, 237, 0.75);
+ box-shadow: 0px 0px 7px 2px rgba(126, 183, 237, 0.75);
+}
.registartion-input-no-focus, .registartion-input-no-focus-signup {
- color: #575756; }
+ color: #575756;
+}
.registartion-input-error, .registartion-input-error-signup {
- border: 1px solid #bd4d40;
- outline: 1px solid #bd4d40;
- outline-offset: -2px; }
+ border: 1px solid #bd4d40;
+ outline:1px solid #bd4d40;
+ outline-offset:-2px;
+}
+
+
div.in {
- float: right;
- margin-right: 15px;
- margin-top: 12px; }
+ float: right;
+ margin-right: 15px;
+ margin-top: 12px;
+}
/* Footer */
footer {
- height: 32px;
- padding-left: 15px;
- width: 900px;
- margin: 0 auto;
- text-align: center;
- ul {
- margin: 0;
- padding: 0;
- list-style: none;
- font-size: 12px;
- color: #FFF;
- padding-top: 10px;
- text-align: center;
- li {
- display: inline;
- a {
- font-size: 12px;
- color: #FFF;
- text-decoration: none;
- &:hover {
- text-decoration: underline; } } } } }
+ height: 32px;
+ padding-left: 15px;
+ width: 900px;
+ margin: 0 auto;
+ text-align: center;
+}
+
+footer ul {
+ margin: 0;
+ padding: 0;
+ list-style: none;
+ font-size: 12px;
+ color: #FFF;
+ padding-top: 10px;
+ text-align: center;
+}
+
+footer ul li {
+ display: inline;
+}
+
+footer ul li a {
+ font-size: 12px;
+ color: #FFF;
+ text-decoration: none;
+}
+
+footer ul li a:hover {
+ text-decoration: underline;
+}
+
div.error {
- background: image-url("error-message.png");
- width: 237px;
- height: 35px;
- font-size: 12px;
- position: absolute;
- margin-top: -159px;
- margin-left: 582px;
- //display: none;
- p {
- margin: 0;
- padding: 0;
- padding-top: 7px;
- text-align: center; }
- &.login {
- margin-top: -242px;
- margin-left: 650px; }
- &.name {
- margin-top: -202px;
- margin-left: 650px; }
- &.email {
- margin-top: -161px;
- margin-left: 650px; }
- &.password {
- margin-top: -101px;
- margin-left: 650px; } }
+ width: auto;
+ height: auto;
+ font-size: 12px;
+ position: absolute;
+ margin-top: -159px;
+ margin-left: 582px;
+ display: none;
+ text-align: left;
+}
+
+div.error div.img {
+ background: image-url("error-arrow.png") 0% 5px no-repeat;
+ width: 19px;
+ height: 35px;
+ float: left;
+}
+
+
+div.error div.msg {
+ background: #ededed;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+ width: auto;
+ height: auto;
+ float: left;
+ -webkit-box-shadow: 0px 6px 3px -3px rgba(0, 0, 0, 0.2);
+ -moz-box-shadow: 0px 6px 3px -3px rgba(0, 0, 0, 0.2);
+ box-shadow: 0px 6px 3px -3px rgba(0, 0, 0, 0.2);
+ padding: 5px 20px 5px;
+}
+
+
+div.error p{
+ margin:0;
+ padding: 0;
+ text-align: center;
+}
+
+div.error.login {
+ margin-top: -242px;
+ margin-left: 650px;
+}
+
+div.error.name {
+ margin-top: -202px;
+ margin-left: 650px;
+}
+
+div.error.email {
+ margin-top: -161px;
+ margin-left: 650px;
+}
+
+div.error.password {
+ margin-top: -101px;
+ margin-left: 650px;
+}
\ No newline at end of file
diff --git a/app/assets/stylesheets/login.scss b/app/assets/stylesheets/login.scss
index 6bd18c38d..6ac3c5092 100644
--- a/app/assets/stylesheets/login.scss
+++ b/app/assets/stylesheets/login.scss
@@ -1,276 +1,3 @@
-html, body {
- margin: 0;
- padding: 0;
- font-family: Tahoma, Geneva, Helvetica, sans-serif;
- color: #565667;
- background: #1f60a1 image-url("bg.png") repeat-x;
- min-width: 940px;
- min-height: 300px;
- text-align: center;
- height: 100%; }
+@import 'devise/login';
-header, section, footer, aside, nav, article, menu {
- display: block; }
-
-input {
- &[type="text"]:focus, &[type="password"]:focus, &:focus {
- outline: none; } }
-
-select:focus {
- outline: none; }
-
-a img {
- border: none; }
-
-.wrap {
- width: 940px;
- margin: 0 auto;
- text-align: center;
- min-height: 95%; }
-
-.both {
- clear: both; }
-
-/* Header */
-
-header div {
- &.logo {
- background: image-url("logo.png") no-repeat 50% 100%;
- height: 89px;
- width: 233px;
- margin: 0 auto;
- text-align: center;
- padding-top: 12%; }
- &.text {
- color: #FFF;
- font-size: 28px;
- width: 800px;
- text-align: left;
- margin-left: 90px;
- margin-top: 50px;
- font-family: Arial;
- text-shadow: 0px 1px 1px #000000;
- filter: dropshadow(color = black, offx = 0, offy = 1);
- padding-left: 0px; } }
-
-.niceCheck {
- width: 17px;
- height: 17px;
- display: inline-block;
- cursor: pointer;
- background: image-url("checkbox.png");
- input {
- display: none; } }
-
-/* Content */
-
-article {
- width: 257px;
- height: 227px;
- background: #1c394c image-url("bg-signup.png") repeat-x;
- border-radius: 5px;
- border: 1px solid #38658c;
- margin: 0 auto;
- text-align: center;
- margin-top: 75px;
- -webkit-box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.5);
- -moz-box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.5);
- box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.5); }
-
-a.button {
- background: #125687;
- background: image-url("button-green-normal.png");
- border-radius: 3px;
- color: #FFF;
- font-family: Tahoma;
- font-size: 12px;
- -webkit-font-smoothing: antialiased;
- font-weight: normal;
- padding: 5px 25px;
- text-align: center;
- border: none;
- height: 25px;
- width: 106px;
- text-decoration: none; }
-
-input.button {
- background: #125687;
- background: image-url("button-green-normal.png");
- border-radius: 3px;
- color: #FFF;
- font-family: Tahoma;
- font-size: 12px;
- -webkit-font-smoothing: antialiased;
- font-weight: normal;
- padding: 5px 25px;
- text-align: center;
- border: none;
- height: 25px;
- width: 106px;
- text-decoration: none;
- padding: 3px 27px 8px 27px;
- height: 25px;
- width: auto; }
-
-a.button:hover, input.button:hover {
- background: #1874b6;
- background: image-url("button-green-hover.png");
- cursor: pointer; }
-
-a.button:active, input.button:active {
- background: image-url("button-green-press.png"); }
-
-a.button {
- &:disabled, &.disabled {
- background: #125687;
- background: image-url("button-green-disabled.png");
- cursor: default; } }
-
-input.button {
- &:disabled, &.disabled {
- background: #125687;
- background: image-url("button-green-disabled.png");
- cursor: default; } }
-
-article h1 {
- color: #FFF;
- font-size: 18px;
- font-weight: normal;
- font-family: Tahoma;
- margin-bottom: 5px; }
-
-.registartion-input, .registartion-input-focus, .registartion-input-error, .registartion-input-no-focus {
- height: 24px;
- width: 217px;
- border: 1px solid #8199a9;
- border-radius: 2px;
- color: #cfcfcf;
- font-family: Tahoma;
- font-size: 12px;
- padding-left: 10px;
- margin-top: 10px; }
-
-.registartion-input-focus, .registartion-input-focus-signup {
- color: #575756;
- -webkit-box-shadow: 0px 0px 7px 2px rgba(126, 183, 237, 0.75);
- -moz-box-shadow: 0px 0px 7px 2px rgba(126, 183, 237, 0.75);
- box-shadow: 0px 0px 7px 2px rgba(126, 183, 237, 0.75); }
-
-.registartion-input-no-focus, .registartion-input-no-focus-signup {
- color: #575756; }
-
-.registartion-input-error, .registartion-input-error-signup {
- border: 1px solid #bd4d40;
- outline: 1px solid #bd4d40;
- outline-offset: -2px; }
-
-div {
- &.registration div {
- &.remember {
- color: #FFF;
- font-size: 12px;
- float: left;
- padding-left: 15px;
- padding-top: 5px;
- div {
- &.check {
- float: left;
- margin-top: 15px;
- margin-right: 4px; }
- &.text {
- float: left;
- margin-top: 15px; } } }
- &.in {
- float: right;
- padding-right: 15px;
- padding-top: 15px; } }
- &.hr {
- margin-top: 10px;
- height: 1px;
- width: 100%;
- border-bottom: 1px solid #264862;
- border-top: 1px solid #264862; } }
-
-article div.other div {
- &.left {
- float: left;
- font-size: 12px;
- color: #FFFFFF;
- margin-top: 6px;
- margin-left: 15px; }
- &.right {
- float: right;
- margin-right: 15px;
- margin-top: 13px; } }
-
-div {
- &.forgot {
- width: 257px;
- text-align: center;
- margin: 0 auto; }
- &.password {
- float: right;
- padding-top: 4px;
- p {
- margin: 0;
- padding: 0; }
- a {
- color: #FFF;
- font-size: 12px;
- text-decoration: none;
- &:hover {
- text-decoration: underline; } } } }
-
-nav {
- width: 96px;
- height: 47px;
- background: image-url("registration.png") no-repeat;
- float: right;
- cursor: pointer;
- a {
- font-size: 14px;
- color: #FFF;
- margin: 0;
- padding: 0;
- padding-top: 10px;
- text-decoration: none;} }
-
-div.error {
- background: image-url("error-message.png");
- width: 237px;
- height: 35px;
- font-size: 12px;
- position: absolute;
- margin-top: -159px;
- margin-left: 582px;
- display: none;
- p {
- margin: 0;
- padding: 0;
- padding-top: 7px;
- text-align: center; } }
-
-/* Footer */
-
-footer {
- height: 32px;
- padding-left: 15px;
- width: 900px;
- margin: 0 auto;
- text-align: center;
- ul {
- margin: 0;
- padding: 0;
- list-style: none;
- font-size: 12px;
- color: #FFF;
- padding-top: 10px;
- text-align: center;
- li {
- display: inline;
- a {
- font-size: 12px;
- color: #FFF;
- text-decoration: none;
- &:hover {
- text-decoration: underline; } } } } }
\ No newline at end of file
+nav a { text-decoration: none;}
\ No newline at end of file
diff --git a/app/controllers/activity_feeds_controller.rb b/app/controllers/activity_feeds_controller.rb
new file mode 100644
index 000000000..b23311937
--- /dev/null
+++ b/app/controllers/activity_feeds_controller.rb
@@ -0,0 +1,7 @@
+class ActivityFeedsController < ApplicationController
+ before_filter :authenticate_user!
+
+ def index
+ @activity_feeds = current_user.activity_feeds.order('created_at DESC')
+ end
+end
diff --git a/app/controllers/categories_controller.rb b/app/controllers/categories_controller.rb
index 3dae0ee00..f7ed16b9d 100644
--- a/app/controllers/categories_controller.rb
+++ b/app/controllers/categories_controller.rb
@@ -19,10 +19,10 @@ class CategoriesController < ApplicationController
if @platform
@categories = Category.select('categories.id, categories.name, categories.ancestry, count(projects.id) projects_count').
joins(:projects => :repositories).where('repositories.platform_id = ?', @platform.id).
- having('count(projects.id) > 0').group('categories.id, categories.name, categories.ancestry, projects_count').default_order
+ having('count(projects.id) > 0').group('categories.id, categories.name, categories.ancestry, projects_count')
render 'index2'
else
- @categories = Category.default_order.paginate(:page => params[:page])
+ @categories = Category.paginate(:page => params[:page])
end
end
diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb
index d802e9a0d..9953154da 100644
--- a/app/controllers/comments_controller.rb
+++ b/app/controllers/comments_controller.rb
@@ -75,7 +75,7 @@ class CommentsController < ApplicationController
def find_comment
@comment = Comment.find(params[:id])
- if @comment.commentable_type == 'Grit::Commit'
+ if @comment.commit_comment?
@comment.project = @project
@comment.helper
end
diff --git a/app/controllers/git/blobs_controller.rb b/app/controllers/git/blobs_controller.rb
index 33bafb823..a355a17c3 100644
--- a/app/controllers/git/blobs_controller.rb
+++ b/app/controllers/git/blobs_controller.rb
@@ -6,7 +6,7 @@ class Git::BlobsController < Git::BaseController
before_filter :set_path_blob
def show
- redirect_to project_repo_path(@project) and return unless @blob.present?
+ redirect_to project_path(@project) and return unless @blob.present?
if params[:raw]
image_url = Rails.root.to_s + "/" + @path
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb
index 0ff9ec811..c1effe3dd 100644
--- a/app/controllers/groups_controller.rb
+++ b/app/controllers/groups_controller.rb
@@ -11,12 +11,7 @@ class GroupsController < ApplicationController
autocomplete :group, :uname
def index
- puts parent.inspect
- @groups = if parent? and !parent.nil?
- parent.groups
- else
- Group
- end.accessible_by(current_ability)
+ @groups = current_user.groups#accessible_by(current_ability)
@groups = if params[:query]
@groups.where(["name LIKE ?", "%#{params[:query]}%"])
@@ -40,18 +35,14 @@ class GroupsController < ApplicationController
def create
@group = Group.new params[:group]
- @group.owner = if parent? and parent.is_a? User
- parent
- else
- current_user
- end
+ @group.owner = current_user
if @group.save
flash[:notice] = t('flash.group.saved')
redirect_to group_path(@group)
else
flash[:error] = t('flash.group.save_error')
- flash[:warning] = @group.errors[:base]
+ flash[:warning] = @group.errors.full_messages.join('. ')
render :action => :new
end
end
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index 2d3f13cf5..71812a6df 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -3,15 +3,13 @@ class IssuesController < ApplicationController
NON_RESTFUL_ACTION = [:create_label, :update_label, :destroy_label, :search_collaborators]
before_filter :authenticate_user!
- load_and_authorize_resource :project, :except => NON_RESTFUL_ACTION
- load_and_authorize_resource :issue, :through => :project, :find_by => :serial_id, :only => [:show, :edit, :update, :destroy]
+ load_resource :project
+ load_and_authorize_resource :issue, :through => :project, :find_by => :serial_id, :only => [:show, :edit, :update, :destroy, :new, :create]
before_filter :load_and_authorize_label, :only => NON_RESTFUL_ACTION
layout 'application'
def index(status = 200)
- logger.debug "!!!!!!!!!!!!!!!!!!"
- logger.debug "request format is #{request.format}"
@is_assigned_to_me = params[:filter] == 'to_me'
@status = params[:status] == 'closed' ? 'closed' : 'open'
@labels = params[:labels] || []
@@ -36,17 +34,16 @@ class IssuesController < ApplicationController
end
def new
- @issue = Issue.new(:project => @project)
+ @issue = @project.issues.new
end
def create
@user_id = params[:user_id]
@user_uname = params[:user_uname]
- @issue = Issue.new(params[:issue])
+ @issue = @project.issues.new(params[:issue])
@issue.creator_id = current_user.id
@issue.user_id = @user_id
- @issue.project_id = @project.id
if @issue.save
@issue.subscribe_creator(current_user.id)
@@ -67,9 +64,7 @@ class IssuesController < ApplicationController
status = 200 if @issue.save
render action, :status => (status || 500), :layout => false
else
- @issue.title = params[:issue][:title]
- @issue.body = params[:issue][:body]
- status = 200 if @issue.save
+ status = 200 if @issue.update_attributes(params[:issue])
render :nothing => true, :status => (status || 500), :layout => false
end
end
@@ -112,7 +107,6 @@ class IssuesController < ApplicationController
private
def load_and_authorize_label
- @project = Project.find(params[:project_id])
@label = Label.find(params[:label_id]) if params[:label_id]
authorize! :write, @project
end
diff --git a/app/controllers/members_controller.rb b/app/controllers/members_controller.rb
index 8d22c69f3..9d9f8ce1f 100644
--- a/app/controllers/members_controller.rb
+++ b/app/controllers/members_controller.rb
@@ -23,56 +23,60 @@ class MembersController < ApplicationController
@user = User.find params[:id]
render :edit_rights and return
end
+ @group = parent
end
def create
end
def update
- all_user_ids = []
- Relation::ROLES.each { |r|
- all_user_ids = all_user_ids | params[r.to_sym].keys if params[r.to_sym]
- }
+ params['user'].keys.each { |user_id|
+ role = params['user'][user_id]
- # Remove relations
- users_for_removing = parent.members.select do |u|
- !all_user_ids.map{|k| k.to_i}.include? u.id and parent.owner != u
- end
- users_for_removing.each do |u|
- Relation.by_object(u).by_target(parent).each {|r| r.destroy}
- end
-
- # Create relations
- Relation::ROLES.each { |r|
- #users_for_creating = users_for_creating params[:user].keys.map{|p| p.to_i} - @project.collaborators.map(&:id)
- params[r.to_sym].keys.each { |u|
- if relation = parent.objects.find_by_object_id_and_object_type(u, 'User')
- relation.update_attribute(:role, r)
- else
- relation = parent.objects.build(:object_id => u, :object_type => 'User', :role => r)
- puts relation.inspect
- puts r
- relation.save!
- end
- } if params[r.to_sym]
- }
+ if relation = parent.objects.find_by_object_id_and_object_type(user_id, 'User')
+ relation.update_attribute(:role, role)
+ else
+ relation = parent.objects.build(:object_id => user_id, :object_type => 'User', :role => role)
+ relation.save!
+ end
+ } if params['user']
if parent.save
flash[:notice] = t("flash.members.successfully_changed")
else
flash[:error] = t("flash.members.error_in_changing")
end
- redirect_to parent_path
+
+ redirect_to edit_group_members_path(parent)
end
- def destroy
+ def remove
+ if params[:id]
+ u = User.find(params[:id])
+ Relation.by_object(u).by_target(parent)[0].destroy
+
+ redirect_to groups_path
+ else
+ all_user_ids = []
+
+ params['user_remove'].keys.each { |user_id|
+ all_user_ids << user_id if params['user_remove'][user_id] == ["1"]
+ } if params['user_remove']
+
+ all_user_ids.each do |user_id|
+ u = User.find(user_id)
+ Relation.by_object(u).by_target(parent).each {|r| r.destroy}
+ end
+
+ redirect_to edit_group_members_path(parent)
+ end
end
def add
if params['user_id'] and !params['user_id'].empty?
@user = User.find_by_uname(params['user_id'])
unless parent.objects.exists? :object_id => @user.id, :object_type => 'User'
- relation = parent.objects.build(:object_id => @user.id, :object_type => 'User', :role => 'reader')
+ relation = parent.objects.build(:object_id => @user.id, :object_type => 'User', :role => params[:role])
if relation.save
flash[:notice] = t("flash.members.successfully_added")
else
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index ecc700762..738bdf950 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -52,7 +52,7 @@ class ProjectsController < ApplicationController
redirect_to @project
else
flash[:error] = t('flash.project.save_error')
- flash[:warning] = @project.errors[:base]
+ flash[:warning] = @project.errors.full_messages.join('. ')
render :action => :new
end
end
diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb
index 7364f1943..fd398d1aa 100644
--- a/app/controllers/wiki_controller.rb
+++ b/app/controllers/wiki_controller.rb
@@ -256,6 +256,7 @@ class WikiController < ApplicationController
# @committer.after_commit do |committer, sha1|
# here goes callback for notification
# end
+ ActivityFeedObserver.instance.after_create(@committer).delay
@committer
end
diff --git a/app/helpers/activity_feeds_helper.rb b/app/helpers/activity_feeds_helper.rb
new file mode 100644
index 000000000..f3facbf94
--- /dev/null
+++ b/app/helpers/activity_feeds_helper.rb
@@ -0,0 +1,5 @@
+module ActivityFeedsHelper
+ def render_activity_feed(activity_feed)
+ render :partial => activity_feed.partial, :locals => activity_feed.data
+ end
+end
diff --git a/app/helpers/devise_helper.rb b/app/helpers/devise_helper.rb
new file mode 100644
index 000000000..2369c4632
--- /dev/null
+++ b/app/helpers/devise_helper.rb
@@ -0,0 +1,21 @@
+# -*- encoding : utf-8 -*-
+module DeviseHelper
+ def getDeviseErrors(*name)
+ res = Array.new(name.count)
+ resource.errors.each do |attr, message|
+ if index = name.index(attr)
+ res[index] = message
+ end
+ end
+ res
+ end
+
+ def showDeviseHintError(name, error, additional_class = '')
+ if error
+ "
".html_safe
+ end
+ end
+end
diff --git a/app/helpers/git_helper.rb b/app/helpers/git_helper.rb
index 45b8cd030..7ea91820f 100644
--- a/app/helpers/git_helper.rb
+++ b/app/helpers/git_helper.rb
@@ -74,18 +74,20 @@ module GitHelper
# TODO This is very dirty hack. Maybe need to be changed.
def branch_selector_options(project)
- tmp = params
+ tmp = params.dup
unless tmp['treeish'].present?
tmp.merge!('project_id' => project.id, 'treeish' => project.default_branch).delete('id')
end
+ tmp.delete('treeish') if tmp['commit_hash'].present?
res = {}
current = url_for(tmp).split('?', 2).first
+ tmp['commit_hash'] = truncate(tmp['commit_hash'], :length => 20) if tmp['commit_hash']
res = project.branches.inject(res) do |h, branch|
- h[branch.name] = url_for(tmp.merge('treeish' => branch.name)).split('?', 2).first
+ h[truncate(branch.name, :length => 20)] = url_for(tmp.merge('treeish' => branch.name)).split('?', 2).first
h
end
- res.merge!(tmp['treeish'] => current)
+ res.merge!(tmp['commit_hash'] || tmp['treeish'] => current)
options_for_select(res.sort, current).html_safe
end
diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb
index 6609ac427..82b8be5b8 100644
--- a/app/mailers/user_mailer.rb
+++ b/app/mailers/user_mailer.rb
@@ -13,7 +13,7 @@ class UserMailer < ActionMailer::Base
def new_comment_notification(comment, user)
@user = user
@comment = comment
- mail(:to => user.email, :subject => I18n.t("notifications.subjects.new_#{comment.commentable.class == Grit::Commit ? 'commit_' : ''}comment_notification")) do |format|
+ mail(:to => user.email, :subject => I18n.t("notifications.subjects.new_#{comment.commit_comment? ? 'commit_' : ''}comment_notification")) do |format|
format.html
end
end
diff --git a/app/models/activity_feed.rb b/app/models/activity_feed.rb
new file mode 100644
index 000000000..934ef56ea
--- /dev/null
+++ b/app/models/activity_feed.rb
@@ -0,0 +1,9 @@
+class ActivityFeed < ActiveRecord::Base
+ belongs_to :user
+
+ serialize :data
+
+ def partial
+ 'activity_feeds/partials/' + self.kind
+ end
+end
diff --git a/app/models/activity_feed_observer.rb b/app/models/activity_feed_observer.rb
new file mode 100644
index 000000000..d6dad75b0
--- /dev/null
+++ b/app/models/activity_feed_observer.rb
@@ -0,0 +1,121 @@
+class ActivityFeedObserver < ActiveRecord::Observer
+ observe :issue, :comment, :user
+
+ def after_create(record)
+ case record.class.to_s
+ when 'User'
+ ActivityFeed.create(
+ :user => record,
+ :kind => 'new_user_notification',
+ :data => {:user_name => record.name, :user_email => record.email}
+ )
+
+ when 'Issue'
+ recipients = record.collect_recipient_ids
+ recipients.each do |recipient_id|
+ recipient = User.find(recipient_id)
+ UserMailer.delay.new_issue_notification(record, recipient) if User.find(recipient).notifier.can_notify && User.find(recipient).notifier.new_issue
+ ActivityFeed.create(
+ :user => recipient,
+ :kind => 'new_issue_notification',
+ :data => {:user_name => recipient.name, :issue_serial_id => record.serial_id, :issue_title => record.title, :project_id => record.project.id, :project_name => record.project.name}
+ )
+ end
+
+ if record.user_id_was != record.user_id
+ UserMailer.delay.issue_assign_notification(record, record.user) if record.user.notifier.issue_assign && record.user.notifier.can_notify
+ ActivityFeed.create(
+ :user => record.user,
+ :kind => 'issue_assign_notification',
+ :data => {:user_name => record.user.name, :issue_serial_id => record.serial_id, :project_id => record.project.id, :issue_title => record.title}
+ )
+ end
+
+ when 'Comment'
+ if record.commentable.class == Issue
+ subscribes = record.commentable.subscribes.finder_hack
+ subscribes.each do |subscribe|
+ if record.user_id != subscribe.user_id
+ UserMailer.delay.new_comment_notification(record, subscribe.user) if record.can_notify_on_new_comment?(subscribe)
+ ActivityFeed.create(
+ :user => subscribe.user,
+ :kind => 'new_comment_notification',
+ :data => {:user_name => subscribe.user.name, :comment_body => record.body, :issue_title => record.commentable.title,
+ :issue_serial_id => record.commentable.serial_id, :project_id => record.commentable.project.id}
+ )
+ end
+ end
+ elsif record.commit_comment?
+ subscribes = Subscribe.comment_subscribes(record).where(:status => true)
+ subscribes.each do |subscribe|
+ next if record.own_comment?(subscribe.user)
+ UserMailer.delay.new_comment_notification(record, subscribe.user) if subscribe.user.notifier.can_notify
+ ActivityFeed.create(
+ :user => subscribe.user,
+ :kind => 'new_comment_commit_notification',
+ :data => {:user_name => subscribe.user.name, :comment_body => record.body, :commit_message => record.commentable.message.encode_to_default,
+ :commit_id => record.commentable.id, :project_id => record.project.id}
+ )
+ end
+ end
+
+ when 'GitHook'
+ change_type = record.change_type
+ branch_name = record.refname.match(/\/([\w\d]+)$/)[1]
+ #user_name = record.
+
+ #owner = record.owner
+ project = Project.find_by_name(record.repo)
+
+ last_commits = project.git_repository.repo.log(branch_name, nil).first(3).collect do |commit| #:author => 'author'
+ [commit.sha, commit.message]
+ end
+
+ if change_type == 'delete'
+ kind = 'git_delete_branch_notification'
+ options = {:project_id => project.id, :project_name => project.name, :branch_name => branch_name, :change_type => change_type}
+ else
+ kind = 'git_new_push_notification'
+ options = {:project_id => project.id, :project_name => project.name, :last_commits => last_commits, :branch_name => branch_name, :change_type => change_type}
+ end
+
+ project.owner_and_admin_ids.each do |recipient|
+ ActivityFeed.create(
+ :user => User.find(recipient),
+ :kind => kind,
+ :data => options
+ )
+ end
+
+ when 'Gollum::Committer'
+ actor = User.find_by_uname(record.actor.name)
+ project_name = record.wiki.path.match(/\/(\w+)\.wiki\.git$/)[1]
+ project = Project.find_by_name(project_name)
+ commit_sha = record.commit
+ #wiki_name = record.wiki.name
+
+ project.owner_and_admin_ids.each do |recipient|
+ ActivityFeed.create(
+ :user => User.find(recipient),#record.user,
+ :kind => 'wiki_new_commit_notification',
+ :data => {:user_id => actor.id, :user_name => actor.name, :project_id => project.id, :project_name => project_name, :commit_sha => commit_sha}
+ )
+ end
+ end
+ end
+
+ def after_update(record)
+ case record.class.to_s
+ when 'Issue'
+ if record.user_id_was != record.user_id
+ UserMailer.delay.issue_assign_notification(record, record.user) if record.user.notifier.issue_assign && record.user.notifier.can_notify
+ ActivityFeed.create(
+ :user => record.user,
+ :kind => 'issue_assign_notification',
+ :data => {:user_name => record.user.name, :issue_serial_id => record.serial_id, :project_id => record.project.id, :issue_title => record.title}
+ )
+ end
+ end
+ end
+
+end
diff --git a/app/models/comment.rb b/app/models/comment.rb
index 1e5f22530..85382f129 100644
--- a/app/models/comment.rb
+++ b/app/models/comment.rb
@@ -8,9 +8,10 @@ class Comment < ActiveRecord::Base
default_scope order('created_at')
- after_create :invoke_helper, :if => "commentable_type == 'Grit::Commit'"
+ # FIXME
+ after_create :subscribe_on_reply, :unless => lambda {|c| c.commit_comment?}
+ after_create :invoke_helper, :if => lambda {|c| c.commit_comment?}
after_create :subscribe_users
- after_create {|c| Subscribe.new_comment_notification(c)}
def helper
class_eval { def commentable; project.git_repository.commit(commentable_id.to_s(16)); end } if commit_comment?
@@ -24,8 +25,16 @@ class Comment < ActiveRecord::Base
commentable_type == 'Grit::Commit'
end
+ def can_notify_on_new_comment?(subscribe)
+ User.find(subscribe.user).notifier.new_comment && User.find(subscribe.user).notifier.can_notify
+ end
+
protected
+ def subscribe_on_reply
+ self.commentable.subscribes.create(:user_id => self.user_id) if !self.commentable.subscribes.exists?(:user_id => self.user_id)
+ end
+
def invoke_helper
self.helper
end
@@ -33,7 +42,7 @@ class Comment < ActiveRecord::Base
def subscribe_users
if self.commentable.class == Issue
self.commentable.subscribes.create(:user => self.user) if !self.commentable.subscribes.exists?(:user_id => self.user.id)
- elsif self.commentable.class == Grit::Commit
+ elsif self.commit_comment?
recipients = self.project.relations.by_role('admin').where(:object_type => 'User').map &:object # admins
recipients << self.user << User.where(:email => self.commentable.committer.email).first # commentor and committer
recipients << self.project.owner if self.project.owner_type == 'User' # project owner
diff --git a/app/models/group.rb b/app/models/group.rb
index 4e08229c9..1ef70ed0a 100644
--- a/app/models/group.rb
+++ b/app/models/group.rb
@@ -13,14 +13,14 @@ class Group < ActiveRecord::Base
has_many :own_projects, :as => :owner, :class_name => 'Project', :dependent => :destroy
has_many :own_platforms, :as => :owner, :class_name => 'Platform', :dependent => :destroy
- validates :name, :owner, :presence => true
+ validates :owner, :presence => true
validates :uname, :presence => true, :uniqueness => {:case_sensitive => false}, :format => { :with => /^[a-z0-9_]+$/ }
validate { errors.add(:uname, :taken) if User.where('uname LIKE ?', uname).present? }
scope :by_owner, lambda { |owner| where(:owner_id => owner.id) }
scope :by_admin, lambda { |admin| joins(:relations).where(:'relations.role' => 'admin', :'relations.target_id' => admin.id, :'relations.target_type' => 'User') }
- attr_readonly :uname, :own_projects_count
+ attr_readonly :own_projects_count
delegate :ssh_key, :email, :to => :owner
@@ -33,6 +33,10 @@ class Group < ActiveRecord::Base
(by_owner(user) | by_admin(user)).collect { |el| [el.name, el.id] }
end
+ def name
+ uname
+ end
+
protected
def add_owner_to_members
diff --git a/app/models/issue.rb b/app/models/issue.rb
index d38095d86..5fff7f744 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -18,12 +18,9 @@ class Issue < ActiveRecord::Base
after_create :set_serial_id
after_create :subscribe_users
- after_create :deliver_new_issue_notification
- after_create :deliver_issue_assign_notification
- after_update :deliver_issue_assign_notification
after_update :subscribe_issue_assigned_user
- attr_accessible :labelings_attributes, :title, :body, :project, :project_id, :closed_at, :closed_by
+ attr_accessible :labelings_attributes, :title, :body
accepts_nested_attributes_for :labelings, :allow_destroy => true
scope :opened, where(:status => 'open', :closed_by => nil, :closed_at => nil)
@@ -58,6 +55,14 @@ class Issue < ActiveRecord::Base
self.status = 'open'
end
+ def collect_recipient_ids
+ recipients = self.project.relations.by_role('admin').where(:object_type => 'User').map { |rel| rel.read_attribute(:object_id) }
+ recipients = recipients | [self.user_id] if self.user_id
+ recipients = recipients | [self.project.owner_id] if self.project.owner_type == 'User'
+
+ recipients
+ end
+
protected
def set_serial_id
@@ -65,18 +70,6 @@ class Issue < ActiveRecord::Base
self.save!
end
- def deliver_new_issue_notification
- recipients = collect_recipient_ids
- recipients.each do |recipient_id|
- recipient = User.find(recipient_id)
- UserMailer.delay.new_issue_notification(self, recipient) if User.find(recipient).notifier.can_notify && User.find(recipient).notifier.new_issue
- end
- end
-
- def deliver_issue_assign_notification
- UserMailer.delay.issue_assign_notification(self, self.user) if self.user_id_was != self.user_id && self.user.notifier.issue_assign && self.user.notifier.can_notify
- end
-
def subscribe_users
recipients = collect_recipient_ids
recipients.each do |recipient_id|
@@ -85,19 +78,6 @@ class Issue < ActiveRecord::Base
end
end
- def collect_recipient_ids
- recipients = self.project.relations.by_role('admin').where(:object_type => 'User').map { |rel| rel.read_attribute(:object_id) }
- recipients = recipients | [self.user_id] if self.user_id
- recipients = recipients | [self.project.owner_id] if self.project.owner_type == 'User'
-
- # filter by notification settings
- recipients = recipients.select do |recipient|
- User.find(recipient).notifier.new_issue && User.find(recipient).notifier.can_notify
- end
-
- recipients
- end
-
def subscribe_issue_assigned_user
if self.user_id_was != self.user_id
self.subscribes.where(:user_id => self.user_id_was).first.destroy unless self.user_id_was.blank?
diff --git a/app/models/product.rb b/app/models/product.rb
index 536b3dbbf..e52a700f0 100644
--- a/app/models/product.rb
+++ b/app/models/product.rb
@@ -10,7 +10,7 @@ class Product < ActiveRecord::Base
has_attached_file :tar
- validates_attachment_content_type :tar, :content_type => ["application/gnutar", "application/x-compressed", "application/x-gzip", "application/x-bzip", "application/x-bzip2", "application/x-tar"], :message => I18n.t('layout.invalid_content_type')
+ validates_attachment_content_type :tar, :content_type => ["application/gnutar", "application/x-compressed", "application/x-gzip", "application/x-bzip", "application/x-bzip2", "application/x-tar", "application/octet-stream"], :message => I18n.t('layout.invalid_content_type')
validates :name, :presence => true, :uniqueness => {:scope => :platform_id}
scope :recent, order("name ASC")
diff --git a/app/models/product_build_list.rb b/app/models/product_build_list.rb
index f9078f19d..24ee0afab 100644
--- a/app/models/product_build_list.rb
+++ b/app/models/product_build_list.rb
@@ -14,6 +14,7 @@ class ProductBuildList < ActiveRecord::Base
attr_accessor :base_url
after_create :xml_rpc_create
+ after_destroy :xml_delete_iso_container
def container_path
"/downloads/#{product.platform.name}/product/#{id}/"
@@ -34,8 +35,17 @@ class ProductBuildList < ActiveRecord::Base
if result == ProductBuilder::SUCCESS
return true
else
- # return false
- raise "Failed to create product_build_list #{id} inside platform #{product.platform.name} tar url #{tar_url} with code #{result}."
+ raise "Failed to create product_build_list #{id} inside platform #{platform.name} tar url #{tar_url} with code #{result}."
+ end
+ end
+
+ def xml_delete_iso_container
+ result = ProductBuilder.delete_iso_container self
+ if result == ProductBuilder::SUCCESS
+ return true
+ else
+ raise "Failed to destroy product_build_list #{id} inside platform #{platform.name} with code #{result}."
end
end
+
end
diff --git a/app/models/project.rb b/app/models/project.rb
index a77dada77..72b3f57fe 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -204,7 +204,13 @@ class Project < ActiveRecord::Base
def self.process_hook(owner_uname, repo, newrev, oldrev, ref, newrev_type, oldrev_type)
rec = GitHook.new(owner_uname, repo, newrev, oldrev, ref, newrev_type, oldrev_type)
- #ActivityFeedObserver.instance.after_create rec # for example
+ ActivityFeedObserver.instance.after_create rec
+ end
+
+ def owner_and_admin_ids
+ recipients = self.relations.by_role('admin').where(:object_type => 'User').map { |rel| rel.read_attribute(:object_id) }
+ recipients = recipients | [self.owner_id] if self.owner_type == 'User'
+ recipients
end
protected
diff --git a/app/models/subscribe.rb b/app/models/subscribe.rb
index 257d812d0..0ed6e71df 100644
--- a/app/models/subscribe.rb
+++ b/app/models/subscribe.rb
@@ -18,27 +18,6 @@ class Subscribe < ActiveRecord::Base
Subscribe.where(:subscribeable_id => comment.commentable_id, :subscribeable_type => comment.commentable.class.name, :project_id => comment.project)
end
- def self.new_comment_notification(comment)
- commentable_class = comment.commentable.class
- Subscribe.new_comment_issue_notification(comment) if commentable_class == Issue
- Subscribe.new_comment_commit_notification(comment) if commentable_class == Grit::Commit
- end
-
- def self.new_comment_issue_notification(comment)
- comment.commentable.subscribes.finder_hack.each do |subscribe|
- next if comment.own_comment?(subscribe.user) || !subscribe.user.notifier.can_notify
- UserMailer.delay.new_comment_notification(comment, subscribe.user) if subscribe.user.notifier.new_comment_reply
- end
- end
-
- def self.new_comment_commit_notification(comment)
- subscribes = Subscribe.comment_subscribes(comment).where(:status => true)
- subscribes.each do |subscribe|
- next if comment.own_comment?(subscribe.user) || !subscribe.user.notifier.can_notify
- UserMailer.delay.new_comment_notification(comment, subscribe.user)
- end
- end
-
def self.subscribed_to_commit?(project, user, commit)
subscribe = user.subscribes.where(:subscribeable_id => commit.id.hex, :subscribeable_type => commit.class.name, :project_id => project.id).first
return subscribe.subscribed? if subscribe # return status if already subscribe present
@@ -48,12 +27,10 @@ class Subscribe < ActiveRecord::Base
(user.committer?(commit) && user.notifier.new_comment_commit_owner)
end
-
def self.subscribe_to_commit(options)
Subscribe.set_subscribe_to_commit(options, true)
end
-
def self.unsubscribe_from_commit(options)
Subscribe.set_subscribe_to_commit(options, false)
end
diff --git a/app/models/user.rb b/app/models/user.rb
index af11c2fa7..3405adf97 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -11,6 +11,8 @@ class User < ActiveRecord::Base
has_one :notifier, :class_name => 'Settings::Notifier' #:notifier
+ has_many :activity_feeds
+
has_many :authentications, :dependent => :destroy
has_many :build_lists, :dependent => :destroy
has_many :subscribes, :foreign_key => :user_id, :dependent => :destroy
diff --git a/app/presenters/comment_presenter.rb b/app/presenters/comment_presenter.rb
index 9200d774d..44db9899d 100644
--- a/app/presenters/comment_presenter.rb
+++ b/app/presenters/comment_presenter.rb
@@ -30,9 +30,6 @@ class CommentPresenter < ApplicationPresenter
def buttons
project = options[:project]
commentable = options[:commentable]
- puts "PROJECT = " + project.inspect
- puts "COMMENTABLE = " + commentable.inspect
- puts "COMMENT = " + comment.inspect
(ep, dp) = if commentable.class == Issue
[edit_project_issue_comment_path(project, commentable, comment),
project_issue_comment_path(project, commentable, comment)]
diff --git a/app/views/activity_feeds/index.html.haml b/app/views/activity_feeds/index.html.haml
new file mode 100644
index 000000000..838d9a62a
--- /dev/null
+++ b/app/views/activity_feeds/index.html.haml
@@ -0,0 +1,21 @@
+%a{ :name => "comments" }
+.block#block-list
+ .content
+ %h2.title
+ = t("layout.activity_feed.header")
+ .inner
+ %ul.list
+ - @activity_feeds.each do |activity_feed|
+ %li
+ .left
+ = link_to activity_feed.user.uname, user_path(activity_feed.user.uname)
+ %br
+ %br
+ = activity_feed.created_at
+ %br
+ %br
+ .item
+ = render_activity_feed(activity_feed)
+ %br
+ %br
+ %br
diff --git a/app/views/activity_feeds/partials/_git_delete_branch_notification.haml b/app/views/activity_feeds/partials/_git_delete_branch_notification.haml
new file mode 100644
index 000000000..10acc1d61
--- /dev/null
+++ b/app/views/activity_feeds/partials/_git_delete_branch_notification.haml
@@ -0,0 +1,3 @@
+%p== Branch #{ branch_name } has been deleted
+
+%p== Into project #{ link_to(project_name, project_path(project_id)) }
diff --git a/app/views/activity_feeds/partials/_git_new_push_notification.haml b/app/views/activity_feeds/partials/_git_new_push_notification.haml
new file mode 100644
index 000000000..46a62e834
--- /dev/null
+++ b/app/views/activity_feeds/partials/_git_new_push_notification.haml
@@ -0,0 +1,7 @@
+%p== Branch #{ branch_name } has been #{ change_type }d
+%p== Into project #{ link_to(project_name, project_path(project_id)) }
+
+- last_commits.each do |commit|
+ = link_to commit[0], commit_path(project_id, commit[0])
+ = commit[1]
+ %br
diff --git a/app/views/activity_feeds/partials/_issue_assign_notification.haml b/app/views/activity_feeds/partials/_issue_assign_notification.haml
new file mode 100644
index 000000000..f3ddea3b2
--- /dev/null
+++ b/app/views/activity_feeds/partials/_issue_assign_notification.haml
@@ -0,0 +1,3 @@
+%p== #{ t("notifications.bodies.issue_assign_notification.title", :user_name => user_name) }
+
+%p= raw t("notifications.bodies.issue_assign_notification.content", :issue_link => link_to(issue_title, project_issue_path(project_id, issue_serial_id)))
diff --git a/app/views/activity_feeds/partials/_new_comment_notification.haml b/app/views/activity_feeds/partials/_new_comment_notification.haml
new file mode 100644
index 000000000..23c15ef74
--- /dev/null
+++ b/app/views/activity_feeds/partials/_new_comment_notification.haml
@@ -0,0 +1,5 @@
+%p== #{ t("notifications.bodies.new_comment_notification.title", :user_name => user_name) }
+
+%p= raw t("notifications.bodies.new_comment_notification.content", {:issue_link => link_to(issue_title, project_issue_path(project_id, issue_serial_id))})
+
+%p "#{ comment_body }"
diff --git a/app/views/activity_feeds/partials/_new_commit_comment_notification.haml b/app/views/activity_feeds/partials/_new_commit_comment_notification.haml
new file mode 100644
index 000000000..32826e333
--- /dev/null
+++ b/app/views/activity_feeds/partials/_new_commit_comment_notification.haml
@@ -0,0 +1,5 @@
+%p== #{ t("notifications.bodies.new_commit_comment_notification.title", :user_name => user_name) }
+
+%p= raw t("notifications.bodies.new_comment_notification.commit_content", {:commit_link => link_to(commit_message, commit_path(project_id, commit_id))})
+
+%p "#{ comment_body }"
diff --git a/app/views/activity_feeds/partials/_new_issue_notification.haml b/app/views/activity_feeds/partials/_new_issue_notification.haml
new file mode 100644
index 000000000..6f1666c74
--- /dev/null
+++ b/app/views/activity_feeds/partials/_new_issue_notification.haml
@@ -0,0 +1,3 @@
+%p== #{ t("notifications.bodies.new_issue_notification.title", :user_name => user_name) }
+
+%p= raw t("notifications.bodies.new_issue_notification.content", :issue_link => link_to(issue_title, project_issue_path(project_id, issue_serial_id)), :project_link => link_to(project_name, project_path(project_id)))
diff --git a/app/views/activity_feeds/partials/_new_user_notification.haml b/app/views/activity_feeds/partials/_new_user_notification.haml
new file mode 100644
index 000000000..98d4796e9
--- /dev/null
+++ b/app/views/activity_feeds/partials/_new_user_notification.haml
@@ -0,0 +1,5 @@
+%p== #{ t("notifications.bodies.new_user_notification.title", :user_name => user_name) }
+
+%p #{ t("notifications.bodies.new_user_notification.content") }
+
+%p #{ t("notifications.bodies.new_user_notification.email", :user_email => user_email) }
\ No newline at end of file
diff --git a/app/views/activity_feeds/partials/_wiki_new_commit_notification.haml b/app/views/activity_feeds/partials/_wiki_new_commit_notification.haml
new file mode 100644
index 000000000..eb33be273
--- /dev/null
+++ b/app/views/activity_feeds/partials/_wiki_new_commit_notification.haml
@@ -0,0 +1,2 @@
+%p== User #{ link_to user_name, user_path(user_id) } has been update wiki #{ link_to "history", compare_versions_project_wiki_index_path(project_id, commit_sha) }
+%p== Into project #{ link_to(project_name, project_path(project_id)) }
diff --git a/app/views/devise/passwords/edit.html.haml b/app/views/devise/passwords/edit.html.haml
index 84463652a..df4f48751 100644
--- a/app/views/devise/passwords/edit.html.haml
+++ b/app/views/devise/passwords/edit.html.haml
@@ -11,23 +11,19 @@
%h1= title t('devise.passwords.edit')
%br
.content
- -password_error = nil
- - if resource.errors.present?
- - resource.errors.each do |attr, array|
- -password_error = array if attr == :password
+ - password_error, reset_password_token_error = getDeviseErrors(:password, :reset_password_token)
= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put, :class => "form" }) do |f|
= f.hidden_field :reset_password_token
.left.first=t('activerecord.attributes.user.password')
.right.first
- = f.text_field :password, :id => 'pass', :class => "registartion-input #{password_error ? "registartion-input-error" : ''}", :onblur => "if(this.value==''){this.value='';this.className='registartion-input';}else{this.className='registartion-input-no-focus';};", :onfocus => "if(this.value==''){this.value='';this.className='registartion-input-focus';};"
+ = f.text_field :password, :id => 'password', :class => "registartion-input #{password_error ? 'registartion-input-error' : ''}"
.both
.left=t('activerecord.attributes.user.password_confirm')
.right
- = f.text_field :password_confirmation, :id => 'pass2', :class => "registartion-input #{password_error ? "registartion-input-error" : ''}", :onClick => "this.className='registartion-input-focus';disError(this);", :onblur => "if(this.value==''){this.value='';this.className='registartion-input';}else{this.className='registartion-input-no-focus';};buttonCheck();", :onfocus => "if(this.value==''){this.value='';this.className='registartion-input-focus';};", :onkeydown => "buttonCheck();"
+ = f.text_field :password_confirmation, :id => 'password2', :class => "registartion-input #{password_error ? 'registartion-input-error' : ''}"
.both
%br
=f.submit t("devise.passwords.edit_button"), :class => 'button', :id => 'btnLogin'
- - if password_error
- #hint.error.reset{:style => 'display: block;'}
- %p=password_error
+ =showDeviseHintError(:password, password_error, 'reset')
+
diff --git a/app/views/devise/registrations/new.html.haml b/app/views/devise/registrations/new.html.haml
index 957a05c01..19bebe4d4 100644
--- a/app/views/devise/registrations/new.html.haml
+++ b/app/views/devise/registrations/new.html.haml
@@ -3,51 +3,36 @@
%header
.logo
/ Page
- - uname_error = name_error = email_error = password_error = password_confirm_error = nil
- - if resource.errors.present? # Trash
- - resource.errors.each do |attr, array|
- -uname_error = array if attr == :uname
- -name_error = array if attr == :name
- -email_error = array if attr == :email
- -password_error = array if attr == :password
- -password_confirm_error = array if attr == :password_confirmation
-
+ - uname_error, name_error, email_error, password_error = getDeviseErrors(:uname, :name, :email, :password)
%article
= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :class => "form" }) do |f|
= hidden_field_tag :invitation_token, @invitation_token
.left.first=t('activerecord.attributes.user.uname')
.right.first
- = f.text_field :uname, :id => 'login', :class => "registartion-input #{uname_error ? "registartion-input-error" : ''}", :onblur => "if(this.value==''){this.value='';this.className='registartion-input';}else{this.className='registartion-input-no-focus';};", :onfocus => "if(this.value==''){this.value='';this.className='registartion-input-focus';};"
+ = f.text_field :uname, :id => 'login', :class => "registartion-input #{uname_error ? 'registartion-input-error' : ''}"
.both
.left=t('activerecord.attributes.user.name')
.right
- = f.text_field :name, :id => 'name', :class => "registartion-input #{name_error ? "registartion-input-error" : ''}", :onblur => "if(this.value==''){this.value='';this.className='registartion-input';}else{this.className='registartion-input-no-focus';};", :onfocus => "if(this.value==''){this.value='';this.className='registartion-input-focus';};"
+ = f.text_field :name, :id => 'name', :class => "registartion-input #{name_error ? 'registartion-input-error' : ''}"
.both
.left=t('activerecord.attributes.user.email')
.right
- = f.text_field :email, :id => 'email', :readonly => 'readonly', :class => "registartion-input #{email_error ? "registartion-input-error" : ''}", :onblur => "if(this.value==''){this.value='';this.className='registartion-input';}else{this.className='registartion-input-no-focus';};", :onfocus => "if(this.value==''){this.value='';this.className='registartion-input-focus';};"
+ = f.text_field :email, :id => 'email', :readonly => 'readonly', :class => "registartion-input #{email_error ? 'registartion-input-error' : ''}"
.both
.left=t('activerecord.attributes.user.password')
.right
- = f.text_field :password, :id => 'pass', :class => "registartion-input #{password_error ? "registartion-input-error" : ''}", :onblur => "if(this.value==''){this.value='';this.className='registartion-input';}else{this.className='registartion-input-no-focus';};", :onfocus => "if(this.value==''){this.value='';this.className='registartion-input-focus';};"
+ = f.text_field :password, :id => 'password', :class => "registartion-input #{password_error ? 'registartion-input-error' : ''}"
.both
.left=t('activerecord.attributes.user.password_confirm')
.right
- = f.text_field :password_confirmation, :id => 'pass2', :class => "registartion-input #{password_confirm_error ? "registartion-input-error" : ''}", :onClick => "this.className='registartion-input-focus';disError(this);", :onblur => "if(this.value==''){this.value='';this.className='registartion-input';}else{this.className='registartion-input-no-focus';};buttonCheck();", :onfocus => "if(this.value==''){this.value='';this.className='registartion-input-focus';};", :onkeydown => "buttonCheck();"
+ = f.text_field :password_confirmation, :id => 'password2', :class => "registartion-input #{password_error ? 'registartion-input-error' : ''}"
.both
.in
=f.submit t("layout.devise.shared_links.sign_up"), :class => 'button', :id => 'btnLogin'
.both
- -if uname_error
- .error.login#hintLogin
- %p=uname_error
- -if name_error
- .error.name#hintName
- %p=name_error
- -if email_error
- .error.email#hintEmail
- %p=email_error
- -if password_error
- .error.password#hintPassword
- %p=password_error
\ No newline at end of file
+ =showDeviseHintError(:login, uname_error)
+ =showDeviseHintError(:name, name_error)
+ =showDeviseHintError(:email, email_error)
+ =showDeviseHintError(:password, password_error)
+
diff --git a/app/views/devise/sessions/new.html.haml b/app/views/devise/sessions/new.html.haml
index 985798573..1dd5e6e24 100644
--- a/app/views/devise/sessions/new.html.haml
+++ b/app/views/devise/sessions/new.html.haml
@@ -13,9 +13,9 @@
=hidden_field_tag :password_default, password
= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { :class => "form login" }) do |f|
%h1= title t("layout.sessions.sign_in_header")
- = f.text_field :login, :class => "registartion-input #{is_error ? "registartion-input-error" : ''}", :onblur => "if(this.value==''){this.value='#{login}';this.className='registartion-input';} else{this.className='registartion-input-no-focus';};buttonCheck();", :onfocus => "if(this.value=='#{login}'){this.value='';this.className='registartion-input-focus';};", :onkeydown => "buttonCheck();", :type => "text", :value => login
+ = f.text_field :login, :class => "registartion-input #{is_error ? "registartion-input-error" : ''}", :value => login
%br/
- = f.password_field :password, :class => "registartion-input #{is_error ? "registartion-input-error" : ''}", :onblur => "if(this.value==''){this.value='#{password}';this.className='registartion-input';}else{this.className='registartion-input-no-focus';};buttonCheck();", :onfocus => "if(this.value=='#{password}'){this.value='';this.className='registartion-input-focus';};", :onkeydown => "buttonCheck();", :type => "password", :value => password
+ = f.password_field :password, :class => "registartion-input #{is_error ? "registartion-input-error" : ''}", :value => password
%br/
.registration
.remember
@@ -23,12 +23,11 @@
%span#niceCheckbox1.niceCheck{:onclick => "changeCheck(this)"}
= f.check_box :remember_me
.text=t('devise.sessions.remember_me')
- .in=f.submit t('layout.devise.shared_links.sign_in'), :class => 'button disabled', :id => 'btnLogin'
+ .in=f.submit t('layout.devise.shared_links.sign_in'), :class => 'button', :id => 'btnLogin'
%div{:style => "clear: both;"}
.hr
.both
- #hint.error{:style => is_error ? 'display: block;' : ''}
- %p=t('devise.failure.invalid')
.forgot
.password
- %p= link_to t("layout.devise.shared_links.forgot_password"), new_password_path(resource_name)
\ No newline at end of file
+ %p= link_to t("layout.devise.shared_links.forgot_password"), new_password_path(resource_name)
+ =showDeviseHintError(:login_error, is_error ? t('devise.failure.invalid') : false)
diff --git a/app/views/git/blobs/_show.html.haml b/app/views/git/blobs/_show.html.haml
index ca1b3d31a..aba2703b4 100644
--- a/app/views/git/blobs/_show.html.haml
+++ b/app/views/git/blobs/_show.html.haml
@@ -38,7 +38,7 @@
%pre#code
=#{render_blob(@blob)}
:preserve
- #{@blob.data.encode_to_default.html_safe}
+ #{h(@blob.data.encode_to_default).html_safe}
.both
- when :binary
%table.table.blob
@@ -51,6 +51,6 @@
:javascript
$(document).ready(function() {
- CodeMirror.runMode(document.getElementById("code").innerHTML, "#{@blob.mime_type}",
- document.getElementById("output"));
+ var text = $('#code').innerHTML.replace(/&/gi, '&');
+ CodeMirror.runMode(text, "#{@blob.mime_type}", document.getElementById("output"));
});
diff --git a/app/views/groups/_form.html.haml b/app/views/groups/_form.html.haml
index 37c8848f3..62463254f 100644
--- a/app/views/groups/_form.html.haml
+++ b/app/views/groups/_form.html.haml
@@ -1,13 +1,19 @@
-.group
- = f.label :name, t("activerecord.attributes.group.name"), :class => :label
- = f.text_field :name, :class => 'text_field'
-.group
- = f.label :uname, t("activerecord.attributes.group.uname"), :class => :label
- = f.text_field :uname, :class => 'text_field', :disabled => f.object.try(:persisted?)
-
-.group.navform.wat-cf
- %button.button{:type => "submit"}
- = image_tag("choose.png", :alt => t("layout.save"))
- = t("layout.save")
- %span.text_button_padding= t("layout.or")
- = link_to t("layout.cancel"), users_path, :class => "text_button_padding link_button"
+- act = controller.action_name.to_sym
+- if [:new, :create].include? act
+ .leftlist
+ = f.label :uname, t("activerecord.attributes.group.uname"), :class => :label
+ .rightlist.nomargin
+ = f.text_field :uname
+ .both
+%br
+.leftlist
+ = f.label :description, t("activerecord.attributes.group.description"), :class => :label
+.rightlist.nomargin
+ = f.text_area :description
+.both
+%br
+.leftlist
+ \
+.rightlist
+ = submit_tag t("layout.save")
+.both
diff --git a/app/views/groups/_sidebar.html.haml b/app/views/groups/_sidebar.html.haml
index 6ee1d6923..24c862edf 100644
--- a/app/views/groups/_sidebar.html.haml
+++ b/app/views/groups/_sidebar.html.haml
@@ -1,15 +1,13 @@
-.block.notice
- %h3= t("layout.groups.members")
- .content
- %p
- %ul
- - @group.members.each do |user|
- %li
- - if can? :read, user
- = link_to user.name, user_path(user)
- - else
- = user.name
- - if (@group.owner == user)
- = '(' + t("layout.owner") + ')'
- %br
- = link_to t("layout.groups.edit_members"), edit_group_members_path(@group) if can? :manage_members, @group
+.admin-preferences
+- act = action_name.to_sym
+- contr = controller_name.to_sym
+
+%aside
+ .admin-preferences
+ %ul
+ - if can? :edit, @project
+ %li{:class => (act == :edit && contr == :groups) ? 'active' : ''}
+ = link_to t("layout.groups.edit"), edit_group_path(@group)
+ - if can? :manage_members, @group
+ %li{:class => (act == :edit && contr == :members) ? 'active' : ''}
+ = link_to t("layout.groups.edit_members"), edit_group_members_path(@group)
diff --git a/app/views/groups/edit.html.haml b/app/views/groups/edit.html.haml
index c11eb70cc..bfce72fe0 100644
--- a/app/views/groups/edit.html.haml
+++ b/app/views/groups/edit.html.haml
@@ -1,13 +1,17 @@
-.block
- .secondary-navigation
- %ul.wat-cf
- %li.first= link_to t("layout.groups.list"), groups_path
- %li= link_to t("layout.groups.new"), new_group_path
- %li.active= link_to t("layout.groups.edit"), edit_group_path
- .content
- %h2.title= t("layout.groups.edit_header")
- .inner
- = form_for @group, :url => group_path(@group), :html => { :class => :form } do |f|
- = render :partial => "form", :locals => {:f => f}
+= form_for @group, :html => { :class => :form, :multipart => true } do |f|
+ = render :partial => "form", :locals => {:f => f}
+
+.hr
+.groups-profile
+ = image_tag('code.png')
+.groups-profile
+ = link_to t("layout.groups.public_profile"), @group
+.both
+.hr
+.leftside
+ = t("layout.groups.delete_warning")
+.rightside
+ = link_to t("layout.delete"), group_path(@group), :method => :delete, :confirm => t("layout.groups.confirm_delete"), :class => 'button' if can? :destroy, @group
+.both
- content_for :sidebar, render('sidebar')
diff --git a/app/views/groups/index.html.haml b/app/views/groups/index.html.haml
index ab8e9eab0..57bd85913 100644
--- a/app/views/groups/index.html.haml
+++ b/app/views/groups/index.html.haml
@@ -1,30 +1,14 @@
-.block
- .secondary-navigation
- %ul.wat-cf
- %li.first.active= link_to t("layout.groups.list"), users_path
- %li= link_to t("layout.groups.new"), new_group_path
- .content
- %h2.title
- = t("layout.groups.list_header")
- .inner
- %table.table
- %tr
- %th.first ID
- %th= t("activerecord.attributes.group.name")
- %th= t("activerecord.attributes.group.owner")
- %th.last
- - @groups.each do |group|
- %tr{:class => cycle("odd", "even")}
- %td
- = group.id
- %td
- = link_to group.name, group_path(group)
- %td
- = link_to group.owner.name, user_path(group.owner)
- %td.last
- = raw [(link_to t("layout.edit"), edit_group_path(group) if can? :update, group),
- (link_to t("layout.delete"), group_path(group), :method => :delete, :confirm => t("layout.groups.confirm_delete") if can? :destroy, group)].compact.join(' | ')
- .actions-bar.wat-cf
- .actions= will_paginate @groups, :param_name => :group_page
-
--# content_for :sidebar, render('sidebar')
+= link_to t("layout.groups.new"), new_group_path, :class => "button"
+%table#myTable.tablesorter.group-list{:cellpadding => "0", :cellspacing => "0"}
+ %thead
+ %tr
+ %th.th1= t("layout.groups.group")
+ %th.th2= t("layout.groups.description")
+ %th= t("layout.groups.leave_group")
+ %tbody
+ - @groups.each do |group|
+ %tr#Row1
+ %td= link_to group.name, group_path(group)
+ %td.td2= group.description
+ %td.td5
+ = link_to image_tag('x.png'), remove_group_member_path(group, current_user), :method => :delete unless group.owner_id == current_user.id
diff --git a/app/views/groups/new.html.haml b/app/views/groups/new.html.haml
index 02f2bca5d..2eea090f7 100644
--- a/app/views/groups/new.html.haml
+++ b/app/views/groups/new.html.haml
@@ -1,12 +1,6 @@
-.block
- .secondary-navigation
- %ul.wat-cf
- %li.first= link_to t("layout.groups.list"), groups_path
- %li.active= link_to t("layout.groups.new"), new_group_path
- .content
- %h2.title= t("layout.groups.new_header")
- .inner
- = form_for @group, :url => groups_path, :html => { :class => :form } do |f|
- = render :partial => "form", :locals => {:f => f}
+%h3.bpadding10= t("layout.groups.new_header")
+= form_for @group, :url => groups_path do |f|
+ = render :partial => "form", :locals => {:f => f}
--# content_for :sidebar, render('sidebar')
+:javascript
+ $('article .all').addClass('bigpadding');
diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml
index 728defa97..574ddda07 100644
--- a/app/views/groups/show.html.haml
+++ b/app/views/groups/show.html.haml
@@ -1,78 +1,11 @@
-.block
- .secondary-navigation
- %ul.wat-cf
- %li.first= link_to t("layout.groups.list"), groups_path
- %li= link_to t("layout.groups.new"), new_group_path
- %li.active= link_to t("layout.groups.show"), group_path
- .content
- .inner
- %p
- %b
- Id
- \:
- = @group.id
- %p
- %b
- = t("activerecord.attributes.group.name")
- \:
- = @group.name
- %p
- %b
- = t("activerecord.attributes.group.owner")
- \:
- = link_to @group.owner.name, user_path(@group.owner)
- %p
- %b
- = t("activerecord.attributes.group.created_at")
- \:
- = @group.created_at
- .wat-cf
- = link_to image_tag("code.png", :alt => t("layout.edit")) + " " + t("layout.edit"), edit_group_path(@group), :class => "button"
- = link_to image_tag("x.png", :alt => t("layout.delete")) + " " + t("layout.delete"), group_path(@group), :method => "delete", :class => "button", :confirm => t("layout.groups.confirm_delete")
-
-.block
- .secondary-navigation
- %ul.wat-cf
- %li.first.active= link_to t("layout.platforms.list"), platforms_path
- %li= link_to t("layout.platforms.new"), new_group_platform_path(@group)
- .content
- %h2.title
- = t("layout.platforms.list_header")
- .inner
- = render :partial => 'shared/search_form'
- = render :partial => 'platforms/list', :object => @platforms
- .actions-bar.wat-cf
- .actions
- = will_paginate @platforms, :param_name => :platform_page
-
--#.block
- .secondary-navigation
- %ul.wat-cf
- %li.first.active= link_to t("layout.repositories.list"), repositories_path
- %li= link_to t("layout.repositories.new"), new_group_repository_path(@group)
- .content
- %h2.title
- = t("layout.repositories.list_header")
- .inner
- = render :partial => 'shared/search_form'
- = render :partial => 'repositories/list', :object => @repositories
- .actions-bar.wat-cf
- .actions
- = will_paginate @repositories, :param_name => :repository_page
-
-.block
- .secondary-navigation
- %ul.wat-cf
- %li.first.active= link_to t("layout.projects.list"), projects_path
- %li= link_to t("layout.projects.new"), new_group_project_path(@group)
- .content
- %h2.title
- = t("layout.projects.list_header")
- .inner
- = render :partial => 'shared/search_form'
- = render :partial => 'projects/list', :object => @projects
- .actions-bar.wat-cf
- .actions
- = will_paginate @projects, :param_name => :project_page
-
-- content_for :sidebar, render('sidebar')
+.all.verybigpadding
+ %h3= @group.name
+ %h4= t("activerecord.attributes.group.description") + ":"
+ %p= @group.description
+ %h4= t("layout.groups.projects_list") + ":"
+ %p
+ - @group.projects.each do |project|
+ = link_to project.name, project
+ %br
+ %br
+ = link_to t("layout.edit"), edit_group_path(@group), :class => 'button' if can? :edit, @group
diff --git a/app/views/issues/_index_sidebar.html.haml b/app/views/issues/_index_sidebar.html.haml
index 8f0401ccc..8a34ff263 100644
--- a/app/views/issues/_index_sidebar.html.haml
+++ b/app/views/issues/_index_sidebar.html.haml
@@ -16,5 +16,5 @@
=tracker_search_field(:search_issue, t('layout.issues.search'))
.bordered.nopadding
%h3.bmargin10=t('layout.issues.new')
- = link_to t("layout.add"), new_project_issue_path(@project), :class => 'button' if can? :new, Issue.new(:project_id => @project.id)
+ = link_to t("layout.add"), new_project_issue_path(@project), :class => 'button' if can? :new, @project.issues.new
=render :partial => 'labels'
diff --git a/app/views/layouts/_flashes.html.haml b/app/views/layouts/_flashes.html.haml
index 7a6e9681f..a135909b8 100644
--- a/app/views/layouts/_flashes.html.haml
+++ b/app/views/layouts/_flashes.html.haml
@@ -1,4 +1,3 @@
.flash
- flash.each do |type, message|
- .message{:class => type}
- %p= message
\ No newline at end of file
+ .message{:class => type}= message
\ No newline at end of file
diff --git a/app/views/layouts/sessions.html.haml b/app/views/layouts/sessions.html.haml
index 6bf94f40e..a3fe71e85 100644
--- a/app/views/layouts/sessions.html.haml
+++ b/app/views/layouts/sessions.html.haml
@@ -5,10 +5,10 @@
= display_meta_tags :site => APP_CONFIG['project_name']
- if controller_name == 'sessions' && action_name == 'new'
= stylesheet_link_tag "login"
- = javascript_include_tag "login"
- elsif ['registrations', 'passwords'].include?(controller_name) && ['new', 'create', 'edit', 'update'].include?(action_name)
= stylesheet_link_tag "reg_session"
= csrf_meta_tag
+ = javascript_include_tag "login"
%body
-# render :partial => "layouts/flashes"
diff --git a/app/views/members/edit.html.haml b/app/views/members/edit.html.haml
index 2a6b01a91..05525eab8 100644
--- a/app/views/members/edit.html.haml
+++ b/app/views/members/edit.html.haml
@@ -1,46 +1,45 @@
-.block
- .secondary-navigation
- %ul.wat-cf
- %li.first= link_to t("layout.members.back_to_group"), parent_path
- %li.active= link_to t("layout.members.edit"), edit_group_members_path(@group)
- .content
- .inner
- = form_tag group_members_path(parent) do
- %h2.title= t("layout.users.list_header")
- %table.table
- %tr
- %th.first ID
- %th= t("activerecord.attributes.user.name")
- %th= t("activerecord.attributes.user.roles")
- %th= t("activerecord.attributes.user.uname")
- - #TODO: Replace this Chelyabinsk add/remove collaborators method by more human method
- - @users.each do |user|
- %tr{:class => cycle("odd", "even")}
- %td
- = user.id
- %td
- = link_to user.name, user_path(user)
- %td
- - Relation::ROLES.each do |role|
- = check_box_tag "#{ role }[#{user.id}]", '1', ((parent.objects.exists? :object_id => user.id, :object_type => 'User', :role => role) ? :checked : nil), {:class => "user_role_chbx"}
- = label_tag "#{ role }[#{user.id}]", t("layout.members.roles.#{ role }")
- %td
- = user.uname
- .group.navform.wat-cf
- %button.button{:type => "submit"}
- = image_tag("choose.png", :alt => t("layout.save"))
- = t("layout.save")
- %span.text_button_padding= t("layout.or")
- = link_to t("layout.cancel"), group_path(parent), :class => "text_button_padding link_button"
+= form_tag group_members_path(@group), :id => 'members_form', :delete_url => remove_group_members_path(@group) do
+ = hidden_field_tag "_method", "post"
+ %table.tablesorter{:cellpadding => "0", :cellspacing => "0"}
+ %thead
+ %tr
+ %th
+ \
+ %th
+ = t("layout.collaborators.members")
+ %th{:colspan => "3"}
+ = t("layout.collaborators.roles")
+ %tbody
+ - @users.each do |user|
+ %tr
+ %td
+ %span#niceCheckbox1.niceCheck-main
+ = check_box_tag "user_remove[#{user.id}][]"
+ %td
+ .img
+ = image_tag(gravatar_url(user.email))
+ .forimg= link_to user.name, user_path(user)
+ - Relation::ROLES.each_with_index do |role, i|
+ %td
+ .radio
+ = radio_button_tag "user[#{user.id}]", role, ((parent.objects.exists? :object_id => user.id, :object_type => 'User', :role => role) ? :checked : nil), :class => 'niceRadio'
+ .forradio= t("layout.collaborators.role_names.#{ role }")
+ = link_to_function t("layout.delete"), "deleteAdminMember();", :class => 'button'
+ .both
+.hr.top
- = form_tag add_group_members_path(parent) do
- .group
- %h2.title= t("layout.members.add_member")
- = label_tag "", t("layout.members.input_username")
- = autocomplete_field_tag 'user_id', params[:user_id], autocomplete_user_uname_users_path
- %br
- .group.navform.wat-cf
- %button.button{:type => "submit"}
- = image_tag("choose.png", :alt => t("layout.add"))
- = t("layout.add")
+= form_tag add_group_members_path(parent) do
+ .admin-search
+ = autocomplete_field_tag 'user_id', params[:user_id], autocomplete_user_uname_users_path#, :id_element => '#member_id_field'
+ .admin-role
+ .lineForm
+ = select_tag 'role', options_for_collaborators_roles_select
+ .both
+ %br
+ = submit_tag t("layout.add"), :class => 'button'
+.hr.bottom
+.both
+= link_to_function t("layout.save"), "saveAdminMember();", :class => 'button'
+
+- content_for :sidebar, render('groups/sidebar')
diff --git a/app/views/platforms/show.html.haml b/app/views/platforms/show.html.haml
index 1ae334f17..3622927a5 100644
--- a/app/views/platforms/show.html.haml
+++ b/app/views/platforms/show.html.haml
@@ -113,7 +113,7 @@
= link_to t("layout.edit"), edit_platform_product_path(@platform, product) if can? :update, product
|
= link_to t("layout.delete"), platform_product_path(@platform, product), :method => :delete, :confirm => t("layout.products.confirm_delete") if can? :destroy, product
- = (product.can_clone? ? "| #{link_to t("layout.products.clone"), clone_platform_product_path(@platform, product)}" : "").html_safe
+ =# (product.can_clone? ? "| #{link_to t("layout.products.clone"), clone_platform_product_path(@platform, product)}" : "").html_safe
.actions-bar.wat-cf
.actions
- content_for :sidebar, render(:partial => 'sidebar')
diff --git a/app/views/product_build_lists/_product_build_list.html.haml b/app/views/product_build_lists/_product_build_list.html.haml
index 38a70580e..91fb1c373 100644
--- a/app/views/product_build_lists/_product_build_list.html.haml
+++ b/app/views/product_build_lists/_product_build_list.html.haml
@@ -3,5 +3,5 @@
%td= link_to product_build_list.product.name, [product_build_list.product.platform, product_build_list.product]
%td= link_to nil, product_build_list.container_path
%td= product_build_list.human_status
- %td= link_to t("layout.product_build_lists.delete"), platform_product_product_build_list_path(product_build_list.product.platform, product_build_list.product, product_build_list), :method => "delete", :confirm => t("layout.confirm") if can? :delete, product_build_list
+ %td= link_to t("layout.product_build_lists.delete"), platform_product_product_build_list_path(product_build_list.product.platform, product_build_list.product, product_build_list), :method => "delete", :confirm => t("layout.confirm") if can? :destroy, product_build_list
%td= product_build_list.notified_at
\ No newline at end of file
diff --git a/app/views/products/show.html.haml b/app/views/products/show.html.haml
index a1cfc880a..f61124ea8 100644
--- a/app/views/products/show.html.haml
+++ b/app/views/products/show.html.haml
@@ -31,7 +31,7 @@
- if can? :destroy, @product
= link_to image_tag("x.png", :alt => t("layout.delete")) + " " + t("layout.delete"), platform_product_path(@platform, @product), :method => "delete", :class => "button", :confirm => t("layout.products.confirm_delete")
- if @product.can_clone?
- = link_to t("layout.products.clone"), clone_platform_product_path(@platform, @product), :class => "button"
+ =# link_to t("layout.products.clone"), clone_platform_product_path(@platform, @product), :class => "button"
- if can?(:create, @product => ProductBuildList)
= link_to t("layout.products.build"), platform_product_product_build_lists_path(@platform, @product), :class => "button", :method => 'post', :confirm => t("layout.confirm")
diff --git a/app/views/projects/_branch_select.html.haml b/app/views/projects/_branch_select.html.haml
index 78d8f6a33..1386e6023 100644
--- a/app/views/projects/_branch_select.html.haml
+++ b/app/views/projects/_branch_select.html.haml
@@ -3,7 +3,7 @@
:class => 'sel80', :id => 'branch_selector'
%form{ :action => '', :method => :get, :id => 'branch_changer', :'data-action' => "#{controller_name}"}
.fork
- %p= t('layout.projects.current_branch')+':'
+ %p= t("layout.projects.#{params[:commit_hash].present? ? 'current_commit' : 'current_branch'}")+':'
.both
:javascript
diff --git a/app/views/projects/_form.html.haml b/app/views/projects/_form.html.haml
index fe9d5a284..0c0c1fb58 100644
--- a/app/views/projects/_form.html.haml
+++ b/app/views/projects/_form.html.haml
@@ -15,12 +15,16 @@
= f.label :owner_id, t("activerecord.attributes.project.owner"), :class => :label
.rightlist
= label_tag t("activerecord.attributes.project.who_owns.me")
- - if Group.can_own_project(User.find(6)).count > 0
- = radio_button_tag :who_owns, 'me'#, {}.merge( (@who_owns == :me ? {:checked => 'checked'} : {}) )
+ - if Group.can_own_project(current_user).count > 0
+ = radio_button_tag :who_owns, 'me', @who_owns == :me #{}.merge( (@who_owns == :me) ? {:checked => 'checked'} : {} )
+ - puts @who_owns.inspect
+ - puts @who_owns == :group
= label_tag t("activerecord.attributes.project.who_owns.group")
- = radio_button_tag :who_owns, 'group'#, {}.merge( (@who_owns == :group ? {:checked => 'checked'} : {}) )
+ = radio_button_tag :who_owns, 'group', @who_owns == :group #{}.merge( (@who_owns == :group) ? {:checked => 'checked'} : {} )
-# TODO: Make our own select_box helper with new design, blackjack and bitches!
= select_tag :owner_id, options_for_select( Group.can_own_project(current_user) )
+ - else
+ = hidden_field_tag :who_owns, :me
.both
-#- if [:new, :create].include? act
-# .leftlist
diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml
index f723a1960..b540d8a8d 100644
--- a/app/views/projects/new.html.haml
+++ b/app/views/projects/new.html.haml
@@ -1,5 +1,3 @@
-= render :partial => 'projects/submenu'
-
%h3.bpadding10
= t("layout.projects.new_header")
diff --git a/app/views/user_mailer/new_comment_notification.en.haml b/app/views/user_mailer/new_comment_notification.en.haml
index 99c1a4bfe..5a20af6f6 100644
--- a/app/views/user_mailer/new_comment_notification.en.haml
+++ b/app/views/user_mailer/new_comment_notification.en.haml
@@ -3,7 +3,7 @@
- if @comment.commentable.class == Issue
- link = link_to @comment.commentable.title, project_issue_url(@comment.commentable.project, @comment.commentable)
- object = 'issue'
-- elsif @comment.commentable.class == Grit::Commit
+- elsif @comment.commit_comment?
- link = link_to @comment.commentable.message, commit_url(@comment.project, @comment.commentable_id)
- object = 'commit'
%p #{ link_to @comment.user.uname, user_url(@comment.user)} added new comment to #{object} #{link}.
diff --git a/app/views/user_mailer/new_comment_notification.ru.haml b/app/views/user_mailer/new_comment_notification.ru.haml
index 1dcab28a8..a4bd0fd6d 100644
--- a/app/views/user_mailer/new_comment_notification.ru.haml
+++ b/app/views/user_mailer/new_comment_notification.ru.haml
@@ -3,7 +3,7 @@
- if @comment.commentable.class == Issue
- link = link_to @comment.commentable.title, project_issue_url(@comment.commentable.project, @comment.commentable)
- object = 'задаче'
-- elsif @comment.commentable.class == Grit::Commit
+- elsif @comment.commit_comment?
- link = link_to @comment.commentable.message, commit_url(@comment.project, @comment.commentable_id)
- object = 'коммиту'
%p #{ link_to @comment.user.uname, user_url(@comment.user)} добавил комментарий к #{object} #{link}.
diff --git a/app/views/user_mailer/new_comment_reply_notification.en.haml b/app/views/user_mailer/new_comment_reply_notification.en.haml
deleted file mode 100644
index b2838b2e0..000000000
--- a/app/views/user_mailer/new_comment_reply_notification.en.haml
+++ /dev/null
@@ -1,9 +0,0 @@
-%p== Hello, #{@user.name}.
-
-- #TODO hmm... this need to be refactored.
-%p Your comment into issue #{ link_to @comment.commentable.title, project_issue_url(@comment.commentable.project, @comment.commentable) } has been answered.
-
-%p "#{ @comment.body }"
-
-
-%p== Support team «ROSA Build System»
diff --git a/app/views/user_mailer/new_user_notification.en.haml b/app/views/user_mailer/new_user_notification.en.haml
index d1a0722bf..c0f05d467 100644
--- a/app/views/user_mailer/new_user_notification.en.haml
+++ b/app/views/user_mailer/new_user_notification.en.haml
@@ -6,7 +6,5 @@
%p
==Your email : #{@user.email}
- %br/
- ==Your password: #{@user.password}
%p== Support team «ROSA Build System»
diff --git a/app/views/user_mailer/new_user_notification.ru.haml b/app/views/user_mailer/new_user_notification.ru.haml
index f3c6d1ec7..acae98cba 100644
--- a/app/views/user_mailer/new_user_notification.ru.haml
+++ b/app/views/user_mailer/new_user_notification.ru.haml
@@ -6,7 +6,5 @@
%p
==Ваш email : #{@user.email}
- %br/
- ==Ваш пароль: #{@user.password}
%p== Команда поддержки «ROSA Build System»
diff --git a/config/application.rb b/config/application.rb
index 6a537ab65..6a3448bfc 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -31,7 +31,7 @@ module Rosa
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
# Activate observers that should always be running.
- config.active_record.observers = :event_log_observer
+ config.active_record.observers = :event_log_observer, :activity_feed_observer
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
@@ -55,8 +55,5 @@ module Rosa
# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'
-
- # Compass
- config.sass.load_paths << Compass::Frameworks['compass'].stylesheets_directory if config.respond_to?(:sass)
end
end
diff --git a/config/deploy.rb b/config/deploy.rb
index 61d73d225..d6b03af8a 100644
--- a/config/deploy.rb
+++ b/config/deploy.rb
@@ -69,9 +69,9 @@ after "deploy:setup", "deploy:symlink_pids"
# after "deploy:restart", "bluepill:start" # "bluepill:processes:restart_dj" # "bluepill:restart"
# DJ
-after "deploy:stop", "delayed_job:stop"
-after "deploy:start", "delayed_job:start"
-after "deploy:restart", "delayed_job:restart"
+after "deploy:stop", "delayed_job:stop"
+after "deploy:start", "delayed_job:start"
+# after "deploy:restart", "delayed_job:restart"
after "deploy:restart", "deploy:cleanup"
diff --git a/config/locales/devise.en.yml b/config/locales/devise.en.yml
index 46d859830..4a0155bc3 100644
--- a/config/locales/devise.en.yml
+++ b/config/locales/devise.en.yml
@@ -9,11 +9,6 @@ en:
one: "1 error prohibited this %{resource} from being saved:"
other: "%{count} errors prohibited this %{resource} from being saved:"
- activerecord:
- errors:
- messages:
- confirmation: "passwords doesn't match"
-
devise:
failure:
already_authenticated: 'You are already signed in.'
@@ -38,6 +33,7 @@ en:
forgot: 'Forgot password'
send: 'Send'
edit_button: 'Change'
+ new_password: 'New password'
confirmations:
send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.'
send_paranoid_instructions: 'If your e-mail exists on our database, you will receive an email with instructions about how to confirm your account in a few minutes.'
diff --git a/config/locales/devise.ru.yml b/config/locales/devise.ru.yml
index 06261d0e4..b25fd5976 100644
--- a/config/locales/devise.ru.yml
+++ b/config/locales/devise.ru.yml
@@ -11,11 +11,6 @@ ru:
many: "%{resource}: сохранение не удалось из-за %{count} ошибок"
other: "%{resource}: сохранение не удалось из-за %{count} ошибки"
- activerecord:
- errors:
- messages:
- confirmation: "пароли не совпадают"
-
devise:
failure:
already_authenticated: 'Вы уже вошли в систему.'
@@ -40,6 +35,7 @@ ru:
forgot: 'Забыли пароль'
send: 'Послать'
edit_button: 'Изменить'
+ new_password: 'Новый пароль'
confirmations:
send_instructions: "В течение нескольких минут вы получите e-mail с инструкциями по подтверждению вашей учётной записи."
send_paranoid_instructions: 'Если Ваш e-mail существует, то в течение нескольких минут вы получите e-mail с инструкциями по подтверждению вашей учётной записи.'
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 3a1281ea6..a31eed0d3 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -3,7 +3,7 @@ en:
previous_label: ‹ Previous
next_label: Next ›
page_gap: ...
-
+
datatables:
previous_label: ‹ Prev.
next_label: Next ›
@@ -111,126 +111,6 @@ en:
edit_header: Edit category
confirm_delete: Are you sure to delete this category?
- comments:
- confirm_delete: Are you sure to delete the comment?
- new_header: New comment
- edit_header: Editing a comment
-
- platforms:
- admin_id: Owner
- build_all: Build all
- list: List
- new: Create
- edit: Edit
- new_header: New platform
- edit_header: Edit
- list_header: Platforms
- list_header_main: General
- list_header_personal: Personal
- list_header_all: All
- clone_header: Platform clone
- show: Platform
- projects: Projects
- products: Products
- location: Location
- repositories: Repositories
- back_to_the_list: ⇐To platform list
- freeze: Freeze
- unfreeze: Unfeeze
- confirm_freeze: Are you sure to freeze this platform?
- confirm_freeze: Are you sure to clone this platform?
- confirm_unfreeze: Are you sure to defrost this platform?
- released_suffix: (released)
- confirm_delete: Are you sure to delete this platform?
- current_platform_header: Current platform
- owner: Owner
- visibility: Visibility
- platform_type: Platform type
- distrib_type: Distribution kit type
- private_users: Access data
- confirm_clone: To clone?
- clone: To clone
-
- event_logs:
- list: List
- list_header: Event log
-
- repositories:
- list: List
- list_header: Repositories
- new: New repository
- new_header: New repository
- show: Repository
- location: Location
- projects: Projects
- new_header: New repository
- back_to_the_list: ⇐ List of repositories
- confirm_delete: Are you sure to delete this repository?
- current_repository_header: Current repository
-
- personal_repositories:
- settings_header: Settings
- change_visibility_from_hidden: Replace the status to "Opened"
- change_visibility_from_open: Replace the status to "Private"
- settings: Settings
- show: My repository
- private_users: Private repository users
-
- products:
- list: List
- new: New product
- list_header: Products
- clone: Clone
- build: Build
- new_header: New product
- edit_header: Product editing
- confirm_delete: Are you sure to delete this product?
-
- cron_tab_generator:
- show: Show cron tab the generator
- hide: Hide cron tab the generator
- choose: Choose
- every_minute: Every minute
- every_hour: Every hour
- every_day: Every day
- every_month: Every month
- every_weekday: Every weekdays
- minutes: Minutes
- hours: Hours
- days: Days
- months: Months
- weekdays: weekdays
-
- projects:
- add: Add
- edit: Edit
- list: List
- list_header: Projects
- edit_header: Edit the project
- show: Project
- build: Build
- new_build: New build %{project_name}
- confirm_delete: Are you sure to delete this project?
- new: New project
- new_header: New project
- new_header: New project
- location: Location
- git_repo_location: Path to git repo
- current_project_header: Current project
- current_build_lists: Current builds
- build_button: Start build
- add_collaborators: Add collaborators
- members: Members
- collaborators: Collaborators
- groups: Groups
- edit_collaborators: Edit collaborators
- issues: Issues
- wiki: Wiki
- delete_warning: Attention! Deleted project can not be restored!
- sections: Sections
- has_issue_description: Issues adds lightweight issue tracking tightly integrated with your repository. Add issues to milestones, label issues, and close & reference issues from commit messages.
- has_wiki_description: Wikis are the simplest way to let others contribute content. Any user can create and edit pages to use for documentation, examples, support or anything you wish.
-
collaborators:
back_to_proj: Back to project
edit: Edit list
@@ -248,26 +128,6 @@ en:
writer: Writer
admin: Admin
- members:
- back_to_group: Back to group
- edit: Edit list
- roles: Roles
- add_member: Add member
- input_username: Username
-
- groups:
- list: List
- new: Create
- edit: Edit
- members: Members
- new_header: New group
- edit_header: Edit
- list_header: Groups
- show: Group
- back_to_the_list: ⇐ List of groups
- confirm_delete: Are you sure to remove this group?
- edit_members: Edit members
-
git:
repositories:
empty: "Repository is empty. You need to wait some time if you have forked project or imported package"
@@ -291,10 +151,15 @@ en:
saved: Settings saved success
save_error: Setting update error
+ private_users: "Login: %{login} Password: %{password}"
subscribe:
saved: Subscription on notifications for this task is created
+ saved_error: Subscription create error
destroyed: Subscription on notifications for this task is cleaned
+ commit:
+ saved: Subscription on notifications for this commit is created
+ destroyed: Subscription on notifications for this commit is cleaned
exception_message: Access violation to this page!
@@ -309,13 +174,6 @@ en:
successfully_added: Member %s successfully added
error_in_adding: Member %s adding error
- members:
- successfully_changed: Members list successfully changed
- error_in_changing: Members list changing error
- successfully_added: Member successfully added
- error_in_adding: Member adding error
- already_added: User already added
-
auto_build_list:
success: Automated build success!
failed: Automated build failed!
@@ -327,66 +185,6 @@ en:
save_error: Category saves error
destroyed: Category deleted
- comment:
- saved: Comment saved
- save_error: Comment saves error
- destroyed: Comment deleted
-
- project:
- saved: Project saved
- save_error: Project saves error
- save_warning_ssh_key: Owner of the project must specify in profile a SSH key
- destroyed: Project deleted
- forked: Project forked
- fork_error: Project fork error
-
- user:
- saved: User saved
- save_error: User data saves error
- destroyed: User account deleted
-
- group:
- saved: Group saved
- save_error: Group saves error
- destroyed: Group deleted
- user_uname_exists: User already exists
-
- repository:
- saved: Repository added
- save_error: Repository adding error
- destroyed: Repository deleted
- project_added: Project added on repository
- project_not_added: Project adding error. In this repository already is a project with such name. First remove the old project
- project_removed: Project deleted
- project_not_removed: Project deleting failed
-
- product:
- saved: Product saved
- save_error: Product saves error
- build_started: Product build started
- destroyed: Product deleted
- build_list_delete: Product build list deleted
-
- platform:
- saved: Platform saved
- save_error: Platform saves error
- freezed: Platform freezed
- freeze_error: Platform freezing error, try again
- unfreezed: Platform unfreezed
- unfreeze_error: Platform unfreezing error, try again
- destroyed: Platform deleted
- build_all_success: All project build in progress
- clone_success: Cloned successfully
-
- wiki:
- ref_not_exist: No such version
- successfully_updated: Page '%{name}' successfully updated
- duplicate_page: Page '%{name}' already exists
- page_successfully_removed: Page successfully removed
- page_not_found: Page '%{name}' not found
- revert_success: Changes successfully reverted
- patch_does_not_apply: Patch does not apply
-
blob:
successfully_updated: File '%{name}' successfully updated
updating_error: Error updating file '%{name}'
@@ -409,35 +207,13 @@ en:
models:
category: Category
- repository: Repository
arch: Arch
container: Container
- platform: Platform
- group: Group
- event_log: Event log
- project: Project
rpm: RPM
- user: User
private_user: Private user
- product: Product
product_build_list: Product build list
download: Statistics
auto_build_list: Auto rebuild list
- settings:
- saved: Settings saved success
- save_error: Setting update error
-
- private_users: "Login: %{login} Password: %{password}"
-
- subscribe:
- saved: Subscription on notifications for this task is created
- saved_error: Subscription create error
- destroyed: Subscription on notifications for this task is cleaned
- commit:
- saved: Subscription on notifications for this commit is created
- destroyed: Subscription on notifications for this commit is cleaned
-
- exception_message: Access violation to this page!
attributes:
settings:
@@ -447,6 +223,9 @@ en:
new_comment_reply: New reply of comment notifications
new_issue: New task notifications
issue_assign: New task assignment notifications
+ new_comment_commit_owner: Notify about comments to my commit
+ new_comment_commit_repo_owner: Notify about comments to my repository commits
+ new_comment_commit_commentor: Notify about comments after my commit
auto_build_list:
project_id: Project
@@ -458,10 +237,6 @@ en:
arch_id: Architecture
arch: Architecture
- comment:
- body: Content
- user: Author
-
private_user:
login: Login
password: Password
@@ -470,32 +245,6 @@ en:
parent_id: Parent
name: Name
- repository:
- name: Name
- description: Description
- platform_id: Platform
- platform: Platform
- created_at: Created
- updated_at: Updated
- owner: Owner
-
- product:
- name: Name
- platform_id: Platform
- build_status: Build status
- build_path: ISO path
- created_at: Created
- updated_at: Updated
- ks: Content .ks.template
- counter: Content .counter
- build_script: Content build
- menu: Content .menu.xml
- tar: Tar.bz2 file
- is_template: Template
- system_wide: System
- cron_tab: Cront tab
- use_cron: Cron usage
-
arch:
name: Name
created_at: Created
@@ -510,48 +259,6 @@ en:
created_at: Created
updated_at: Updated
- platform:
- name: Name
- description: Description
- parent_platform_id: Parent platform
- parent: Parent platform
- released: Released
- created_at: Created
- updated_at: Updated
- distrib_type: Source type
- visibility: Status
- visibility_types:
- open: Open
- hidden: Hidden
-
- event_log:
- kind: Event type
- created_at: Event date and time
- user: User
- ip: User IP
- protocol: Access protocol
- description: Description
-
- project:
- category_id: Category
- name: Name
- description: Descripton
- owner: Owner
- visibility: Visibility
- visibility_types:
- open: Open
- hidden: Hidden
- repository_id: Repository
- repository: Repository
- created_at: Created
- updated_at: Updated
- has_issues: Tracker on
- has_wiki: Wiki on
- srpm: Import code from src.rpm
- who_owns:
- me: I
- group: Group
-
rpm:
name: Name
arch_id: Arch
@@ -561,20 +268,6 @@ en:
created_at: Created
updated_at: Updated
- role:
- name: Name
- on: Slave
- to: Master
- use_default: By default
- use_default_for_owner: Default by owner
-
- group:
- name: Name
- uname: Nickname
- owner: Owner
- created_at: Created
- updated_at: Updated
-
product_build_list:
id: Id
product: Product
@@ -588,12 +281,3 @@ en:
distro: Source
platform: Platform
counter: Downloads
-
- notifications:
- subjects:
- new_comment_notification: New comment to your task
- new_issue_notification: New task added to project
- new_user_notification: Registered on project «%{ project_name }»
- issue_assign_notification: New task assigned
- new_commit_comment_notification: New comment to commit
- invite_approve_notification: Invitation to ABF
diff --git a/config/locales/layout/comments.en.yml b/config/locales/layout/comments.en.yml
deleted file mode 100644
index b309be256..000000000
--- a/config/locales/layout/comments.en.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-en:
- layout:
- comments:
- has_commented: "adds a note"
- notifications_are: "Notifications for new comments are"
- comments_header: "Comments"
- back: 'Back'
diff --git a/config/locales/layout/comments.ru.yml b/config/locales/layout/comments.ru.yml
deleted file mode 100644
index 4a8723d17..000000000
--- a/config/locales/layout/comments.ru.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-ru:
- layout:
- comments:
- has_commented: "оставил комментарий"
- notifications_are: "Уведомления о последующих комментариях"
- comments_header: "Комментарии"
- back: 'Назад'
diff --git a/config/locales/layout/projects.en.yml b/config/locales/layout/projects.en.yml
deleted file mode 100644
index 64673fae7..000000000
--- a/config/locales/layout/projects.en.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-en:
- layout:
- projects:
- diff_show_header: "%{files} with %{additions} and %{deletions}."
- about_subheader: "About project"
- last_commit: "Last commit"
-
- filename: File
- age: Modification date
- message: Message
- author: Author
-
- current_branch: Current branch
- files_in_project: Files in
diff --git a/config/locales/layout/projects.ru.yml b/config/locales/layout/projects.ru.yml
deleted file mode 100644
index ff40b9cae..000000000
--- a/config/locales/layout/projects.ru.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-ru:
- layout:
- projects:
- diff_show_header: "%{files} с %{additions} и %{deletions}."
- about_subheader: "О проекте"
- last_commit: "Последний коммит"
-
- filename: Файл
- age: Дата модификации
- message: Сообщение
- author: Автор
-
- current_branch: Текущий бранч
- files_in_project: Файлы в
diff --git a/config/locales/models/activity_feed.en.yml b/config/locales/models/activity_feed.en.yml
new file mode 100644
index 000000000..0839059c2
--- /dev/null
+++ b/config/locales/models/activity_feed.en.yml
@@ -0,0 +1,30 @@
+en:
+ layout:
+ activity_feed:
+ header: Activity Feed
+
+ notifications:
+ subjects:
+ new_comment_notification: New comment to your task
+ new_commit_comment_notification: New comment to commit
+ new_issue_notification: New task added to project
+ new_user_notification: Registered on project «%{ project_name }»
+ issue_assign_notification: New task assigned
+ invite_approve_notification: Invitation to ABF
+
+ bodies:
+ new_comment_notification:
+ title: Hello, %{user_name}.
+ content: To the issue %{issue_link} added a comment.
+ commit_content: To the commit %{commit_link} added a comment.
+ new_issue_notification:
+ title: Hello, %{user_name}.
+ content: To project %{project_link} has been added an issue %{issue_link}
+ new_user_notification:
+ title: Hello, %{user_name}.
+ content: You have been sign up to project «ROSA Build System» and now can sign in.
+ email: ==Your email %{user_email}
+ password: ==Your password %{user_password}
+ issue_assign_notification:
+ title: Hello, %{user_name}.
+ content: You have been assigned to issue %{issue_link}
diff --git a/config/locales/models/activity_feed.ru.yml b/config/locales/models/activity_feed.ru.yml
new file mode 100644
index 000000000..04b065970
--- /dev/null
+++ b/config/locales/models/activity_feed.ru.yml
@@ -0,0 +1,31 @@
+ru:
+ layout:
+ activity_feed:
+ header: Лента активности
+
+ notifications:
+ subjects:
+ new_comment_notification: Новый комментарий к Вашей задаче
+ new_commit_comment_notification: Новый комментарий к коммиту
+ new_issue_notification: Новая задача добавлена к проекту
+ new_user_notification: Регистрация на проекте «%{ project_name }»
+ issue_assign_notification: Вам назначили задачу
+ invite_approve_notification: Приглашение в ABF
+
+ bodies:
+ new_comment_notification:
+ title: Здравствуйте, %{user_name}.
+ content: К задаче %{issue_link} был добавлен новый комментарий.
+ commit_content: К коммиту %{commit_link} был добавлен новый комментарий.
+ new_issue_notification:
+ title: Здравствуйте, %{user_name}.
+ content: К проекту %{project_link} была добавлена задача %{issue_link}
+ new_user_notification:
+ title: Здравствуйте, %{user_name}.
+ content: Вы зарегистрированы на проекте «ROSA Build System» и теперь можете войти в систему.
+ email: ==Ваш email %{user_email}
+ password: ==Ваш пароль %{user_password}
+ issue_assign_notification:
+ title: Здравствуйте, %{user_name}.
+ content: Вам была назначена задача %{issue_link}
+ invite_approve_notification: Приглашение в ABF
\ No newline at end of file
diff --git a/config/locales/build_list.en.yml b/config/locales/models/build_list.en.yml
similarity index 100%
rename from config/locales/build_list.en.yml
rename to config/locales/models/build_list.en.yml
diff --git a/config/locales/build_list.ru.yml b/config/locales/models/build_list.ru.yml
similarity index 100%
rename from config/locales/build_list.ru.yml
rename to config/locales/models/build_list.ru.yml
diff --git a/config/locales/models/comment.en.yml b/config/locales/models/comment.en.yml
new file mode 100644
index 000000000..d5486283c
--- /dev/null
+++ b/config/locales/models/comment.en.yml
@@ -0,0 +1,22 @@
+en:
+ layout:
+ comments:
+ confirm_delete: Are you sure to delete the comment?
+ new_header: New comment
+ edit_header: Editing a comment
+ has_commented: "adds a note"
+ notifications_are: "Notifications for new comments are"
+ comments_header: "Comments"
+ back: 'Back'
+
+ flash:
+ comment:
+ saved: Comment saved
+ save_error: Comment saves error
+ destroyed: Comment deleted
+
+ activerecord:
+ attributes:
+ comment:
+ body: Content
+ user: Author
diff --git a/config/locales/models/comment.ru.yml b/config/locales/models/comment.ru.yml
new file mode 100644
index 000000000..ff9e15dd3
--- /dev/null
+++ b/config/locales/models/comment.ru.yml
@@ -0,0 +1,22 @@
+ru:
+ layout:
+ comments:
+ confirm_delete: Вы уверены, что хотите удалить комментарий?
+ new_header: Новый комментарий
+ edit_header: Редактирование комментария
+ has_commented: "оставил комментарий"
+ notifications_are: "Уведомления о последующих комментариях"
+ comments_header: "Комментарии"
+ back: 'Назад'
+
+ flash:
+ comment:
+ saved: Комментарий успешно сохранен
+ save_error: Ошибка сохранения комментария
+ destroyed: Комментарий удален
+
+ activerecord:
+ attributes:
+ comment:
+ body: Содержание
+ user: Автор
diff --git a/config/locales/event_log.en.yml b/config/locales/models/event_log.en.yml
similarity index 85%
rename from config/locales/event_log.en.yml
rename to config/locales/models/event_log.en.yml
index e7584a599..ac04b8aa2 100644
--- a/config/locales/event_log.en.yml
+++ b/config/locales/models/event_log.en.yml
@@ -48,3 +48,20 @@ en:
versions_list: version list
status: the status of the assembly
project_build: build package
+
+ layout:
+ event_logs:
+ list: List
+ list_header: Event log
+
+ activerecord:
+ models:
+ event_log: Event log
+ attributes:
+ event_log:
+ kind: Event type
+ created_at: Event date and time
+ user: User
+ ip: User IP
+ protocol: Access protocol
+ description: Description
diff --git a/config/locales/event_log.ru.yml b/config/locales/models/event_log.ru.yml
similarity index 84%
rename from config/locales/event_log.ru.yml
rename to config/locales/models/event_log.ru.yml
index 4ff644004..68a1d390a 100644
--- a/config/locales/event_log.ru.yml
+++ b/config/locales/models/event_log.ru.yml
@@ -48,3 +48,20 @@ ru:
versions_list: список версий
status: статус сборки
project_build: сборка пакета
+
+ layout:
+ event_logs:
+ list: Список
+ list_header: Лог событий
+
+ activerecord:
+ models:
+ event_log: Лог событий
+ attributes:
+ event_log:
+ kind: Тип события
+ created_at: Дата и время события
+ user: Пользователь
+ ip: IP пользователя
+ protocol: Протокол доступа
+ description: Описание события
diff --git a/config/locales/models/group.en.yml b/config/locales/models/group.en.yml
new file mode 100644
index 000000000..139645c8f
--- /dev/null
+++ b/config/locales/models/group.en.yml
@@ -0,0 +1,53 @@
+en:
+ layout:
+ groups:
+ list: List
+ new: Create
+ edit: Edit
+ members: Members
+ new_header: New group
+ edit_header: Edit
+ list_header: Groups
+ show: Group
+ back_to_the_list: ⇐ List of groups
+ confirm_delete: Are you sure to remove this group?
+ edit_members: Edit members
+ group: Group
+ description: Descripton
+ leave_group: Leave group
+ projects_list: Projects list
+ public_profile: Public profile
+ delete_warning: Attention! Deleted group can not be restored!
+
+ members:
+ back_to_group: Back to group
+ edit: Edit list
+ roles: Roles
+ add_member: Add member
+ input_username: Username
+
+ flash:
+ group:
+ saved: Group saved
+ save_error: Group saves error
+ destroyed: Group deleted
+ user_uname_exists: User already exists
+
+ members:
+ successfully_changed: Members list successfully changed
+ error_in_changing: Members list changing error
+ successfully_added: Member successfully added
+ error_in_adding: Member adding error
+ already_added: User already added
+
+ activerecord:
+ models:
+ group: Group
+ attributes:
+ group:
+ name: Name
+ uname: Nickname
+ owner: Owner
+ created_at: Created
+ updated_at: Updated
+ description: Description
diff --git a/config/locales/models/group.ru.yml b/config/locales/models/group.ru.yml
new file mode 100644
index 000000000..231f95c53
--- /dev/null
+++ b/config/locales/models/group.ru.yml
@@ -0,0 +1,53 @@
+ru:
+ layout:
+ groups:
+ list: Список
+ new: Создать группу
+ edit: Редактировать
+ members: Участники
+ new_header: Новая группа
+ edit_header: Редактировать
+ list_header: Группы
+ show: Группа
+ back_to_the_list: ⇐ К списку групп
+ confirm_delete: Вы уверены, что хотите удалить эту группу?
+ edit_members: Изменить список участников
+ group: Группа
+ description: Описание
+ leave_group: Покинуть группу
+ projects_list: Список проектов
+ public_profile: Публичный профиль
+ delete_warning: Внимание! Удаленная группа восстановлению не подлежит.
+
+ members:
+ back_to_group: Вернуться к группе
+ edit: Редактировать список
+ roles: Роли
+ add_member: Добавить участника
+ input_username: Псевдоним пользователя
+
+ flash:
+ group:
+ saved: Группа успешно сохранена
+ save_error: Не удалось сохранить группу
+ destroyed: Группа успешно удалена
+ user_uname_exists: Пользователь с таким именем уже зарегестрирован
+
+ members:
+ successfully_changed: Список участников успешно изменен
+ error_in_changing: Ошибка изменения списка участников
+ successfully_added: Участник успешно добавлен
+ error_in_adding: Ошибка при добавлении участника
+ already_added: Пользователь уже добавлен
+
+ activerecord:
+ models:
+ group: Группа
+ attributes:
+ group:
+ name: Название
+ uname: Псевдоним
+ owner: Владелец
+ created_at: Создана
+ updated_at: Обновлена
+ description: Описание
diff --git a/config/locales/issues.en.yml b/config/locales/models/issue.en.yml
similarity index 100%
rename from config/locales/issues.en.yml
rename to config/locales/models/issue.en.yml
diff --git a/config/locales/issues.ru.yml b/config/locales/models/issue.ru.yml
similarity index 100%
rename from config/locales/issues.ru.yml
rename to config/locales/models/issue.ru.yml
diff --git a/config/locales/models/platform.en.yml b/config/locales/models/platform.en.yml
new file mode 100644
index 000000000..4025ff4b8
--- /dev/null
+++ b/config/locales/models/platform.en.yml
@@ -0,0 +1,66 @@
+en:
+ layout:
+ platforms:
+ admin_id: Owner
+ build_all: Build all
+ list: List
+ new: Create
+ edit: Edit
+ new_header: New platform
+ edit_header: Edit
+ list_header: Platforms
+ list_header_main: General
+ list_header_personal: Personal
+ list_header_all: All
+ clone_header: Platform clone
+ show: Platform
+ projects: Projects
+ products: Products
+ location: Location
+ repositories: Repositories
+ back_to_the_list: ⇐To platform list
+ freeze: Freeze
+ unfreeze: Unfeeze
+ confirm_freeze: Are you sure to freeze this platform?
+ confirm_freeze: Are you sure to clone this platform?
+ confirm_unfreeze: Are you sure to defrost this platform?
+ released_suffix: (released)
+ confirm_delete: Are you sure to delete this platform?
+ current_platform_header: Current platform
+ owner: Owner
+ visibility: Visibility
+ platform_type: Platform type
+ distrib_type: Distribution kit type
+ private_users: Access data
+ confirm_clone: To clone?
+ clone: To clone
+
+ flash:
+ platform:
+ saved: Platform saved
+ save_error: Platform saves error
+ freezed: Platform freezed
+ freeze_error: Platform freezing error, try again
+ unfreezed: Platform unfreezed
+ unfreeze_error: Platform unfreezing error, try again
+ destroyed: Platform deleted
+ build_all_success: All project build in progress
+ clone_success: Cloned successfully
+
+ activerecord:
+ models:
+ platform: Platform
+ attributes:
+ platform:
+ name: Name
+ description: Description
+ parent_platform_id: Parent platform
+ parent: Parent platform
+ released: Released
+ created_at: Created
+ updated_at: Updated
+ distrib_type: Source type
+ visibility: Status
+ visibility_types:
+ open: Open
+ hidden: Hidden
diff --git a/config/locales/models/platform.ru.yml b/config/locales/models/platform.ru.yml
new file mode 100644
index 000000000..3aecfc0a9
--- /dev/null
+++ b/config/locales/models/platform.ru.yml
@@ -0,0 +1,66 @@
+ru:
+ layout:
+ platforms:
+ admin_id: Владелец
+ build_all: Собрать все
+ list: Список
+ new: Создать
+ edit: Редактировать
+ new_header: Новая платформа
+ edit_header: Редактировать
+ list_header: Платформы
+ list_header_main: Основные
+ list_header_personal: Персональные
+ list_header_all: Все
+ clone_header: Клонирование платформы
+ show: Платформа
+ projects: Проекты
+ products: Продукты
+ location: Расположение
+ repositories: Репозитории
+ back_to_the_list: ⇐ К списку платформ
+ freeze: Заморозить
+ unfreeze: Разморозить
+ confirm_freeze: Вы уверены, что хотите заморозить эту платформу?
+ confirm_freeze: Вы уверены, что хотите клонировать эту платформу?
+ confirm_unfreeze: Вы уверены, что хотите разморозить эту платформу?
+ released_suffix: (выпущена)
+ confirm_delete: Вы уверены, что хотите удалить эту платформу?
+ current_platform_header: Текущая платформа
+ owner: Владелец
+ visibility: Видимость
+ platform_type: Тип платформы
+ distrib_type: Тип дистрибутива
+ private_users: Данные для доступа
+ confirm_clone: Клонировать?
+ clone: Клонировать
+
+ flash:
+ platform:
+ saved: Платформа успешно добавлена
+ save_error: Не удалось создать платформу
+ freezed: Платформа успешно заморожена
+ freeze_error: Не удалось заморозить платформу, попробуйте еще раз
+ unfreezed: Платформа успешно разморожена
+ unfreeze_error: Не удалось разморозить платформу, попробуйте еще раз
+ destroyed: Платформа успешно удалена
+ build_all_success: Все проекты успешно отправлены на сборку
+ clone_success: Клонирование успешно
+
+ activerecord:
+ models:
+ platform: Платформа
+ attributes:
+ platform:
+ name: Название
+ description: Описание
+ parent_platform_id: Родительская платформа
+ parent: Родительская платформа
+ released: Released
+ created_at: Создана
+ updated_at: Обновлена
+ distrib_type: Тип дистрибутива
+ visibility: Статус
+ visibility_types:
+ open: Открытый
+ hidden: Закрытый
diff --git a/config/locales/models/product.en.yml b/config/locales/models/product.en.yml
new file mode 100644
index 000000000..5670d6618
--- /dev/null
+++ b/config/locales/models/product.en.yml
@@ -0,0 +1,55 @@
+en:
+ layout:
+ products:
+ list: List
+ new: New product
+ list_header: Products
+ clone: Clone
+ build: Build
+ new_header: New product
+ edit_header: Product editing
+ confirm_delete: Are you sure to delete this product?
+
+ cron_tab_generator:
+ show: Show cron tab the generator
+ hide: Hide cron tab the generator
+ choose: Choose
+ every_minute: Every minute
+ every_hour: Every hour
+ every_day: Every day
+ every_month: Every month
+ every_weekday: Every weekdays
+ minutes: Minutes
+ hours: Hours
+ days: Days
+ months: Months
+ weekdays: weekdays
+
+ flash:
+ product:
+ saved: Product saved
+ save_error: Product saves error
+ build_started: Product build started
+ destroyed: Product deleted
+ build_list_delete: Product build list deleted
+
+ activerecord:
+ models:
+ product: Product
+ attributes:
+ product:
+ name: Name
+ platform_id: Platform
+ build_status: Build status
+ build_path: ISO path
+ created_at: Created
+ updated_at: Updated
+ ks: Content .ks.template
+ counter: Content .counter
+ build_script: Content build
+ menu: Content .menu.xml
+ tar: Tar.bz2 file
+ is_template: Template
+ system_wide: System
+ cron_tab: Cront tab
+ use_cron: Cron usage
diff --git a/config/locales/models/product.ru.yml b/config/locales/models/product.ru.yml
new file mode 100644
index 000000000..d53a389d9
--- /dev/null
+++ b/config/locales/models/product.ru.yml
@@ -0,0 +1,55 @@
+ru:
+ layout:
+ products:
+ list: Список
+ new: Новый продукт
+ list_header: Продукты
+ clone: Клонировать
+ build: Собрать
+ new_header: Новый продукт
+ edit_header: Редактирование продукта
+ confirm_delete: Вы уверены, что хотите удалить этот продукт?
+
+ cron_tab_generator:
+ show: Показать cron tab генератор
+ hide: Спрятать cron tab генератор
+ choose: Выберите
+ every_minute: Каждую минуту
+ every_hour: Каждый час
+ every_day: Каждый день
+ every_month: Каждый месяц
+ every_weekday: Каждый день недели
+ minutes: Минуты
+ hours: Часы
+ days: Дни
+ months: Месяцы
+ weekdays: Дни недели
+
+ flash:
+ product:
+ saved: Продукт успешно сохранен
+ save_error: Не удалось сохранить изменения
+ build_started: Запущена сборка продукта
+ destroyed: Продукт удален
+ build_list_delete: Сборочный лист продукта удален
+
+ activerecord:
+ models:
+ product: Продукт
+ attributes:
+ product:
+ name: Название
+ platform_id: Платформа
+ build_status: Статус последней сборки
+ build_path: Путь к iso
+ created_at: Создан
+ updated_at: Обновлен
+ ks: Содержимое .ks.template
+ counter: Содержимое .counter
+ build_script: Содержимое build
+ menu: Содержимое .menu.xml
+ tar: Tar.bz2 файл
+ is_template: Шаблон
+ system_wide: Общесистемный
+ cron_tab: Cront tab
+ use_cron: Использовать крон
diff --git a/config/locales/models/project.en.yml b/config/locales/models/project.en.yml
new file mode 100644
index 000000000..add8be4fe
--- /dev/null
+++ b/config/locales/models/project.en.yml
@@ -0,0 +1,77 @@
+en:
+ layout:
+ projects:
+ add: Add
+ edit: Edit
+ list: List
+ list_header: Projects
+ edit_header: Edit the project
+ show: Project
+ build: Build
+ new_build: New build %{project_name}
+ confirm_delete: Are you sure to delete this project?
+ new: New project
+ new_header: New project
+ new_header: New project
+ location: Location
+ git_repo_location: Path to git repo
+ current_project_header: Current project
+ current_build_lists: Current builds
+ build_button: Start build
+ add_collaborators: Add collaborators
+ members: Members
+ collaborators: Collaborators
+ groups: Groups
+ edit_collaborators: Edit collaborators
+ issues: Issues
+ wiki: Wiki
+ delete_warning: Attention! Deleted project can not be restored!
+ sections: Sections
+ has_issue_description: Issues adds lightweight issue tracking tightly integrated with your repository. Add issues to milestones, label issues, and close & reference issues from commit messages.
+ has_wiki_description: Wikis are the simplest way to let others contribute content. Any user can create and edit pages to use for documentation, examples, support or anything you wish.
+
+ diff_show_header: "%{files} with %{additions} and %{deletions}."
+ about_subheader: "About project"
+ last_commit: "Last commit"
+
+ filename: File
+ age: Modification date
+ message: Message
+ author: Author
+
+ current_branch: Current branch
+ current_commit: Current commit
+ files_in_project: Files in
+
+ flash:
+ project:
+ saved: Project saved
+ save_error: Project saves error
+ save_warning_ssh_key: Owner of the project must specify in profile a SSH key
+ destroyed: Project deleted
+ forked: Project forked
+ fork_error: Project fork error
+
+ activerecord:
+ models:
+ project: Project
+ attributes:
+ project:
+ category_id: Category
+ name: Name
+ description: Descripton
+ owner: Owner
+ visibility: Visibility
+ visibility_types:
+ open: Open
+ hidden: Hidden
+ repository_id: Repository
+ repository: Repository
+ created_at: Created
+ updated_at: Updated
+ has_issues: Tracker on
+ has_wiki: Wiki on
+ srpm: Import code from src.rpm
+ who_owns:
+ me: I
+ group: Group
diff --git a/config/locales/models/project.ru.yml b/config/locales/models/project.ru.yml
new file mode 100644
index 000000000..0cdefa439
--- /dev/null
+++ b/config/locales/models/project.ru.yml
@@ -0,0 +1,77 @@
+ru:
+ layout:
+ projects:
+ add: Добавить
+ edit: Редактировать
+ list: Список
+ list_header: Проекты
+ edit_header: Редактировать проект
+ show: Проект
+ build: Собрать
+ new_build: Новая сборка %{project_name}
+ confirm_delete: Вы уверены, что хотите удалить этот проект?
+ new: Новый проект
+ new_header: Новый проект
+ new_header: Новый проект
+ location: Расположение
+ git_repo_location: Путь к git-репозиторию
+ current_project_header: Текущий проект
+ current_build_lists: Текущие сборки
+ build_button: Начать сборку
+ add_collaborators: Добавить коллабораторов
+ members: Участники
+ collaborators: Коллабораторы
+ groups: Группы
+ edit_collaborators: Изменить список участников
+ issues: Задачи
+ wiki: Wiki
+ delete_warning: Внимание! Удаленный проект восстановлению не подлежит.
+ sections: Разделы
+ has_issue_description: Трэкер предоставляет лекговесный менеджер для задач по разработке Вашего проекта.
+ has_wiki_description: Wiki - это самый простой способ предоставить другим вносить свой вклад в развитие Вашего проекта. Каждый пользователь нашего сервиса может использовать Wiki для документирования, примеров, поддержки или всего другого, в чем у Вас появится необходимость.
+
+ diff_show_header: "%{files} с %{additions} и %{deletions}."
+ about_subheader: "О проекте"
+ last_commit: "Последний коммит"
+
+ filename: Файл
+ age: Дата модификации
+ message: Сообщение
+ author: Автор
+
+ current_branch: Текущая ветка
+ current_commit: Текущий коммит
+ files_in_project: Файлы в
+
+ flash:
+ project:
+ saved: Проект успешно сохранен
+ save_error: Не удалось сохранить проект
+ save_warning_ssh_key: Владельцу проекта необходимо указать в профиле свой SSH ключ
+ destroyed: Проект успешно удален
+ forked: Проект успешно форкнут
+ fork_error: Ошибка форка
+
+ activerecord:
+ models:
+ project: Проект
+ attributes:
+ project:
+ category_id: Категория
+ name: Название
+ description: Описание
+ owner: Владелец
+ visibility: Видимость
+ visibilities:
+ open: Публичная
+ hidden: Приватная
+ repository_id: Репозиторий
+ repository: Репозиторий
+ created_at: Создан
+ updated_at: Обновлен
+ has_issues: Включить трэкер
+ has_wiki: Включить Wiki
+ srpm: Импортировать код из src.rpm
+ who_owns:
+ me: Я
+ group: Группа
diff --git a/config/locales/models/repository.en.yml b/config/locales/models/repository.en.yml
new file mode 100644
index 000000000..ccfa02b8d
--- /dev/null
+++ b/config/locales/models/repository.en.yml
@@ -0,0 +1,45 @@
+en:
+ layout:
+ repositories:
+ list: List
+ list_header: Repositories
+ new: New repository
+ new_header: New repository
+ show: Repository
+ location: Location
+ projects: Projects
+ new_header: New repository
+ back_to_the_list: ⇐ List of repositories
+ confirm_delete: Are you sure to delete this repository?
+ current_repository_header: Current repository
+
+ personal_repositories:
+ settings_header: Settings
+ change_visibility_from_hidden: Replace the status to "Opened"
+ change_visibility_from_open: Replace the status to "Private"
+ settings: Settings
+ show: My repository
+ private_users: Private repository users
+
+ flash:
+ repository:
+ saved: Repository added
+ save_error: Repository adding error
+ destroyed: Repository deleted
+ project_added: Project added on repository
+ project_not_added: Project adding error. In this repository already is a project with such name. First remove the old project
+ project_removed: Project deleted
+ project_not_removed: Project deleting failed
+
+ activerecord:
+ models:
+ repository: Repository
+ attributes:
+ repository:
+ name: Name
+ description: Description
+ platform_id: Platform
+ platform: Platform
+ created_at: Created
+ updated_at: Updated
+ owner: Owner
diff --git a/config/locales/models/repository.ru.yml b/config/locales/models/repository.ru.yml
new file mode 100644
index 000000000..87bca736f
--- /dev/null
+++ b/config/locales/models/repository.ru.yml
@@ -0,0 +1,45 @@
+ru:
+ layout:
+ repositories:
+ list: Список
+ list_header: Репозитории
+ new: Новый репозиторий
+ new_header: Новый репозиторий
+ show: Репозиторий
+ location: Расположение
+ projects: Проекты
+ new_header: Новый репозиторий
+ back_to_the_list: ⇐ К списку репозиториев
+ confirm_delete: Вы уверены, что хотите удалить этот репозиторий?
+ current_repository_header: Текущий репозиторий
+
+ personal_repositories:
+ settings_header: Настройки
+ change_visibility_from_hidden: Сменить статус на "Открытый"
+ change_visibility_from_open: Сменить статус на "Приватный"
+ settings: Настройки
+ show: Мой репозиторий
+ private_users: Пользователи приватного репозитория
+
+ flash:
+ repository:
+ saved: Репозиторий успешно добавлен
+ save_error: Не удалось добавить репозиторий
+ destroyed: Репозиторий успешно удален
+ project_added: Проект добавлен к репозиторию
+ project_not_added: Не удалось добавить проект. В этом репозитории уже есть проект с таким именем. Сначала нужно удалить старый проект
+ project_removed: Проект удален из репозитория
+ project_not_removed: Не удалось удалить проект из репозитория
+
+ activerecord:
+ models:
+ repository: Репозиторий
+ attributes:
+ repository:
+ name: Название
+ description: Описание
+ platform_id: Платформа
+ platform: Платформа
+ created_at: Создан
+ updated_at: Обновлен
+ owner: Владелец
diff --git a/config/locales/models/user.en.yml b/config/locales/models/user.en.yml
new file mode 100644
index 000000000..f7583331f
--- /dev/null
+++ b/config/locales/models/user.en.yml
@@ -0,0 +1,41 @@
+en:
+ layout:
+ users:
+ list: List
+ new: Create
+ edit: Edit
+ new_header: New user
+ edit_header: Edit
+ list_header: Users
+ groups: Groups
+ show: User
+ back_to_the_list: ⇐ List of users
+ confirm_delete: Are you sure to remove this user?
+ own_projects: My projects
+ part_projects: Participate projects
+ filter_header: Filter
+
+ flash:
+ user:
+ saved: User saved
+ save_error: User data saves error
+ destroyed: User account deleted
+
+ activerecord:
+ models:
+ user: User
+ attributes:
+ user:
+ name: User
+ login: Nickname or Email
+ email: Email
+ uname: Nickname
+ ssh_key: SSH key
+ current_password: Current password
+ role: Role
+ created_at: Created
+ updated_at: Updated
+ role: System role
+ language: Language
+ password: Password
+ password_confirm: Confirmation
diff --git a/config/locales/models/user.ru.yml b/config/locales/models/user.ru.yml
new file mode 100644
index 000000000..50c44c434
--- /dev/null
+++ b/config/locales/models/user.ru.yml
@@ -0,0 +1,41 @@
+ru:
+ layout:
+ users:
+ list: Список
+ new: Создать
+ edit: Редактировать
+ new_header: Новый пользователь
+ edit_header: Редактировать
+ list_header: Пользователи
+ groups: Группы
+ show: Пользователь
+ back_to_the_list: ⇐ К списку пользователей
+ confirm_delete: Вы уверены, что хотите удалить этого пользователя?
+ own_projects: Мои проекты
+ part_projects: Участвую в проектах
+ filter_header: Фильтр
+
+ flash:
+ user:
+ saved: Пользователь успешно сохранен
+ save_error: Не удалось сохранить данные о пользователе
+ destroyed: Учетная запись успешно удалена
+
+ activerecord:
+ models:
+ user: Пользователь
+ attributes:
+ user:
+ name: Имя
+ login: Псевдоним или Email
+ email: Email
+ uname: Никнейм
+ ssh_key: SSH ключ
+ current_password: Текущий пароль
+ role: Роль
+ created_at: Создан
+ updated_at: Обновлен
+ role: Роль в системе
+ language: Язык
+ password: Пароль
+ password_confirm: Повторите пароль
diff --git a/config/locales/ru.yml b/config/locales/ru.yml
index 371c5c3d4..84dba6fd0 100644
--- a/config/locales/ru.yml
+++ b/config/locales/ru.yml
@@ -23,6 +23,7 @@ ru:
show: Просмотр
cancel: Отмена
create: Создать
+ update: Обновить
delete: Удалить
save: Сохранить
search: Искать
@@ -37,7 +38,6 @@ ru:
false_: Нет
publish: Опубликовать
add: Добавить
- update: Обновить
upload: Загрузить
not_access: Нет доступа!
owner: Владелец
@@ -52,7 +52,7 @@ ru:
change_email_link: Изменить адрес электронной почты
processing: Обрабатывается...
invalid_content_type: имеет неверный тип
-
+
devise:
shared_links:
sign_in: Войти
@@ -111,126 +111,6 @@ ru:
edit_header: Редактировать категорию
confirm_delete: Вы уверены, что хотите удалить эту категорию?
- comments:
- confirm_delete: Вы уверены, что хотите удалить комментарий?
- new_header: Новый комментарий
- edit_header: Редактирование комментария
-
- platforms:
- admin_id: Владелец
- build_all: Собрать все
- list: Список
- new: Создать
- edit: Редактировать
- new_header: Новая платформа
- edit_header: Редактировать
- list_header: Платформы
- list_header_main: Основные
- list_header_personal: Персональные
- list_header_all: Все
- clone_header: Клонирование платформы
- show: Платформа
- projects: Проекты
- products: Продукты
- location: Расположение
- repositories: Репозитории
- back_to_the_list: ⇐ К списку платформ
- freeze: Заморозить
- unfreeze: Разморозить
- confirm_freeze: Вы уверены, что хотите заморозить эту платформу?
- confirm_freeze: Вы уверены, что хотите клонировать эту платформу?
- confirm_unfreeze: Вы уверены, что хотите разморозить эту платформу?
- released_suffix: (выпущена)
- confirm_delete: Вы уверены, что хотите удалить эту платформу?
- current_platform_header: Текущая платформа
- owner: Владелец
- visibility: Видимость
- platform_type: Тип платформы
- distrib_type: Тип дистрибутива
- private_users: Данные для доступа
- confirm_clone: Клонировать?
- clone: Клонировать
-
- event_logs:
- list: Список
- list_header: Лог событий
-
- repositories:
- list: Список
- list_header: Репозитории
- new: Новый репозиторий
- new_header: Новый репозиторий
- show: Репозиторий
- location: Расположение
- projects: Проекты
- new_header: Новый репозиторий
- back_to_the_list: ⇐ К списку репозиториев
- confirm_delete: Вы уверены, что хотите удалить этот репозиторий?
- current_repository_header: Текущий репозиторий
-
- personal_repositories:
- settings_header: Настройки
- change_visibility_from_hidden: Сменить статус на "Открытый"
- change_visibility_from_open: Сменить статус на "Приватный"
- settings: Настройки
- show: Мой репозиторий
- private_users: Пользователи приватного репозитория
-
- products:
- list: Список
- new: Новый продукт
- list_header: Продукты
- clone: Клонировать
- build: Собрать
- new_header: Новый продукт
- edit_header: Редактирование продукта
- confirm_delete: Вы уверены, что хотите удалить этот продукт?
-
- cron_tab_generator:
- show: Показать cron tab генератор
- hide: Спрятать cron tab генератор
- choose: Выберите
- every_minute: Каждую минуту
- every_hour: Каждый час
- every_day: Каждый день
- every_month: Каждый месяц
- every_weekday: Каждый день недели
- minutes: Минуты
- hours: Часы
- days: Дни
- months: Месяцы
- weekdays: Дни недели
-
- projects:
- add: Добавить
- edit: Редактировать
- list: Список
- list_header: Проекты
- edit_header: Редактировать проект
- show: Проект
- build: Собрать
- new_build: Новая сборка %{project_name}
- confirm_delete: Вы уверены, что хотите удалить этот проект?
- new: Новый проект
- new_header: Новый проект
- new_header: Новый проект
- location: Расположение
- git_repo_location: Путь к git-репозиторию
- current_project_header: Текущий проект
- current_build_lists: Текущие сборки
- build_button: Начать сборку
- add_collaborators: Добавить коллабораторов
- members: Участники
- collaborators: Коллабораторы
- groups: Группы
- edit_collaborators: Изменить список участников
- issues: Задачи
- wiki: Wiki
- delete_warning: Внимание! Удаленный проект восстановлению не подлежит.
- sections: Разделы
- has_issue_description: Трэкер предоставляет лекговесный менеджер для задач по разработке Вашего проекта.
- has_wiki_description: Wiki - это самый простой способ предоставить другим вносить свой вклад в развитие Вашего проекта. Каждый пользователь нашего сервиса может использовать Wiki для документирования, примеров, поддержки или всего другого, в чем у Вас появится необходимость.
-
collaborators:
back_to_proj: Вернуться к проекту
edit: Редактировать список
@@ -248,26 +128,6 @@ ru:
writer: Писатель
admin: Админ
- members:
- back_to_group: Вернуться к группе
- edit: Редактировать список
- roles: Роли
- add_member: Добавить участника
- input_username: Псевдоним пользователя
-
- groups:
- list: Список
- new: Создать
- edit: Редактировать
- members: Участники
- new_header: Новая группа
- edit_header: Редактировать
- list_header: Группы
- show: Группа
- back_to_the_list: ⇐ К списку групп
- confirm_delete: Вы уверены, что хотите удалить эту группу?
- edit_members: Изменить список участников
-
git:
repositories:
empty: "Репозиторий пуст. Если вы клонировали(Fork) проект или импортировали пакет, данные скоро появятся"
@@ -314,13 +174,6 @@ ru:
successfully_added: Участник %s успешно добавлен
error_in_adding: Ошибка при добавлении участника %s
- members:
- successfully_changed: Список участников успешно изменен
- error_in_changing: Ошибка изменения списка участников
- successfully_added: Участник успешно добавлен
- error_in_adding: Ошибка при добавлении участника
- already_added: Пользователь уже добавлен
-
auto_build_list:
success: Сборка проекта автоматизорована!
failed: Не удалось автоматизировать сборку!
@@ -332,66 +185,6 @@ ru:
save_error: Не удалось сохранить категорию
destroyed: Категория успешно удалена
- comment:
- saved: Комментарий успешно сохранен
- save_error: Ошибка сохранения комментария
- destroyed: Комментарий удален
-
- project:
- saved: Проект успешно сохранен
- save_error: Не удалось сохранить проект
- save_warning_ssh_key: Владельцу проекта необходимо указать в профиле свой SSH ключ
- destroyed: Проект успешно удален
- forked: Проект успешно форкнут
- fork_error: Ошибка форка
-
- user:
- saved: Пользователь успешно сохранен
- save_error: Не удалось сохранить данные о пользователе
- destroyed: Учетная запись успешно удалена
-
- group:
- saved: Группа успешно сохранена
- save_error: Не удалось сохранить группу
- destroyed: Группа успешно удалена
- user_uname_exists: Пользователь с таким именем уже зарегестрирован
-
- repository:
- saved: Репозиторий успешно добавлен
- save_error: Не удалось добавить репозиторий
- destroyed: Репозиторий успешно удален
- project_added: Проект добавлен к репозиторию
- project_not_added: Не удалось добавить проект. В этом репозитории уже есть проект с таким именем. Сначала нужно удалить старый проект
- project_removed: Проект удален из репозитория
- project_not_removed: Не удалось удалить проект из репозитория
-
- product:
- saved: Продукт успешно сохранен
- save_error: Не удалось сохранить изменения
- build_started: Запущена сборка продукта
- destroyed: Продукт удален
- build_list_delete: Сборочный лист продукта удален
-
- platform:
- saved: Платформа успешно добавлена
- save_error: Не удалось создать платформу
- freezed: Платформа успешно заморожена
- freeze_error: Не удалось заморозить платформу, попробуйте еще раз
- unfreezed: Платформа успешно разморожена
- unfreeze_error: Не удалось разморозить платформу, попробуйте еще раз
- destroyed: Платформа успешно удалена
- build_all_success: Все проекты успешно отправлены на сборку
- clone_success: Клонирование успешно
-
- wiki:
- ref_not_exist: Версия не существует
- successfully_updated: Страница '%{name}' успешно обновлена
- duplicate_page: Страница '%{name}' уже существует
- page_successfully_removed: Страница успешно удалена
- page_not_found: Страница '%{name}' не найдена.
- revert_success: Изменения успешно откачены
- patch_does_not_apply: Не удалось откатить изменения
-
blob:
successfully_updated: Файл '%{name}' успешно обновлен
updating_error: Ошибка обновления файла '%{name}'
@@ -414,22 +207,13 @@ ru:
models:
category: Категория
- repository: Репозиторий
arch: Arch
container: Container
- platform: Платформа
- group: Группа
- event_log: Лог событий
- project: Проект
rpm: RPM
- user: Пользователь
private_user: Приватный пользователь
- product: Продукт
product_build_list: Сборочный лист продукта
download: Статистика
auto_build_list: Автоматическая пересборка пакетов
- settings:
- notifier: Настройки оповещений
attributes:
settings:
@@ -453,10 +237,6 @@ ru:
arch_id: Архитектура
arch: Архитектура
- comment:
- body: Содержание
- user: Автор
-
private_user:
login: Логин
password: Пароль
@@ -465,32 +245,6 @@ ru:
parent_id: Родитель
name: Название
- repository:
- name: Название
- description: Описание
- platform_id: Платформа
- platform: Платформа
- created_at: Создан
- updated_at: Обновлен
- owner: Владелец
-
- product:
- name: Название
- platform_id: Платформа
- build_status: Статус последней сборки
- build_path: Путь к iso
- created_at: Создан
- updated_at: Обновлен
- ks: Содержимое .ks.template
- counter: Содержимое .counter
- build_script: Содержимое build
- menu: Содержимое .menu.xml
- tar: Tar.bz2 файл
- is_template: Шаблон
- system_wide: Общесистемный
- cron_tab: Cront tab
- use_cron: Использовать крон
-
arch:
name: Название
created_at: Создана
@@ -505,48 +259,6 @@ ru:
created_at: Создан
updated_at: Обновлен
- platform:
- name: Название
- description: Описание
- parent_platform_id: Родительская платформа
- parent: Родительская платформа
- released: Released
- created_at: Создана
- updated_at: Обновлена
- distrib_type: Тип дистрибутива
- visibility: Статус
- visibility_types:
- open: Открытый
- hidden: Закрытый
-
- event_log:
- kind: Тип события
- created_at: Дата и время события
- user: Пользователь
- ip: IP пользователя
- protocol: Протокол доступа
- description: Описание события
-
- project:
- category_id: Категория
- name: Название
- description: Описание
- owner: Владелец
- visibility: Видимость
- visibilities:
- open: Публичная
- hidden: Приватная
- repository_id: Репозиторий
- repository: Репозиторий
- created_at: Создан
- updated_at: Обновлен
- has_issues: Включить трэкер
- has_wiki: Включить Wiki
- srpm: Импортировать код из src.rpm
- who_owns:
- me: Я
- group: Группа
-
rpm:
name: Название
arch_id: Arch
@@ -556,20 +268,6 @@ ru:
created_at: Создан
updated_at: Обновлен
- role:
- name: Название
- on: Ведомый
- to: Ведущий
- use_default: По умолчанию
- use_default_for_owner: По умолчанию для владельца
-
- group:
- name: Название
- uname: Псевдоним
- owner: Владелец
- created_at: Создана
- updated_at: Обновлена
-
product_build_list:
id: Id
product: Продукт
@@ -583,12 +281,3 @@ ru:
distro: Дистрибутив
platform: Архитектура
counter: Закачки
-
- notifications:
- subjects:
- new_comment_notification: Новый комментарий к Вашей задаче
- new_issue_notification: Новая задача добавлена к проекту
- new_user_notification: Регистрация на проекте «%{ project_name }»
- issue_assign_notification: Вам назначили задачу
- new_commit_comment_notification: Новый комментарий к коммиту
- invite_approve_notification: Приглашение в ABF
diff --git a/config/locales/wiki.en.yml b/config/locales/wiki.en.yml
index 24f5a9511..994ba84f3 100644
--- a/config/locales/wiki.en.yml
+++ b/config/locales/wiki.en.yml
@@ -63,3 +63,13 @@ en:
# Welcome to **Wiki** #
Edit this page and create new ones.
+
+ flash:
+ wiki:
+ ref_not_exist: No such version
+ successfully_updated: Page '%{name}' successfully updated
+ duplicate_page: Page '%{name}' already exists
+ page_successfully_removed: Page successfully removed
+ page_not_found: Page '%{name}' not found
+ revert_success: Changes successfully reverted
+ patch_does_not_apply: Patch does not apply
diff --git a/config/locales/wiki.ru.yml b/config/locales/wiki.ru.yml
index df50dd5e7..7b7f81ab6 100644
--- a/config/locales/wiki.ru.yml
+++ b/config/locales/wiki.ru.yml
@@ -63,3 +63,13 @@ ru:
# Добро пожаловать в **Wiki** #
Отредактируйте эту страницу и создайте новые.
+
+ flash:
+ wiki:
+ ref_not_exist: Версия не существует
+ successfully_updated: Страница '%{name}' успешно обновлена
+ duplicate_page: Страница '%{name}' уже существует
+ page_successfully_removed: Страница успешно удалена
+ page_not_found: Страница '%{name}' не найдена.
+ revert_success: Изменения успешно откачены
+ patch_does_not_apply: Не удалось откатить изменения
diff --git a/config/routes.rb b/config/routes.rb
index 1eefe9526..cc076fce4 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -177,13 +177,17 @@ Rosa::Application.routes.draw do
get :edit
post :add
post :update
+ delete :remove
end
member do
post :update
+ delete :remove
end
end
end
+ resources :activity_feeds, :only => [:index]
+
resources :users, :groups do
resources :platforms, :only => [:new, :create]
@@ -228,6 +232,6 @@ Rosa::Application.routes.draw do
match '/projects/:project_id/git/raw/:treeish/*path', :controller => "git/blobs", :action => :raw, :treeish => /[0-9a-zA-Z_.\-]*/, :defaults => { :treeish => :master }, :as => :raw, :format => false
match '/projects/:project_id/git/commit/raw/:commit_hash/*path', :controller => "git/blobs", :action => :raw, :as => :raw_commit
- root :to => "platforms#index"
+ root :to => "activity_feeds#index"
match '/forbidden', :to => 'platforms#forbidden', :as => 'forbidden'
end
diff --git a/db/migrate/20120124065207_create_activity_feeds.rb b/db/migrate/20120124065207_create_activity_feeds.rb
new file mode 100644
index 000000000..d5b13fc3a
--- /dev/null
+++ b/db/migrate/20120124065207_create_activity_feeds.rb
@@ -0,0 +1,15 @@
+class CreateActivityFeeds < ActiveRecord::Migration
+ def self.up
+ create_table :activity_feeds do |t|
+ t.integer :user_id, :null => false
+ t.string :kind
+ t.text :data
+
+ t.timestamps
+ end
+ end
+
+ def self.down
+ drop_table :activity_feeds
+ end
+end
diff --git a/db/migrate/20120229163054_add_description_to_groups.rb b/db/migrate/20120229163054_add_description_to_groups.rb
new file mode 100644
index 000000000..16662758f
--- /dev/null
+++ b/db/migrate/20120229163054_add_description_to_groups.rb
@@ -0,0 +1,5 @@
+class AddDescriptionToGroups < ActiveRecord::Migration
+ def change
+ add_column :groups, :description, :text
+ end
+end
diff --git a/db/migrate/20120302102734_remove_name_from_groups.rb b/db/migrate/20120302102734_remove_name_from_groups.rb
new file mode 100644
index 000000000..f7f33ae48
--- /dev/null
+++ b/db/migrate/20120302102734_remove_name_from_groups.rb
@@ -0,0 +1,9 @@
+class RemoveNameFromGroups < ActiveRecord::Migration
+ def up
+ remove_column :groups, :name
+ end
+
+ def down
+ add_column :groups, :name, :string
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 8719ef7dd..90992dd8e 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -17,14 +17,14 @@ ActiveRecord::Schema.define(:version => 20120303171802) do
t.integer "user_id", :null => false
t.string "kind"
t.text "data"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
create_table "arches", :force => true do |t|
t.string "name", :null => false
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
add_index "arches", ["name"], :name => "index_arches_on_name", :unique => true
@@ -33,8 +33,8 @@ ActiveRecord::Schema.define(:version => 20120303171802) do
t.integer "user_id"
t.string "provider"
t.string "uid"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
add_index "authentications", ["provider", "uid"], :name => "index_authentications_on_provider_and_uid", :unique => true
@@ -45,8 +45,8 @@ ActiveRecord::Schema.define(:version => 20120303171802) do
t.integer "arch_id"
t.integer "pl_id"
t.integer "bpl_id"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
create_table "build_list_items", :force => true do |t|
@@ -54,8 +54,8 @@ ActiveRecord::Schema.define(:version => 20120303171802) do
t.integer "level"
t.integer "status"
t.integer "build_list_id"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.string "version"
end
@@ -69,8 +69,8 @@ ActiveRecord::Schema.define(:version => 20120303171802) do
t.integer "project_id"
t.integer "arch_id"
t.datetime "notified_at"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.boolean "is_circle", :default => false
t.text "additional_repos"
t.string "name"
@@ -93,16 +93,16 @@ ActiveRecord::Schema.define(:version => 20120303171802) do
t.string "name"
t.string "ancestry"
t.integer "projects_count", :default => 0, :null => false
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
create_table "comments", :force => true do |t|
t.string "commentable_type"
t.integer "user_id"
t.text "body"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.decimal "commentable_id", :precision => 50, :scale => 0
end
@@ -110,8 +110,8 @@ ActiveRecord::Schema.define(:version => 20120303171802) do
t.string "name", :null => false
t.integer "project_id", :null => false
t.integer "owner_id", :null => false
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
create_table "delayed_jobs", :force => true do |t|
@@ -123,8 +123,8 @@ ActiveRecord::Schema.define(:version => 20120303171802) do
t.datetime "locked_at"
t.datetime "failed_at"
t.string "locked_by"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.string "queue"
end
@@ -136,8 +136,8 @@ ActiveRecord::Schema.define(:version => 20120303171802) do
t.string "distro"
t.string "platform"
t.integer "counter", :default => 0
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
create_table "event_logs", :force => true do |t|
@@ -152,14 +152,14 @@ ActiveRecord::Schema.define(:version => 20120303171802) do
t.string "controller"
t.string "action"
t.text "message"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
create_table "groups", :force => true do |t|
t.integer "owner_id"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.string "uname"
t.integer "own_projects_count", :default => 0, :null => false
t.text "description"
@@ -172,8 +172,8 @@ ActiveRecord::Schema.define(:version => 20120303171802) do
t.string "title"
t.text "body"
t.string "status", :default => "open"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.integer "creator_id"
t.datetime "closed_at"
t.integer "closed_by"
@@ -204,8 +204,8 @@ ActiveRecord::Schema.define(:version => 20120303171802) do
t.string "description"
t.string "name"
t.integer "parent_platform_id"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.boolean "released", :default => false
t.integer "owner_id"
t.string "owner_type"
@@ -218,8 +218,8 @@ ActiveRecord::Schema.define(:version => 20120303171802) do
t.integer "platform_id"
t.string "login"
t.string "password"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.integer "user_id"
end
@@ -227,8 +227,8 @@ ActiveRecord::Schema.define(:version => 20120303171802) do
t.integer "product_id"
t.integer "status", :default => 2, :null => false
t.datetime "notified_at"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
add_index "product_build_lists", ["product_id"], :name => "index_product_build_lists_on_product_id"
@@ -238,8 +238,8 @@ ActiveRecord::Schema.define(:version => 20120303171802) do
t.integer "platform_id", :null => false
t.integer "build_status", :default => 2, :null => false
t.string "build_path"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.text "build_script"
t.text "counter"
t.text "ks"
@@ -259,8 +259,8 @@ ActiveRecord::Schema.define(:version => 20120303171802) do
t.string "name"
t.string "version"
t.datetime "file_mtime"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.integer "platform_id"
end
@@ -269,14 +269,14 @@ ActiveRecord::Schema.define(:version => 20120303171802) do
create_table "project_to_repositories", :force => true do |t|
t.integer "project_id"
t.integer "repository_id"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
create_table "projects", :force => true do |t|
t.string "name"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.integer "owner_id"
t.string "owner_type"
t.string "visibility", :default => "open"
@@ -313,16 +313,16 @@ ActiveRecord::Schema.define(:version => 20120303171802) do
t.string "object_type"
t.integer "target_id"
t.string "target_type"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.string "role"
end
create_table "repositories", :force => true do |t|
t.string "description", :null => false
t.integer "platform_id", :null => false
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.string "name", :null => false
end
@@ -330,8 +330,8 @@ ActiveRecord::Schema.define(:version => 20120303171802) do
t.string "name", :null => false
t.integer "arch_id", :null => false
t.integer "project_id", :null => false
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
add_index "rpms", ["project_id", "arch_id"], :name => "index_rpms_on_project_id_and_arch_id"
@@ -344,8 +344,8 @@ ActiveRecord::Schema.define(:version => 20120303171802) do
t.boolean "new_comment_reply", :default => true
t.boolean "new_issue", :default => true
t.boolean "issue_assign", :default => true
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.boolean "new_comment_commit_owner", :default => true
t.boolean "new_comment_commit_repo_owner", :default => true
t.boolean "new_comment_commit_commentor", :default => true
@@ -354,8 +354,8 @@ ActiveRecord::Schema.define(:version => 20120303171802) do
create_table "subscribes", :force => true do |t|
t.string "subscribeable_type"
t.integer "user_id"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.boolean "status", :default => true
t.integer "project_id"
t.decimal "subscribeable_id", :precision => 50, :scale => 0
@@ -363,10 +363,11 @@ ActiveRecord::Schema.define(:version => 20120303171802) do
create_table "users", :force => true do |t|
t.string "name"
- t.string "email", :default => "", :null => false
- t.string "encrypted_password", :limit => 128, :default => "", :null => false
t.string "password_salt", :default => "", :null => false
+ t.string "email", :default => "", :null => false
+ t.string "encrypted_password", :default => "", :null => false
t.string "reset_password_token"
+ t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
t.datetime "created_at"
t.datetime "updated_at"
diff --git a/lib/product_builder.rb b/lib/product_builder.rb
index dfcac41df..a845f2dda 100644
--- a/lib/product_builder.rb
+++ b/lib/product_builder.rb
@@ -14,4 +14,8 @@ class ProductBuilder
call('create_product', pbl.id.to_s, pbl.product.platform.name, pbl.product.ks, pbl.product.menu, pbl.product.build_script,
pbl.product.counter, [], pbl.product.tar.exists? ? "#{pbl.base_url}#{pbl.product.tar.url}" : '')
end
+
+ def self.delete_iso_container pbl # product_build_list
+ self.client(pbl.product.platform.distrib_type).call('delete_iso_container', pbl.product.platform.name, pbl.id.to_s)
+ end
end
diff --git a/spec/controllers/activity_feeds_controller_spec.rb b/spec/controllers/activity_feeds_controller_spec.rb
new file mode 100644
index 000000000..54ce3026a
--- /dev/null
+++ b/spec/controllers/activity_feeds_controller_spec.rb
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe ActivityFeedsController do
+
+end
diff --git a/spec/controllers/groups_controller_spec.rb b/spec/controllers/groups_controller_spec.rb
index 4238babf8..04b71c40d 100644
--- a/spec/controllers/groups_controller_spec.rb
+++ b/spec/controllers/groups_controller_spec.rb
@@ -6,8 +6,8 @@ describe GroupsController do
stub_rsync_methods
@group = Factory(:group)
@another_user = Factory(:user)
- @create_params = {:group => {:name => 'grp1', :uname => 'un_grp1'}}
- @update_params = {:group => {:name => 'grp2'}}
+ @create_params = {:group => {:description => 'grp1', :uname => 'un_grp1'}}
+ @update_params = {:group => {:description => 'grp2'}}
end
context 'for guest' do
diff --git a/spec/controllers/issues_controller_spec.rb b/spec/controllers/issues_controller_spec.rb
index 907bf98fa..eb2579ae6 100644
--- a/spec/controllers/issues_controller_spec.rb
+++ b/spec/controllers/issues_controller_spec.rb
@@ -27,7 +27,7 @@ end
shared_examples_for 'user with issue update rights' do
it 'should be able to perform update action' do
put :update, {:id => @issue.serial_id}.merge(@update_params)
- response.should redirect_to([@project, @issue])
+ response.code.should eq('200')
end
it 'should update issue title' do
diff --git a/spec/factories/activity_feeds.rb b/spec/factories/activity_feeds.rb
new file mode 100644
index 000000000..d0e1984cc
--- /dev/null
+++ b/spec/factories/activity_feeds.rb
@@ -0,0 +1,6 @@
+# Read about factories at http://github.com/thoughtbot/factory_girl
+
+FactoryGirl.define do
+ factory :activity_feed do
+ end
+end
\ No newline at end of file
diff --git a/spec/factories/group_factory.rb b/spec/factories/group_factory.rb
index b6b592409..57dee6213 100644
--- a/spec/factories/group_factory.rb
+++ b/spec/factories/group_factory.rb
@@ -1,6 +1,6 @@
# -*- encoding : utf-8 -*-
Factory.define(:group) do |g|
- g.name { Factory.next(:string) }
g.uname { Factory.next(:uname) }
+ g.description 'Description'
g.association :owner, :factory => :user
end
diff --git a/spec/helpers/activity_feeds_helper_spec.rb b/spec/helpers/activity_feeds_helper_spec.rb
new file mode 100644
index 000000000..623c526ec
--- /dev/null
+++ b/spec/helpers/activity_feeds_helper_spec.rb
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+# Specs in this file have access to a helper object that includes
+# the ActivityFeedsHelper. For example:
+#
+# describe ActivityFeedsHelper do
+# describe "string concat" do
+# it "concats two strings with spaces" do
+# helper.concat_strings("this","that").should == "this that"
+# end
+# end
+# end
+describe ActivityFeedsHelper do
+ pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/models/activity_feed_observer_spec.rb b/spec/models/activity_feed_observer_spec.rb
new file mode 100644
index 000000000..378ee2377
--- /dev/null
+++ b/spec/models/activity_feed_observer_spec.rb
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe ActivityFeedObserver do
+ pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/models/activity_feed_spec.rb b/spec/models/activity_feed_spec.rb
new file mode 100644
index 000000000..c77e1d83a
--- /dev/null
+++ b/spec/models/activity_feed_spec.rb
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe ActivityFeed do
+ pending "add some examples to (or delete) #{__FILE__}"
+end