SHIMADA Koji
null+****@clear*****
Wed Sep 26 16:28:07 JST 2012
SHIMADA Koji 2012-09-26 16:28:07 +0900 (Wed, 26 Sep 2012) New Revision: 2eec587bcba83e0b45f27f7aaaa99776bca9b1a3 https://github.com/logaling/logaling-server/commit/2eec587bcba83e0b45f27f7aaaa99776bca9b1a3 Log: Apply design to dashboard (working in progress) Modified files: app/views/dashboard/show.html.haml Modified: app/views/dashboard/show.html.haml (+53 -51) =================================================================== --- app/views/dashboard/show.html.haml 2012-09-26 15:49:43 +0900 (9f96719) +++ app/views/dashboard/show.html.haml 2012-09-26 16:28:07 +0900 (5c91640) @@ -1,52 +1,54 @@ -%h1 - マイページ -%h2 - わたしの用語集 -%p - =link_to "新しい用語集をつくる", new_user_glossary_path(:user_id => current_user), :class => 'addNewProjectBtn' -%h3 - 用語集一覧 -%ul.glossariesList - - @user_glossaries.each do |user_glossary| - %li - = link_to "#{user_glossary.glossary_name} #{user_glossary.source_language} #{user_glossary.target_language}", user_glossary_path(current_user, user_glossary) - %span.btn-group.actions - %a.btn.btn-mini{ :href => '#', :title => '検索結果の優先順位を上げる' } - %i.icon-star - %a.btn.btn-mini{ :href => '#', :title => '編集する' } - %i.icon-pencil - %a.btn.btn-mini{ :href => '#', :title => '複製する' } - %i.icon-plus - %a.btn.btn-mini{ :href => '#', :title => '削除する' } - %i.icon-trash - = form_for @user_config, url: @user_config.submit_path_for(current_user) do |f| - = f.hidden_field :glossary_name, value: user_glossary.glossary_name - = f.hidden_field :source_language, value: user_glossary.source_language - = f.hidden_field :target_language, value: user_glossary.target_language - = f.submit @user_config.mark_for(user_glossary), :class => 'btn btn-link' +.container + %h1 + マイページ + %h2 + わたしの用語集 + %p + =link_to "新しい用語集をつくる", new_user_glossary_path(:user_id => current_user), :class => 'addNewProjectBtn' + %h3 + 用語集一覧 + %ul.glossariesList + - @user_glossaries.each do |user_glossary| + %li + = link_to "#{user_glossary.glossary_name} #{user_glossary.source_language} #{user_glossary.target_language}", user_glossary_path(current_user, user_glossary) + %span.btn-group.actions + = form_for @user_config, url: @user_config.submit_path_for(current_user), :html => { :class => "btn btn-mini" } do |f| + = f.hidden_field :glossary_name, value: user_glossary.glossary_name + = f.hidden_field :source_language, value: user_glossary.source_language + = f.hidden_field :target_language, value: user_glossary.target_language + %label{ :for => "commit_#{user_glossary.id}" } + %i{ :class => 'icon-star' } + = f.submit '', :class => 'hidden', :id => "commit_#{user_glossary.id}" + %a.btn.btn-mini{ :href => '#', :title => '編集する' } + %i.icon-pencil + %a.btn.btn-mini{ :href => '#', :title => '複製する' } + %i.icon-plus + %a.btn.btn-mini{ :href => '#', :title => '削除する' } + %i.icon-trash -%h2 - 参加しているGitHubプロジェクトの管理 -%p - =link_to 'プロジェクトを登録する', new_user_github_project_membership_path(:user_id => current_user), :class => 'addNewProjectBtn' -%h3 - プロジェクト一覧 -%ul.projectsList - - @github_projects.each do |github_project| - %li - = github_project.full_name - %ul.glossariesList - - github_project.glossaries.each do |glossary| - %li - - bilingual_pair = [glossary.source_language, glossary.target_language].join('-') - = link_to "#{glossary}", github_project_glossary_path(:id => bilingual_pair, :github_project_id => github_project) - %span.btn-group.actions - %a.btn.btn-mini{ :href => '#', :title => '検索結果の優先順位を上げる' } - %i.icon-star - %a.btn.btn-mini{ :href => '#', :title => '削除する' } - %i.icon-trash - = form_for @user_config, url: @user_config.submit_path_for(current_user) do |f| - = f.hidden_field :glossary_name, value: glossary.name - = f.hidden_field :source_language, value: glossary.source_language - = f.hidden_field :target_language, value: glossary.target_language - = f.submit @user_config.mark_for(glossary), :class => 'btn btn-link' + %h2 + 参加しているGitHubプロジェクトの管理 + %p + =link_to 'プロジェクトを登録する', new_user_github_project_membership_path(:user_id => current_user), :class => 'addNewProjectBtn' + %h3 + プロジェクト一覧 + %ul.projectsList + - @github_projects.each do |github_project| + %li + = github_project.full_name + %span.btn-group.actions + %a.btn.btn-mini{ :href => '#', :title => '削除する' } + %i.icon-trash + %ul.glossariesList + - github_project.glossaries.each_with_index do |glossary, i| + %li + - bilingual_pair = [glossary.source_language, glossary.target_language].join('-') + = link_to "#{glossary}", github_project_glossary_path(:id => bilingual_pair, :github_project_id => github_project) + %span.btn-group.actions + = form_for @user_config, url: @user_config.submit_path_for(current_user), :html => { :class => "btn btn-mini" } do |f| + = f.hidden_field :glossary_name, value: glossary.name + = f.hidden_field :source_language, value: glossary.source_language + = f.hidden_field :target_language, value: glossary.target_language + %label{ :for => "commit_github_project_glossary_#{i}" } + %i{ :class => 'icon-star' } + = f.submit '', :class => 'hidden', :id => "commit_github_project_glossary_#{i}" -------------- next part -------------- An HTML attachment was scrubbed... Download