Permalink
Browse files

Initial commit

  • Loading branch information...
Sergei Kozlov
Sergei Kozlov committed Oct 23, 2011
0 parents commit 67c7e4d27c07f23f627b2fbef83ceda47ea4fea2
Showing 3,452 changed files with 165,753 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
@@ -0,0 +1,10 @@
+.bundle
+db/*.sqlite3
+log/*.log
+tmp/
+.sass-cache/
+*.tmproj
+netzke-core
+netzke-basepack
+netzke-communitypack
+database.yml
1 .rvmrc
@@ -0,0 +1 @@
+rvm 1.9.2
39 Gemfile
@@ -0,0 +1,39 @@
+source 'http://rubygems.org'
+
+gem 'rails', '3.1.1'
+
+# Bundle edge Rails instead:
+# gem 'rails', :git => 'git://github.com/rails/rails.git'
+
+# gem 'sqlite3'
+
+gem 'netzke-core'
+gem 'netzke-basepack'
+gem 'netzke-communitypack'
+
+gem 'forgery'
+gem 'faker'
+
+gem 'pg'
+
+# Gems used only for assets and not required
+# in production environments by default.
+group :assets do
+ gem 'sass-rails', " ~> 3.1.0"
+ gem 'coffee-rails', "~> 3.1.0"
+ gem 'uglifier'
+end
+
+# Use unicorn as the web server
+# gem 'unicorn'
+
+# Deploy with Capistrano
+# gem 'capistrano'
+
+# To use debugger
+# gem 'ruby-debug19', :require => 'ruby-debug'
+
+group :test do
+ # Pretty printed test output
+ gem 'turn', :require => false
+end
@@ -0,0 +1,134 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ actionmailer (3.1.1)
+ actionpack (= 3.1.1)
+ mail (~> 2.3.0)
+ actionpack (3.1.1)
+ activemodel (= 3.1.1)
+ activesupport (= 3.1.1)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ i18n (~> 0.6)
+ rack (~> 1.3.2)
+ rack-cache (~> 1.1)
+ rack-mount (~> 0.8.2)
+ rack-test (~> 0.6.1)
+ sprockets (~> 2.0.2)
+ activemodel (3.1.1)
+ activesupport (= 3.1.1)
+ builder (~> 3.0.0)
+ i18n (~> 0.6)
+ activerecord (3.1.1)
+ activemodel (= 3.1.1)
+ activesupport (= 3.1.1)
+ arel (~> 2.2.1)
+ tzinfo (~> 0.3.29)
+ activeresource (3.1.1)
+ activemodel (= 3.1.1)
+ activesupport (= 3.1.1)
+ activesupport (3.1.1)
+ multi_json (~> 1.0)
+ acts_as_list (0.1.4)
+ ansi (1.3.0)
+ arel (2.2.1)
+ builder (3.0.0)
+ coffee-rails (3.1.1)
+ coffee-script (>= 2.2.0)
+ railties (~> 3.1.0)
+ coffee-script (2.2.0)
+ coffee-script-source
+ execjs
+ coffee-script-source (1.1.2)
+ erubis (2.7.0)
+ execjs (1.2.9)
+ multi_json (~> 1.0)
+ faker (1.0.1)
+ i18n (~> 0.4)
+ forgery (0.5.0)
+ hike (1.2.1)
+ i18n (0.6.0)
+ json (1.6.1)
+ mail (2.3.0)
+ i18n (>= 0.4.0)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ mime-types (1.16)
+ multi_json (1.0.3)
+ netzke-basepack (0.7.3)
+ acts_as_list (~> 0.1.4)
+ netzke-core (~> 0.7.4)
+ will_paginate (~> 3.0.0)
+ netzke-communitypack (0.7.0)
+ netzke-basepack (~> 0.7.2)
+ rails (>= 3.0.0)
+ netzke-core (0.7.4)
+ activesupport (>= 3.0.0)
+ pg (0.11.0)
+ polyglot (0.3.2)
+ rack (1.3.5)
+ rack-cache (1.1)
+ rack (>= 0.4)
+ rack-mount (0.8.3)
+ rack (>= 1.0.0)
+ rack-ssl (1.3.2)
+ rack
+ rack-test (0.6.1)
+ rack (>= 1.0)
+ rails (3.1.1)
+ actionmailer (= 3.1.1)
+ actionpack (= 3.1.1)
+ activerecord (= 3.1.1)
+ activeresource (= 3.1.1)
+ activesupport (= 3.1.1)
+ bundler (~> 1.0)
+ railties (= 3.1.1)
+ railties (3.1.1)
+ actionpack (= 3.1.1)
+ activesupport (= 3.1.1)
+ rack-ssl (~> 1.3.2)
+ rake (>= 0.8.7)
+ rdoc (~> 3.4)
+ thor (~> 0.14.6)
+ rake (0.9.2.2)
+ rdoc (3.11)
+ json (~> 1.4)
+ sass (3.1.10)
+ sass-rails (3.1.4)
+ actionpack (~> 3.1.0)
+ railties (~> 3.1.0)
+ sass (>= 3.1.4)
+ sprockets (~> 2.0.0)
+ tilt (~> 1.3.2)
+ sprockets (2.0.3)
+ hike (~> 1.2)
+ rack (~> 1.0)
+ tilt (!= 1.3.0, ~> 1.1)
+ thor (0.14.6)
+ tilt (1.3.3)
+ treetop (1.4.10)
+ polyglot
+ polyglot (>= 0.3.1)
+ turn (0.8.3)
+ ansi
+ tzinfo (0.3.30)
+ uglifier (1.0.4)
+ execjs (>= 0.3.0)
+ multi_json (>= 1.0.2)
+ will_paginate (3.0.2)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ coffee-rails (~> 3.1.0)
+ faker
+ forgery
+ netzke-basepack
+ netzke-communitypack
+ netzke-core
+ pg
+ rails (= 3.1.1)
+ sass-rails (~> 3.1.0)
+ turn
+ uglifier
@@ -0,0 +1,22 @@
+# Yanit - Yet Another (Netzke) Issue Tracker
+
+One-page demo RIA for [RubyShift](http://rubyshift.org/) 2011.
+
+It is a very simple issue tracker driven by the following models and relationships between them:
+
+`Issue` that `belong_to` `User` and `belong_to` `Project`.
+
+## Installation
+
+1) Create your database.yml
+2) rake db:setup
+
+Test data is included.
+
+Have fun!
+
+---
+Released by @nomadcoder under the MIT license except for:
+
+* Sencha Ext JS: http://www.sencha.com/products/extjs/license/
+* FamFamFam icons (public/images/icons): http://creativecommons.org/licenses/by/2.5/
@@ -0,0 +1,7 @@
+#!/usr/bin/env rake
+# Add your own tasks in files placed in lib/tasks ending in .rake,
+# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
+
+require File.expand_path('../config/application', __FILE__)
+
+Yanit::Application.load_tasks
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,9 @@
+// This is a manifest file that'll be compiled into including all the files listed below.
+// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
+// be included in the compiled file accessible from http://example.com/assets/application.js
+// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
+// the compiled file.
+//
+//= require jquery
+//= require jquery_ujs
+//= require_tree .
@@ -0,0 +1,7 @@
+/*
+ * This is a manifest file that'll automatically include all the stylesheets available in this directory
+ * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
+ * the top of the compiled file, but it's generally better to create a new file per style scope.
+ *= require_self
+ *= require_tree .
+*/
@@ -0,0 +1,68 @@
+# Our top-level Application component
+class Application < Netzke::Base
+ js_base_class "Ext.container.Viewport"
+ js_property :layout, :border
+ js_property :padding, 5
+
+ HEADER_HTML = "<b>Yanit</a> | RubyShift 2011 | <a href='http://github.com/skozlov/yanit'>Source code</a> | <a href='http://netzke.org'>netzke.org</a> | <a href='http://twitter.com/nomadcoder'>@nomadcoder</a></b>"
+
+ items [
+ # Top header
+ {
+ region: :north,
+ height: 22,
+ border: 0,
+ body_style: 'background: transparent; text-align: right;',
+ html: HEADER_HTML
+ },
+
+ # Navigator
+ :navigator.component(region: :west, width: 200, split: true, collapsible: true, title: "Navigator"),
+
+ # Workspace
+ :workspace.component(region: :center, title: "Workspace")
+ ]
+
+ #
+ # Component declarations
+ #
+
+ component :navigator do
+ {
+ class_name: "Navigator",
+ workspace_id: [global_id, "workspace"].join("__")
+ }
+ end
+
+ component :workspace do
+ {
+ class_name: "Netzke::Communitypack::Workspace",
+ dashboard_config: dashboard_config
+ }
+ end
+
+ private
+ def dashboard_html
+ %Q(
+ <h1>Welcome to Yanit!</h1>
+ <br>
+ Currently in the system:<br>
+ <b>#{User.count}</b> users<br>
+ <b>#{Project.count}</b> projects<br>
+ <b>#{Issue.count}</b> issues
+ )
+ end
+
+ # Config for the initial tab in Workspace (the dashboard). Naturally, this can be any Netzke component.
+ def dashboard_config
+ {
+ class_name: "Netzke::Basepack::Panel",
+ title: "Dashboard",
+ prevent_header: true,
+ body_padding: 5,
+ border: false,
+ html: dashboard_html,
+ }
+ end
+
+end
@@ -0,0 +1,24 @@
+# Our custom IssueForm - it has a custom layout and pre-assigned model
+class IssueForm < Netzke::Basepack::FormPanel
+ model "Issue"
+
+ record_id Issue.first.try(:id) # default record
+
+ items [
+ :name,
+ {
+ layout: :hbox, border: false, defaults: {border: false}, items: [{
+ flex: 1,
+ layout: :anchor,
+ defaults: {anchor: "-8"},
+ items: [:project__name, :priority, :assignee__name]
+ },{
+ flex: 1,
+ layout: :anchor,
+ defaults: {anchor: "100%"},
+ items: [{name: :status, xtype: :combobox, store: Issue::STATUSES}, :started_on, :due_on]
+ }]
+ },
+ {name: :description, hide_label: true}
+ ]
+end
@@ -0,0 +1,25 @@
+# This issue grid is used across multiple views
+class IssueGrid < Netzke::Basepack::GridPanel
+ model "Issue"
+
+ # columns customizations (these are optional)
+ override_column :description, flex: 1
+ override_column :status, editor: {xtype: :combobox, store: Issue::STATUSES}, width: 60
+ override_column :priority, width: 50
+ override_column :created_at, hidden: true
+ override_column :updated_at, hidden: true
+ override_column :actions, width: 20
+
+ # The inspect action (and column)
+ include Netzke::Projects::Inspectable
+
+ # Use our custom IssueForm for Add/Edit forms
+ add_form_config class_name: "IssueForm"
+ edit_form_config class_name: "IssueForm"
+ multi_edit_form_config class_name: "IssueForm"
+
+ # Increase size of form windows
+ add_form_window_config width: 600
+ edit_form_window_config width: 600
+ multi_edit_form_window_config width: 600
+end
@@ -0,0 +1,35 @@
+# Component used to inspect a given Issue. It contains a form on the top, and the assignee details on the bottom.
+class IssueInspector < Netzke::Basepack::BorderLayoutPanel
+
+ def configuration
+ super.tap do |c|
+ c[:record_id] ||= Issue.first.id # default record id, handy for debugging
+
+ issue = Issue.find(c[:record_id])
+
+ # Dynamically setting the title
+ c[:title] = issue.name
+
+ c[:items] = [
+ {
+ region: :north,
+ height: 210,
+ prevent_header: true,
+ class_name: "IssueForm",
+ model: "Issue",
+ record_id: c[:record_id],
+ read_only: true
+ },
+
+ {
+ region: :center,
+ title: "Assignee details",
+ class_name: "UserForm",
+ record_id: issue.assignee.id,
+ read_only: true
+ }
+ ]
+ end
+ end
+
+end
Oops, something went wrong.

0 comments on commit 67c7e4d

Please sign in to comment.