diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index 876c3c34c..48ff57488 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -1,85 +1,104 @@ -.block - .secondary-navigation - %ul.wat-cf - %li.first= link_to t("layout.users.list"), users_path - %li= link_to t("layout.users.new"), new_user_path - %li.active= link_to t("layout.users.show"), user_path - .content - .inner +.left + = image_tag gravatar_url(current_user.email, 81) +.left + %h3= @user.uname + = @user.name + %br + = link_to @user.email, "mailto:#{ @user.email }" + %br + %h4= t("activerecord.attributes.user.professional_experience") + ":" + %p= @user.professional_experience + %h4= t("layout.users.public_projects_list") + ":" %p - %b - Id - \: - = @user.id - %p - %b - = t("activerecord.attributes.user.name") - \: - = @user.name - %p - %b - = t("activerecord.attributes.user.uname") - \: - = @user.uname - %p - %b - = t("activerecord.attributes.user.email") - \: - = @user.email - %p - %b - = t("activerecord.attributes.user.created_at") - \: - = @user.created_at - .wat-cf - - if can? :edit, @user - = link_to image_tag("code.png", :alt => t("layout.edit")) + " " + t("layout.edit"), edit_user_path(@user), :class => "button" - - if can? :destroy, @user - = link_to image_tag("x.png", :alt => t("layout.delete")) + " " + t("layout.delete"), user_path(@user), :method => "delete", :class => "button", :confirm => t("layout.users.confirm_delete") + - @user.projects.by_visibilities(['open']).each do |project| + = link_to project.name, project + %br -.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_user_platform_path(@user) - .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 +:javascript + $('article .all').addClass('verybigpadding'); -#.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_user_repository_path(@user) - .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_project_path - .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') +-# .secondary-navigation +-# %ul.wat-cf +-# %li.first= link_to t("layout.users.list"), users_path +-# %li= link_to t("layout.users.new"), new_user_path +-# %li.active= link_to t("layout.users.show"), user_path +-# .content +-# .inner +-# %p +-# %b +-# Id +-# \: +-# = @user.id +-# %p +-# %b +-# = t("activerecord.attributes.user.name") +-# \: +-# = @user.name +-# %p +-# %b +-# = t("activerecord.attributes.user.uname") +-# \: +-# = @user.uname +-# %p +-# %b +-# = t("activerecord.attributes.user.email") +-# \: +-# = @user.email +-# %p +-# %b +-# = t("activerecord.attributes.user.created_at") +-# \: +-# = @user.created_at +-# .wat-cf +-# - if can? :edit, @user +-# = link_to image_tag("code.png", :alt => t("layout.edit")) + " " + t("layout.edit"), edit_user_path(@user), :class => "button" +-# - if can? :destroy, @user +-# = link_to image_tag("x.png", :alt => t("layout.delete")) + " " + t("layout.delete"), user_path(@user), :method => "delete", :class => "button", :confirm => t("layout.users.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_user_platform_path(@user) +-# .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_user_repository_path(@user) +-# .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_project_path +-# .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') diff --git a/config/locales/en.yml b/config/locales/en.yml index 50e88d31d..ccb1e5916 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -266,21 +266,6 @@ en: confirm_delete: Are you sure to remove this group? edit_members: Edit members - 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 - git: repositories: empty: "Repository is empty. You need to wait some time if you have forked project or imported package" @@ -588,21 +573,6 @@ en: created_at: Created updated_at: Updated - 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 - product_build_list: id: Id product: Product diff --git a/config/locales/ru.yml b/config/locales/ru.yml index b243ce5da..68ca88d74 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -266,21 +266,6 @@ ru: confirm_delete: Вы уверены, что хотите удалить эту группу? edit_members: Изменить список участников - users: - list: Список - new: Создать - edit: Редактировать - new_header: Новый пользователь - edit_header: Редактировать - list_header: Пользователи - groups: Группы - show: Пользователь - back_to_the_list: ⇐ К списку пользователей - confirm_delete: Вы уверены, что хотите удалить этого пользователя? - own_projects: Мои проекты - part_projects: Участвую в проектах - filter_header: Фильтр - git: repositories: empty: "Репозиторий пуст. Если вы клонировали(Fork) проект или импортировали пакет, данные скоро появятся" @@ -583,21 +568,6 @@ ru: created_at: Создана updated_at: Обновлена - user: - name: Имя - login: Псевдоним или Email - email: Email - uname: Никнейм - ssh_key: SSH ключ - current_password: Текущий пароль - role: Роль - created_at: Создан - updated_at: Обновлен - role: Роль в системе - language: Язык - password: Пароль - password_confirm: Повторите пароль - product_build_list: id: Id product: Продукт diff --git a/config/locales/users.en.yml b/config/locales/users.en.yml new file mode 100644 index 000000000..d2bd3d4d7 --- /dev/null +++ b/config/locales/users.en.yml @@ -0,0 +1,36 @@ +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 + public_projects_list: Public projects list + + activerecord: + 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 + professional_experience: Professional experience + diff --git a/config/locales/users.ru.yml b/config/locales/users.ru.yml new file mode 100644 index 000000000..5882d02de --- /dev/null +++ b/config/locales/users.ru.yml @@ -0,0 +1,36 @@ +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: Фильтр + public_projects_list: Список публичных проектов + + activerecord: + attributes: + user: + name: Имя + login: Псевдоним или Email + email: Email + uname: Никнейм + ssh_key: SSH ключ + current_password: Текущий пароль + role: Роль + created_at: Создан + updated_at: Обновлен + role: Роль в системе + language: Язык + password: Пароль + password_confirm: Повторите пароль + professional_experience: Профессиональный опыт + diff --git a/db/migrate/20120302114735_add_professional_experience_to_users.rb b/db/migrate/20120302114735_add_professional_experience_to_users.rb new file mode 100644 index 000000000..69ba2d342 --- /dev/null +++ b/db/migrate/20120302114735_add_professional_experience_to_users.rb @@ -0,0 +1,5 @@ +class AddProfessionalExperienceToUsers < ActiveRecord::Migration + def change + add_column :users, :professional_experience, :text + end +end diff --git a/db/schema.rb b/db/schema.rb index 20af53ccd..31d150c3b 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,15 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20120229182356) do +ActiveRecord::Schema.define(:version => 20120302114735) do + + create_table "activity_feeds", :force => true do |t| + t.integer "user_id", :null => false + t.string "kind" + t.text "data" + t.datetime "created_at" + t.datetime "updated_at" + end create_table "arches", :force => true do |t| t.string "name", :null => false @@ -149,12 +157,12 @@ ActiveRecord::Schema.define(:version => 20120229182356) do end create_table "groups", :force => true do |t| - t.string "name" t.integer "owner_id" t.datetime "created_at" t.datetime "updated_at" t.string "uname" t.integer "own_projects_count", :default => 0, :null => false + t.text "description" end create_table "issues", :force => true do |t| @@ -276,26 +284,23 @@ ActiveRecord::Schema.define(:version => 20120229182356) do t.text "description" t.string "ancestry" t.boolean "has_issues", :default => true + t.boolean "has_wiki", :default => false t.string "srpm_file_name" t.string "srpm_content_type" t.integer "srpm_file_size" t.datetime "srpm_updated_at" - t.boolean "has_wiki", :default => false t.string "default_branch", :default => "master" t.boolean "is_rpm", :default => true end - add_index "projects", ["category_id"], :name => "index_projects_on_category_id" - add_index "projects", ["owner_id"], :name => "index_projects_on_name_and_owner_id_and_owner_type", :unique => true, :case_sensitive => false - create_table "register_requests", :force => true do |t| t.string "name" t.string "email" t.string "token" t.boolean "approved", :default => false t.boolean "rejected", :default => false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.string "interest" t.text "more" end @@ -358,8 +363,9 @@ ActiveRecord::Schema.define(:version => 20120229182356) 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 "email", :default => "", :null => false + t.string "encrypted_password", :limit => 128, :default => "", :null => false + t.string "password_salt", :default => "", :null => false t.string "reset_password_token" t.datetime "remember_created_at" t.datetime "created_at" @@ -367,11 +373,16 @@ ActiveRecord::Schema.define(:version => 20120229182356) do t.text "ssh_key" t.string "uname" t.string "role" - t.string "language", :default => "en" + t.string "language", :default => "en" + t.string "confirmation_token" + t.datetime "confirmed_at" + t.datetime "confirmation_sent_at" + t.integer "own_projects_count", :default => 0, :null => false t.datetime "reset_password_sent_at" - t.integer "own_projects_count", :default => 0, :null => false + t.text "professional_experience" end + add_index "users", ["confirmation_token"], :name => "index_users_on_confirmation_token", :unique => true add_index "users", ["email"], :name => "index_users_on_email", :unique => true add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true add_index "users", ["uname"], :name => "index_users_on_uname", :unique => true